summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.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/teximage.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/teximage.c')
-rw-r--r--src/mesa/main/teximage.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index c64b10b0446..d11425d5ea9 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -323,7 +323,8 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
}
#endif /* FEATURE_EXT_texture_sRGB */
- if (ctx->Extensions.EXT_texture_integer) {
+ if (ctx->VersionMajor >= 3 ||
+ ctx->Extensions.EXT_texture_integer) {
switch (internalFormat) {
case GL_RGBA8UI_EXT:
case GL_RGBA16UI_EXT:
@@ -340,6 +341,11 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
case GL_RGB16I_EXT:
case GL_RGB32I_EXT:
return GL_RGB;
+ }
+ }
+
+ if (ctx->Extensions.EXT_texture_integer) {
+ switch (internalFormat) {
case GL_ALPHA8UI_EXT:
case GL_ALPHA16UI_EXT:
case GL_ALPHA32UI_EXT:
@@ -391,7 +397,7 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
case GL_R16UI:
case GL_R32I:
case GL_R32UI:
- if (!ctx->Extensions.EXT_texture_integer)
+ if (ctx->VersionMajor < 3 && !ctx->Extensions.EXT_texture_integer)
break;
/* FALLTHROUGH */
case GL_R8:
@@ -416,7 +422,7 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
case GL_RG16UI:
case GL_RG32I:
case GL_RG32UI:
- if (!ctx->Extensions.EXT_texture_integer)
+ if (ctx->VersionMajor < 3 && !ctx->Extensions.EXT_texture_integer)
break;
/* FALLTHROUGH */
case GL_RG:
@@ -1680,7 +1686,7 @@ texture_error_check( struct gl_context *ctx,
}
/* additional checks for integer textures */
- if (ctx->Extensions.EXT_texture_integer &&
+ if ((ctx->VersionMajor >= 3 || ctx->Extensions.EXT_texture_integer) &&
(_mesa_is_integer_format(format) !=
_mesa_is_integer_format(internalFormat))) {
if (!isProxy) {