diff options
author | marha <marha@users.sourceforge.net> | 2012-01-26 10:35:11 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-01-26 10:35:11 +0100 |
commit | eb4c088eb71f93b9639f4ff651523d794f1433f7 (patch) | |
tree | 5e95635c1768d7d8e640b298f6c6fbe38cd3c395 /mesalib/src/mesa/main/teximage.c | |
parent | e6432710d8a586386b3c7025e845cf4f80830da3 (diff) | |
download | vcxsrv-eb4c088eb71f93b9639f4ff651523d794f1433f7.tar.gz vcxsrv-eb4c088eb71f93b9639f4ff651523d794f1433f7.tar.bz2 vcxsrv-eb4c088eb71f93b9639f4ff651523d794f1433f7.zip |
xwininfo xcb-proto mesa xserver git update 26 12 2012
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r-- | mesalib/src/mesa/main/teximage.c | 14 |
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) { |