aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-26 10:45:42 +0100
committermarha <marha@users.sourceforge.net>2012-01-26 10:45:42 +0100
commit40bdd8b27f5c730b8d0c9a189e89fb51a5400611 (patch)
tree23d7ead2d11ebc95c1d0a5e57cdb2ee5b358110b /mesalib/src/mesa/main/teximage.c
parentffbc36adb7ea5781a93731212226c47f1d49da5e (diff)
parenteb4c088eb71f93b9639f4ff651523d794f1433f7 (diff)
downloadvcxsrv-40bdd8b27f5c730b8d0c9a189e89fb51a5400611.tar.gz
vcxsrv-40bdd8b27f5c730b8d0c9a189e89fb51a5400611.tar.bz2
vcxsrv-40bdd8b27f5c730b8d0c9a189e89fb51a5400611.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r--mesalib/src/mesa/main/teximage.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index c64b10b04..d11425d5e 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/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) {