On 06/07/2012 02:32 PM, Chad Versace wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/06/2012 12:40 PM, Brian Paul wrote:
This is basically code that was in the old integer-texture test.
This test just validates GL error detection for glReadPixels, glDrawPixels,
glTexImage, etc. with regard to signed/unsigned integer formats.
---
  tests/all.tests                         |    1 +
  tests/spec/gl-3.0/api/CMakeLists.gl.txt |    1 +
  tests/spec/gl-3.0/api/integer-errors.c  |  182 +++++++++++++++++++++++++++++++
  3 files changed, 184 insertions(+), 0 deletions(-)
  create mode 100644 tests/spec/gl-3.0/api/integer-errors.c

[snip]

+       /* Check glTexSubImage for invalid format/type combination */
+       {
+               /* make valid texture image here */
+               glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32UI_EXT, 8, 8, 0,
+                            GL_RGBA_INTEGER, GL_UNSIGNED_INT, NULL);
+
+               glTexSubImage2D(GL_TEXTURE_2D, 0,
+                               0, 0, 4, 4,
+                               GL_RGBA_INTEGER, GL_FLOAT, NULL);
+               if (!piglit_check_gl_error(GL_INVALID_ENUM))
+                       return false;
+       }

For the glTexSubImage case, it looks like the test incorrectly passes if the 
first
call to glTexSubImage fails. Placing `if(!piglit_check_gl_error(GL_NO_ERROR)) 
return false`
after the call should fix it.

I'm not sure I follow. Are you concerned that the glTexImage2D() call should not generate an error?

There's only one call to glTexSubImage2D() in the whole test.

-Brian
_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to