[Piglit] [PATCH] ARB_explicit_uniform_location: test inactive uniform interaction

Tapani tapani.palli at intel.com
Tue Mar 25 01:00:17 PDT 2014


On 03/24/2014 01:35 PM, Petri Latvala wrote:
> On 03/24/2014 12:52 PM, Tapani Pälli wrote:
>> Test has a shader with only one uniform which is not used. Test checks
>> that uniform gets its defined explicit location and that there are no
>> errors generated when glUniform is called to update its value.
>>
>> Test test does not pass with GTX 660 running the Nvidia proprietary
>> driver for Linux version 319.32 because the uniform does not get the
>> location.
>>
>
> To my reading of the spec, glGetUniformLocation can return -1 for the 
> inactive explicit-located uniform. And even if it's inactive, no 
> _other_ uniform can get that location.

Yep, I guess -1 and the explicit location would be correct answers. It 
kind of sucks though that it is not explicitly stated. Nvidia behavior 
is that it returns -1 and causes no error for the glUniform1f call. My 
current implementation takes care that we return correct location but if 
we are happy with -1 it would simplify/remove some of the code I had to add.

Thanks;

// Tapani



More information about the Piglit mailing list