Bug 25827

Summary: [GLSL] vector constructor accepts too many arguments successfully
Product: Mesa Reporter: Gordon Jin <gordon.jin>
Component: Mesa coreAssignee: Ian Romanick <idr>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: medium CC: brianp
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 29044    

Description Gordon Jin 2009-12-29 19:48:37 UTC
GLSL spec 5.4.2 says about vector constructor:
It is an error to provide extra arguments beyond this last used argument.

But mesa passes for:
    vec3 v;
    vec4 v1 = vec4(v,v,v);
or
    int i;
    vec4 v1 = vec4(i,i,i,i,i);

This impacts tests/glslparsertest/shaders/constructor3.V110.frag (though I don't understand why it uses "V110" -- the is defined through V110 to V150)
Comment 1 Eric Anholt 2010-08-17 09:14:20 UTC
Fixed with glsl2 merge.
Comment 2 Gordon Jin 2010-08-18 19:33:29 UTC
verified with mesa master d442a01ac14382d83cdaac87d2832315ceb3e963.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.