Mesa (master): texobj: Remove redundant checks that the texture cube faces match size

Neil Roberts nroberts at kemper.freedesktop.org
Thu Jan 21 21:46:57 UTC 2016


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

Author: Neil Roberts <neil at linux.intel.com>
Date:   Thu Jan 21 17:28:07 2016 +0000

texobj: Remove redundant checks that the texture cube faces match size

The texture mipmap completeness checking code was checking whether all
of the faces have the same size. However this is pointless because the
code just above it checks whether the face has the expected size
calculated for the mipmap level anyway so the error condition could
never be reached. This patch just removes it.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

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

diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 9ce7b4c..e926c7b 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -868,16 +868,6 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
                              img->Depth2);
                   return;
                }
-
-               /* Extra checks for cube textures */
-               if (face > 0) {
-                  /* check that cube faces are the same size */
-                  if (img->Width2 != t->Image[0][i]->Width2 ||
-                      img->Height2 != t->Image[0][i]->Height2) {
-		     incomplete(t, MIPMAP, "CubeMap Image[n][i] bad size");
-		     return;
-		  }
-               }
             }
          }
 




More information about the mesa-commit mailing list