r300: Added a warning when texture state update fails.
authorOliver McFadden <z3ro.geek@gmail.com>
Wed, 9 May 2007 03:22:37 +0000 (03:22 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Wed, 9 May 2007 03:22:37 +0000 (03:22 +0000)
src/mesa/drivers/dri/r300/r300_texstate.c

index 14b0c6063b7f4256329e4f8b5b9c408c21aa8d50..b17652e4ddfce25c9813ffe418208e9ce4b3a12a 100644 (file)
@@ -590,15 +590,13 @@ static GLboolean r300UpdateTextureUnit(GLcontext * ctx, int unit)
 
 void r300UpdateTextureState(GLcontext * ctx)
 {
-       GLboolean ok;
-
-       ok = (r300UpdateTextureUnit(ctx, 0) &&
-             r300UpdateTextureUnit(ctx, 1) &&
-             r300UpdateTextureUnit(ctx, 2) &&
-             r300UpdateTextureUnit(ctx, 3) &&
-             r300UpdateTextureUnit(ctx, 4) &&
-             r300UpdateTextureUnit(ctx, 5) &&
-             r300UpdateTextureUnit(ctx, 6) &&
-             r300UpdateTextureUnit(ctx, 7)
-             );
+       int i;
+
+       for (i = 0; i < 8; i++) {
+               if (!r300UpdateTextureUnit(ctx, i)) {
+                       _mesa_warning(ctx,
+                                     "failed to update texture state for unit %d.\n",
+                                     i);
+               }
+       }
 }