Mesa (master): mesa: Remove broken assertion about enabled texture targets.

Kenneth Graunke kwg at kemper.freedesktop.org
Tue Jul 30 05:43:07 UTC 2013


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

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Thu Jul 25 14:47:58 2013 -0700

mesa: Remove broken assertion about enabled texture targets.

For GLSL programs, enabledTargets can have more than one bit set.  For
example, a shader that uses sampler2D and samplerCube uniforms will have
both TEXTURE_2D_BIT and TEXTURE_CUBE_BIT set.

The code that sets _ReallyEnabled already handles this, selecting the
"highest priority" texture target.  We should simply use that.

Fixes new Piglit test incomplete-textures-of-multiple-types.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62698
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/main/texstate.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 741985c..afff013 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -594,8 +594,8 @@ update_texture_state( struct gl_context *ctx )
 
       /* Look for the highest priority texture target that's enabled (or used
        * by the vert/frag shaders) and "complete".  That's the one we'll use
-       * for texturing.  If we're using vert/frag program we're guaranteed
-       * that bitcount(enabledBits) <= 1.
+       * for texturing.
+       *
        * Note that the TEXTURE_x_INDEX values are in high to low priority.
        */
       for (texIndex = 0; texIndex < NUM_TEXTURE_TARGETS; texIndex++) {
@@ -624,8 +624,6 @@ update_texture_state( struct gl_context *ctx )
             struct gl_texture_object *texObj;
             gl_texture_index texTarget;
 
-            assert(_mesa_bitcount(enabledTargets) == 1);
-
             texTarget = (gl_texture_index) (ffs(enabledTargets) - 1);
             texObj = _mesa_get_fallback_texture(ctx, texTarget);
             




More information about the mesa-commit mailing list