Mesa (master): Revert "main: _mesa_cube_level_complete checks NumLayers."

Laura Ekstrand ldeks at kemper.freedesktop.org
Tue Mar 17 17:09:11 UTC 2015


Module: Mesa
Branch: master
Commit: 44ecf0793d872e771edc448436f7a2fd7c3390f5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=44ecf0793d872e771edc448436f7a2fd7c3390f5

Author: Laura Ekstrand <laura at jlekstrand.net>
Date:   Tue Mar 17 09:43:52 2015 -0700

Revert "main: _mesa_cube_level_complete checks NumLayers."

This reverts commit 1ee000a0b6737d6c140d4f07b6044908b8ebfdc7.
Failures with the GLES3 conformance suite and Synmark2 OGLHdrBloom revealed
that this commit was in error.

Extensive testing with Piglit prior to patch review and upstreaming did not
reveal this problem because, in the few Piglit tests that test for cube
completeness, NumLayers = 6.  This is because all of the existing tests use
TextureStorage to initialize the texture, which sets NumLayers.

A new Piglit test has been sent to the mailing list that reproduces the bug
related to this patch ("texturing: Testing
glGenerateMipmap(GL_TEXTURE_CUBE_MAP) without glTexStorage2D").

Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

---

 src/mesa/main/texobj.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index a99b108..e018ab9 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -879,10 +879,6 @@ _mesa_cube_level_complete(const struct gl_texture_object *texObj,
    if (texObj->Target != GL_TEXTURE_CUBE_MAP)
       return GL_FALSE;
 
-   /* Make sure we have enough image planes for a cube map. */
-   if (texObj->NumLayers < 6)
-      return GL_FALSE;
-
    if ((level < 0) || (level >= MAX_TEXTURE_LEVELS))
       return GL_FALSE;
 




More information about the mesa-commit mailing list