[Mesa-dev] [PATCH 2/6] main: Remove redundant NumLayers checks.
Laura Ekstrand
laura at jlekstrand.net
Wed Mar 4 15:44:08 PST 2015
ARB_direct_state_access texture functions that operate on cube maps no longer
need to verify that cube map texture objects contain six texture images
because _mesa_cube_level_complete now does that for them.
---
src/mesa/main/texgetimage.c | 13 -------------
src/mesa/main/teximage.c | 14 --------------
2 files changed, 27 deletions(-)
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index f975c16..42044dd 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -1088,19 +1088,6 @@ _mesa_GetTextureImage(GLuint texture, GLint level, GLenum format,
/* Must handle special case GL_TEXTURE_CUBE_MAP. */
if (texObj->Target == GL_TEXTURE_CUBE_MAP) {
- /* Error checking */
- if (texObj->NumLayers < 6) {
- /* Not enough image planes for a cube map. The spec does not say
- * what should happen in this case because the user has always
- * specified each cube face separately (using
- * GL_TEXTURE_CUBE_MAP_POSITIVE_X+i) in previous GL versions.
- * This is addressed in Khronos Bug 13223.
- */
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetTextureImage(insufficient cube map storage)");
- return;
- }
-
/*
* What do we do if the user created a texture with the following code
* and then called this function with its handle?
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 611d664..cb1c81a 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3636,20 +3636,6 @@ texturesubimage(struct gl_context *ctx, GLuint dims,
if (texObj->Target == GL_TEXTURE_CUBE_MAP) {
GLint rowStride;
- /* Error checking */
- if (texObj->NumLayers < 6) {
- /* Not enough image planes for a cube map. The spec does not say
- * what should happen in this case because the user has always
- * specified each cube face separately (using
- * GL_TEXTURE_CUBE_MAP_POSITIVE_X+i) in previous GL versions.
- * This is addressed in Khronos Bug 13223.
- */
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glTextureSubImage%uD(insufficient cube map storage)",
- dims);
- return;
- }
-
/*
* What do we do if the user created a texture with the following code
* and then called this function with its handle?
--
2.1.0
More information about the mesa-dev
mailing list