[Mesa-dev] glsl2 compiler regression

Thomas Jones thomas.jones at utoronto.ca
Wed Aug 11 12:01:03 PDT 2010


On 10-08-11 02:23 PM, Kenneth Graunke wrote:
> On Wednesday 11 August 2010 10:13:13 Thomas Jones wrote:
>    
>> This shader does
>>      
> not compile with glsl2 and did with the old one
>    
>> #version 110
>> void
>>      
> main() {
>    
>>       gl_TexCoord[1] = gl_MultiTexCoord0*2-1;
>>       gl_Position =
>>      
> gl_Vertex;
>    
>> }
>>
>> The compiler gives the message:
>>
>> 0:5(38): error:
>>      
> Could not implicitly convert operands to arithmetic
>    
>> operator 0:5(40):
>>      
> error: Operands to arithmetic operators must be numeric
>    
>> If I change the
>>      
> #version 110 to #version 120 it works
>
> This is correct behavior.  GLSL 1.10
> explicitly forbids implicit conversions; they were added in 1.20.  So you'll
> either need to use version 1.20 or do gl_MultiTexCoord0 * 2.0 -
> 1.0.
>
> --Kenneth
>    
ah I see, the error message isn't terribly helpful for figuring out
what the real problem is... it should probably not say that they
must be numeric (since both operands are numbers...)

Also I think at least ATI's compiler accepted the shader (I don't
remember for sure if I've tested this version of it on a machine
with proprietary drivers or not) so if it actually does (and NVIDIA
too) it might be a problem...


More information about the mesa-dev mailing list