[Piglit] [PATCH 1/2] integer-errors: check error detection for integer-related images

Chad Versace chad.versace at linux.intel.com
Fri Jun 8 10:03:22 PDT 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/07/2012 03:40 PM, Brian Paul wrote:
> 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.

I misspoke. I was concerned that if glTexImage2D produces GL_INVALID_ENUM and glTexSubImage2D
produces no error, then the test would still pass.

- ----
Chad Versace
chad.versace at linux.intel.com


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJP0jBZAAoJEAIvNt057x8iDf8P/07Jx2QqgFWqQBWvG5YO1QVG
gRkh21qXJCyKu0PuBcO8HSdbtNIf3tZI5CyG8pINeeI4adWDwfohzcMh0neDRecu
3YVfMwud2TWC7ANnPSXGL9TR6Cg/MKySU/9aTsjRCThkwBZAftQV4UqRgW7YiWv2
jLLFHidUGWNIi9EI6TA7JwliPY8IS0/y2USUxBLfbFd5x1U4lzNRoZcJa1DePnBZ
0EopB3iK8vzw/p4pJlpa0TO51f79wtV3/GqcH2fZg1jd+lpvrrm5pSUJkvzG53zo
/s/tsltYAw+/b1rabiiP2GPMyaf/ctPjfwjBVuPi4MTdOsYm4R8QXQSAY5nEO3WG
63ZTsXWl52egT4yaluIVhlI8tp32Jn8PPxy0qeX0L821mrXj5t3YRMK0Ty+s7hqJ
fTGj7/kW7fXoxWL3uQErCk9V0gbaDwyyHnBQgz5n3++9MqUqGvmpmOxvPJw6KPKB
LkdSALgbMR4Lz+PbzOBwIrikZp66SHQ1ogVq6vUzxBg++qWyq7UwCUdyDiG07QkK
kc44F6nyD1ziunO5xS8DIeJTAOSZq1Yg7u+gsnlh3yThpnStcNgMsTAnhhNfA5sb
YUNyUtUyyaDoje6hvEfUP8TkwCWRHD64ErJZqSF5wdQI/CjitVoKsKfx6hi2x+rE
PWuK5p8n9NB+0hZSKkI4
=ACrX
-----END PGP SIGNATURE-----


More information about the Piglit mailing list