[Mesa-dev] [PATCH 1/2] glsl: Match order of gl_LightSourceParameters elements.

Fabian Bieler fabianbieler at fastmail.fm
Sat Dec 2 20:56:31 UTC 2017


Thanks again for the review. Since I don't have Mesa git access (only
Piglit) a little push would be appreciated. ;)

I'll send the commit IDs to mesa-stable as suggested though I'm not sure
if the gl_NormalScale fix is worth the trouble. I don't think _anyone_
is using that feature.

On 2017-11-29 23:56, Brian Paul wrote:
> Reviewed-by: Brian Paul <brianp at vmware.com>
> 
> I think you could tag both of your patches for the stable branch.
> 
> On 11/23/2017 01:48 PM, Fabian Bieler wrote:
>> spotExponent and spotCosCutoff were swapped in the
>> gl_builtin_uniform_element
>> struct.
>> Now the order matches across gl_builtin_uniform_element,
>> glsl_struct_field and
>> the spec.
>> ---
>>   src/compiler/glsl/builtin_variables.cpp | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/compiler/glsl/builtin_variables.cpp
>> b/src/compiler/glsl/builtin_variables.cpp
>> index 00bc99d..a885f32 100644
>> --- a/src/compiler/glsl/builtin_variables.cpp
>> +++ b/src/compiler/glsl/builtin_variables.cpp
>> @@ -90,9 +90,9 @@ static const struct gl_builtin_uniform_element
>> gl_LightSource_elements[] = {
>>             SWIZZLE_Y,
>>             SWIZZLE_Z,
>>             SWIZZLE_Z)},
>> -   {"spotCosCutoff", {STATE_LIGHT, 0, STATE_SPOT_DIRECTION},
>> SWIZZLE_WWWW},
>> -   {"spotCutoff", {STATE_LIGHT, 0, STATE_SPOT_CUTOFF}, SWIZZLE_XXXX},
>>      {"spotExponent", {STATE_LIGHT, 0, STATE_ATTENUATION}, SWIZZLE_WWWW},
>> +   {"spotCutoff", {STATE_LIGHT, 0, STATE_SPOT_CUTOFF}, SWIZZLE_XXXX},
>> +   {"spotCosCutoff", {STATE_LIGHT, 0, STATE_SPOT_DIRECTION},
>> SWIZZLE_WWWW},
>>      {"constantAttenuation", {STATE_LIGHT, 0, STATE_ATTENUATION},
>> SWIZZLE_XXXX},
>>      {"linearAttenuation", {STATE_LIGHT, 0, STATE_ATTENUATION},
>> SWIZZLE_YYYY},
>>      {"quadraticAttenuation", {STATE_LIGHT, 0, STATE_ATTENUATION},
>> SWIZZLE_ZZZZ},
>>
> 


More information about the mesa-dev mailing list