mesa: limit number of error raised by invalid GL_TEXTURE_MAX_ANISOTROPY_EXT
authorBrian Paul <brianp@vmware.com>
Wed, 6 May 2009 15:01:47 +0000 (09:01 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 7 May 2009 16:12:32 +0000 (10:12 -0600)
src/mesa/main/texparam.c

index e60ab6aa123a6f105cff51c7b1d3b1eb5bfe8690..2195a334d3ea9fa69dcd4c974d5f5e6b2b5b21bf 100644 (file)
@@ -469,8 +469,10 @@ set_tex_parameterf(GLcontext *ctx,
          return GL_TRUE;
       }
       else {
-         _mesa_error(ctx, GL_INVALID_ENUM,
-                     "glTexParameter(pname=GL_TEXTURE_MAX_ANISOTROPY_EXT)");
+         static GLuint count = 0;
+         if (count++ < 10)
+            _mesa_error(ctx, GL_INVALID_ENUM,
+                        "glTexParameter(pname=GL_TEXTURE_MAX_ANISOTROPY_EXT)");
       }
       return GL_FALSE;