summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-01-21 08:18:07 -0700
committerBrian Paul <[email protected]>2009-01-21 08:18:07 -0700
commit4683cab29a74d6b3cefdd915aaf91e6b4f667d27 (patch)
tree51f2a2276061f081f1e893ed83101c75a1d246eb /src/mesa/main/texstate.c
parent787a001a6774e6fe80623159f32155ce12002a9f (diff)
mesa: add some debug assertions to detect null current texture object pointers
See bug #17895. These assertions could be removed when this is resolved.
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 29955d76cbe..9bfb7e0ec2a 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -517,6 +517,14 @@ update_texture_state( GLcontext *ctx )
enableBits = texUnit->Enabled;
}
+ ASSERT(texUnit->Current1D);
+ ASSERT(texUnit->Current2D);
+ ASSERT(texUnit->Current3D);
+ ASSERT(texUnit->CurrentCubeMap);
+ ASSERT(texUnit->CurrentRect);
+ ASSERT(texUnit->Current1DArray);
+ ASSERT(texUnit->Current2DArray);
+
/* Look for the highest-priority texture target that's enabled and
* complete. That's the one we'll use for texturing. If we're using
* a fragment program we're guaranteed that bitcount(enabledBits) <= 1.