diff options
author | marha <marha@users.sourceforge.net> | 2011-11-21 08:06:12 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-11-21 08:06:12 +0100 |
commit | 45710577f374972946a8eb37833a9c94e5a299bf (patch) | |
tree | 83862aa10e13033fe715c36f673f6e82c5434934 /mesalib/src/mesa/main/teximage.c | |
parent | 1037d56ca89d503cfd62830a90e934a2806ad804 (diff) | |
download | vcxsrv-45710577f374972946a8eb37833a9c94e5a299bf.tar.gz vcxsrv-45710577f374972946a8eb37833a9c94e5a299bf.tar.bz2 vcxsrv-45710577f374972946a8eb37833a9c94e5a299bf.zip |
xserver xkeyboard-config mesa git update 21 nov 2011
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r-- | mesalib/src/mesa/main/teximage.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index a84d6873d..c8ea4329f 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -522,8 +522,7 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) GLuint _mesa_tex_target_to_face(GLenum target) { - if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) + if (_mesa_is_cube_face(target)) return (GLuint) target - (GLuint) GL_TEXTURE_CUBE_MAP_POSITIVE_X; else return 0; @@ -3094,8 +3093,7 @@ compressed_texture_error_check(struct gl_context *ctx, GLint dimensions, } /* For cube map, width must equal height */ - if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB && width != height) { + if (_mesa_is_cube_face(target) && width != height) { *reason = "width != height"; return GL_INVALID_VALUE; } @@ -3183,8 +3181,7 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dimensions, return GL_INVALID_ENUM; /*target*/ maxLevels = ctx->Const.MaxCubeTextureLevels; } - else if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { + else if (_mesa_is_cube_face(target)) { if (!ctx->Extensions.ARB_texture_cube_map) return GL_INVALID_ENUM; /*target*/ maxLevels = ctx->Const.MaxCubeTextureLevels; |