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

Chad Versace chad.versace at linux.intel.com
Wed Dec 14 12:09:14 PST 2011


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

On 12/14/2011 11:29 AM, Ian Romanick wrote:
> On 12/14/2011 11:17 AM, Chad Versace wrote:
> 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. :)

When I said "Really? The spec says that?", I was just expressing my surprise. I did double-check the spec.

That was the use case I had in mind, and it definitely makes life easier for the GL programmer. But, glBindFragDataLocation's laziness still bothers me. Oh well.

- ----
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/

iQIcBAEBAgAGBQJO6QJpAAoJEAIvNt057x8iexIP/RaK9MAIMC5YJoFQc+r01lko
LN8LwFQZgwqhw+STYGzifIkBc/6NR1SI5lithpZxEFo4zOXsRtYOdJ/RumkX8ztV
PgjO7AVV17jIjiQl1cU7np6TTCEbUlu1Rkf+6KCpgdYokp9UErILWfpsNA+Trs9b
RRbNzdq4MbS7+XV7fNBhnOD/4zOqRz3jXG/e9Oo82xZ2FApbdU0nGxLulGKJgvvG
O2uGCnW8ZrfFV2/JTIC+yito5U6nLBuTKTJ7Vie2DbnU7s+bAz5HAAyI6ysJIRbV
OD/BM5sGx4GptDmJX4zQMKCeBZbMB2MQCA3Yl6JO9N9/3aOqICePru4me9zw42tF
orxg/udBlJ4U8Cuo+zWqsjICl8q5wo5CgqW0O40aQsn5UdDq/BVD/TjQqHp2yHM2
06UjdaolzkE7adrsuDyrINz2OAenhcSoJZ8dKh7kuxIXr0a8fzyCFiPaXpsQheoy
Oevd+AiQjwtQOlo4sYCejazuKn5yXSVPElQLJnDKFBbvfxsEFQP5Ijp4yy7zP+xv
UYGW4pXUQSjs8Xtd6IGJoY2/qs/L6RjdGLSA4d8CH6zW5edoqibjttOk5zPBk4XY
UTo3OdRPYK3eIAqFalwTe2d1BfJ/cWqjDAkmSSQ8//5vNs/KGzYJrUiB+enw+HRo
LkL622uQREJl0BZQofb1
=y1uH
-----END PGP SIGNATURE-----


More information about the Piglit mailing list