[Piglit] [PATCH 2/4] gl-3.0: Verify that glBindFragDataLocation on a nonexistent varible is ignored

Ian Romanick idr at freedesktop.org
Wed Dec 14 11:29:39 PST 2011


On 12/14/2011 11:17 AM, Chad Versace wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 11/16/2011 01:50 PM, Ian Romanick wrote:
>> From: Ian Romanick<ian.d.romanick at intel.com>
>>
>> This test was created in response to review comments by Paul Berry for
>> the getfragdatalocation test.
>>
>> Signed-off-by: Ian Romanick<ian.d.romanick at intel.com>
>> ---
>>   tests/all.tests                                    |    1 +
>>   tests/spec/gl-3.0/api/CMakeLists.gl.txt            |    1 +
>>   .../gl-3.0/api/bindfragdata-nonexistent-variable.c |  152 ++++++++++++++++++++
>>   3 files changed, 154 insertions(+), 0 deletions(-)
>>   create mode 100644 tests/spec/gl-3.0/api/bindfragdata-nonexistent-variable.c
>
> Really? The spec says that? I can imagine a use case for this, but it is too sloppy for my taste.

I quoted the relevant bit of spec in the test code.  This works the same 
way with glBindAttributeLocation.  Imagine you have an application with 
47,000,000 shaders.  All of the shaders use some combination of vertex, 
normal, color, and texture coordinate as vertex inputs.  Some shaders 
have some inputs but not others, but the application always wants inputs 
with the same name to have the same location.

Do you really want to force application somehow know which subset of 
inputs each shader uses?  That pounding at your door is the angry mob. :)

> Despite my dislike for the spec here, the tests look correct.
> Reviewed-by: Chad Versace<chad.versace at linux.intel.com>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQIcBAEBAgAGBQJO6PZhAAoJEAIvNt057x8iTswQAJ/dFoBhT90cTmjw2YfiRpWm
> Pn1ggBuqMcfa8vWRclmcgpSKsEYV/p+03fWLTRktMCdmFlgG4i4WBSwm31CYxqzg
> d1v9zPtIOwqx16vbDebjZdMkpRDfcpt+NAoiGlgilLhASCDOjyvNz6ku/0pxO2gH
> THTYuocRprB6FCCqG2pVLrvWkpbrqVYxj9jCYvk3cOg6demYSleSPh4oqYi+UIFd
> 3MYx3huzETrGyyYYEujinIw3lJkLejalEKOK1/kBpM48jGV1MSY7s1EWm7ij3/UX
> qf+F7zFaHA2ebepWSlj0AruOOWIaadIHxxxrhK/yiWe5DiEApRSU51ZSmJNN+lgY
> MaDLJQUDWfwxtUGiu/MgPhNxXnSsOehpB+fKZJE3Of90TxDzAKBOez6SwVH+DkSt
> 6FvdOUgWs2RBIqhP+A+ZL1kaeex4pk6bzhkg8JgqcNgwB8036kglUf1n6KMaD5L+
> 37xelAr8mK9BmjTaZgMswictXvkq1gLQuxyaoXfsrGHfeY3ugKNEgaeiaIX53j+H
> ni/1BJLtGiEf5n3M12Y1MD7Dk0yHqcC0fE0QP/ED4JzPalCJHpdcjqGkarGPuGc6
> oITsC0O3sDZPLiJtpfVGs0CFmbsWBPtpMOITfQ+uGJh2s/OVos4Uyo/Cz8yLE8xc
> em7EEwN4cimjj0YVmeCE
> =plmr
> -----END PGP SIGNATURE-----
>


More information about the Piglit mailing list