aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-08-13 10:11:17 +0200
committermarha <marha@users.sourceforge.net>2012-08-13 10:11:17 +0200
commitf5a4fa87e844b3ea2658a2355a4c4ac3393a65a1 (patch)
tree921a5a742930124e7bd7e9a7e73f6029bd74338d /mesalib/src/mesa/main/teximage.c
parentec4051f308e8e84146e0ecc39b6d228e500e9636 (diff)
parent9ddf44af81782451cee798e06749ce3067a14a41 (diff)
downloadvcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.tar.gz
vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.tar.bz2
vcxsrv-f5a4fa87e844b3ea2658a2355a4c4ac3393a65a1.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r--mesalib/src/mesa/main/teximage.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index d2746c6f3..569adc16a 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/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)) {
@@ -2616,8 +2616,7 @@ teximage(struct gl_context *ctx, GLuint dims,
border, internalFormat, texFormat);
/* Give the texture to the driver. <pixels> may be null. */
- ctx->Driver.TexImage(ctx, dims, texImage, internalFormat,
- width, height, depth, border, format,
+ ctx->Driver.TexImage(ctx, dims, texImage, format,
type, pixels, unpack);
check_gen_mipmap(ctx, target, texObj, level);
@@ -2945,8 +2944,8 @@ copyteximage(struct gl_context *ctx, GLuint dims,
border, internalFormat, texFormat);
/* Allocate texture memory (no pixel data yet) */
- ctx->Driver.TexImage(ctx, dims, texImage, internalFormat,
- width, height, 1, border, GL_NONE, GL_NONE,
+ ctx->Driver.TexImage(ctx, dims, texImage,
+ GL_NONE, GL_NONE,
NULL, &ctx->Unpack);
if (_mesa_clip_copytexsubimage(ctx, &dstX, &dstY, &srcX, &srcY,
@@ -3551,10 +3550,8 @@ compressedteximage(struct gl_context *ctx, GLuint dims,
width, height, depth,
border, internalFormat, texFormat);
- ctx->Driver.CompressedTexImage(ctx, dims, texImage,
- internalFormat,
- width, height, depth,
- border, imageSize, data);
+ ctx->Driver.CompressedTexImage(ctx, dims, texImage, imageSize,
+ data);
check_gen_mipmap(ctx, target, texObj, level);
@@ -3860,8 +3857,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)