From: Brian Paul Date: Tue, 7 Feb 2012 14:42:33 +0000 (-0700) Subject: mesa: remove redundant format/type checks in glGetTexImage() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b3a517673e8a2cbc4d9472c41de9dac5df9feaf;p=mesa.git mesa: remove redundant format/type checks in glGetTexImage() The _mesa_error_check_format_and_type() function will catch all those cases now. Signed-off-by: Brian Paul --- diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 58fed11316a..bff003d24a4 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -746,40 +746,6 @@ getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level, return GL_TRUE; } - if (_mesa_sizeof_packed_type(type) <= 0) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexImage(type)" ); - return GL_TRUE; - } - - if (_mesa_components_in_format(format) <= 0 || - format == GL_STENCIL_INDEX || - format == GL_COLOR_INDEX) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexImage(format)" ); - return GL_TRUE; - } - - if (!ctx->Extensions.ARB_depth_texture && _mesa_is_depth_format(format)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); - return GL_TRUE; - } - - if (!ctx->Extensions.MESA_ycbcr_texture && _mesa_is_ycbcr_format(format)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); - return GL_TRUE; - } - - if (!ctx->Extensions.EXT_packed_depth_stencil - && _mesa_is_depthstencil_format(format)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); - return GL_TRUE; - } - - if (!ctx->Extensions.ATI_envmap_bumpmap - && _mesa_is_dudv_format(format)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); - return; - } - err = _mesa_error_check_format_and_type(ctx, format, type); if (err != GL_NO_ERROR) { _mesa_error(ctx, err, "glGetTexImage(format/type)");