diff options
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r-- | src/mesa/main/teximage.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index d2746c6f33d..9ffdb465668 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -332,7 +332,7 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) } #endif /* FEATURE_EXT_texture_sRGB */ - if (ctx->VersionMajor >= 3 || + if (ctx->Version >= 30 || ctx->Extensions.EXT_texture_integer) { switch (internalFormat) { case GL_RGBA8UI_EXT: @@ -406,7 +406,7 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) case GL_R16UI: case GL_R32I: case GL_R32UI: - if (ctx->VersionMajor < 3 && !ctx->Extensions.EXT_texture_integer) + if (ctx->Version < 30 && !ctx->Extensions.EXT_texture_integer) break; /* FALLTHROUGH */ case GL_R8: @@ -431,7 +431,7 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) case GL_RG16UI: case GL_RG32I: case GL_RG32UI: - if (ctx->VersionMajor < 3 && !ctx->Extensions.EXT_texture_integer) + if (ctx->Version < 30 && !ctx->Extensions.EXT_texture_integer) break; /* FALLTHROUGH */ case GL_RG: @@ -1732,7 +1732,7 @@ texture_error_check( struct gl_context *ctx, target != GL_TEXTURE_RECTANGLE_ARB && target != GL_PROXY_TEXTURE_RECTANGLE_ARB && !((_mesa_is_cube_face(target) || target == GL_PROXY_TEXTURE_CUBE_MAP) && - (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_gpu_shader4))) { + (ctx->Version >= 30 || ctx->Extensions.EXT_gpu_shader4))) { if (!isProxy) _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage(target/internalFormat)"); @@ -1764,7 +1764,7 @@ texture_error_check( struct gl_context *ctx, } /* additional checks for integer textures */ - if ((ctx->VersionMajor >= 3 || ctx->Extensions.EXT_texture_integer) && + if ((ctx->Version >= 30 || ctx->Extensions.EXT_texture_integer) && (_mesa_is_enum_format_integer(format) != _mesa_is_enum_format_integer(internalFormat))) { if (!isProxy) { @@ -1937,7 +1937,7 @@ subtexture_error_check2( struct gl_context *ctx, GLuint dimensions, } } - if (ctx->VersionMajor >= 3 || ctx->Extensions.EXT_texture_integer) { + if (ctx->Version >= 30 || ctx->Extensions.EXT_texture_integer) { /* both source and dest must be integer-valued, or neither */ if (_mesa_is_format_integer_color(destTex->TexFormat) != _mesa_is_enum_format_integer(format)) { @@ -3860,8 +3860,7 @@ validate_texbuffer_format(const struct gl_context *ctx, GLenum internalFormat) * any mention of R/RG formats, but they appear in the GL 3.1 core * specification. */ - if (ctx->VersionMajor < 3 || - (ctx->VersionMajor == 3 && ctx->VersionMinor == 0)) { + if (ctx->Version <= 30) { GLenum base_format = _mesa_get_format_base_format(format); if (base_format == GL_R || base_format == GL_RG) |