From ce6dbc0417586cc1ceb015b631384ffdfb22e981 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 May 2019 14:01:58 -0700 Subject: mesa: Remove proxy image checks for maximum level. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We've already verified this by _mesa_legal_texture_dimensions() before this call. Reviewed-by: Marek Olšák --- src/mesa/main/teximage.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index edcb48d9a6d..7d32c7b2db9 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -423,23 +423,15 @@ get_proxy_tex_image(struct gl_context *ctx, GLenum target, GLint level) switch (target) { case GL_PROXY_TEXTURE_1D: - if (level >= ctx->Const.MaxTextureLevels) - return NULL; texIndex = TEXTURE_1D_INDEX; break; case GL_PROXY_TEXTURE_2D: - if (level >= ctx->Const.MaxTextureLevels) - return NULL; texIndex = TEXTURE_2D_INDEX; break; case GL_PROXY_TEXTURE_3D: - if (level >= ctx->Const.Max3DTextureLevels) - return NULL; texIndex = TEXTURE_3D_INDEX; break; case GL_PROXY_TEXTURE_CUBE_MAP: - if (level >= ctx->Const.MaxCubeTextureLevels) - return NULL; texIndex = TEXTURE_CUBE_INDEX; break; case GL_PROXY_TEXTURE_RECTANGLE_NV: @@ -448,28 +440,18 @@ get_proxy_tex_image(struct gl_context *ctx, GLenum target, GLint level) texIndex = TEXTURE_RECT_INDEX; break; case GL_PROXY_TEXTURE_1D_ARRAY_EXT: - if (level >= ctx->Const.MaxTextureLevels) - return NULL; texIndex = TEXTURE_1D_ARRAY_INDEX; break; case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - if (level >= ctx->Const.MaxTextureLevels) - return NULL; texIndex = TEXTURE_2D_ARRAY_INDEX; break; case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY: - if (level >= ctx->Const.MaxCubeTextureLevels) - return NULL; texIndex = TEXTURE_CUBE_ARRAY_INDEX; break; case GL_PROXY_TEXTURE_2D_MULTISAMPLE: - if (level > 0) - return 0; texIndex = TEXTURE_2D_MULTISAMPLE_INDEX; break; case GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY: - if (level > 0) - return 0; texIndex = TEXTURE_2D_MULTISAMPLE_ARRAY_INDEX; break; default: -- cgit v1.2.3