summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/image.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-01-22 20:25:42 +0100
committerMarek Olšák <[email protected]>2012-01-25 12:35:19 +0100
commit3363e87d7d5b3f19294fc770dc7c506c26646010 (patch)
tree42ed6d6f69ba8095c13aa77d0129a059812e3a1d /src/mesa/main/image.c
parent636802f615bb1ef192e3c4c3b9ab0d1c83c5ebe0 (diff)
mesa: allow exposing GL3 without EXT_texture_integer
Strictly speaking, it's not legal to expose EXT_texture_integer without EXT_gpu_shader4. It might be even dangerous (apps can assume EXT_gpu_shader4 is available without checking for it). The check in compute_version is removed as well, because that's already covered by GLSLVersion >= 130. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/image.c')
-rw-r--r--src/mesa/main/image.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 8b65cf0f04b..3491704f8e9 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -536,7 +536,8 @@ _mesa_is_legal_format_and_type(const struct gl_context *ctx,
case GL_UNSIGNED_SHORT:
case GL_INT:
case GL_UNSIGNED_INT:
- return ctx->Extensions.EXT_texture_integer;
+ return ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer;
default:
return GL_FALSE;
}
@@ -549,7 +550,8 @@ _mesa_is_legal_format_and_type(const struct gl_context *ctx,
case GL_UNSIGNED_SHORT:
case GL_INT:
case GL_UNSIGNED_INT:
- return ctx->Extensions.EXT_texture_integer;
+ return ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer;
case GL_UNSIGNED_BYTE_3_3_2:
case GL_UNSIGNED_BYTE_2_3_3_REV:
case GL_UNSIGNED_SHORT_5_6_5:
@@ -568,7 +570,8 @@ _mesa_is_legal_format_and_type(const struct gl_context *ctx,
case GL_INT:
case GL_UNSIGNED_INT:
/* NOTE: no packed formats w/ BGR format */
- return ctx->Extensions.EXT_texture_integer;
+ return ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer;
default:
return GL_FALSE;
}
@@ -582,7 +585,8 @@ _mesa_is_legal_format_and_type(const struct gl_context *ctx,
case GL_UNSIGNED_SHORT:
case GL_INT:
case GL_UNSIGNED_INT:
- return ctx->Extensions.EXT_texture_integer;
+ return ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer;
case GL_UNSIGNED_SHORT_4_4_4_4:
case GL_UNSIGNED_SHORT_4_4_4_4_REV:
case GL_UNSIGNED_SHORT_5_5_5_1: