Bug 25827 - [GLSL] vector constructor accepts too many arguments successfully
[GLSL] vector constructor accepts too many arguments successfully
Product: Mesa
Classification: Unclassified
Component: Mesa core
All All
: medium normal
Assigned To: Ian Romanick
Depends on:
Blocks: 29044
  Show dependency treegraph
Reported: 2009-12-29 19:48 UTC by Gordon Jin
Modified: 2010-08-18 19:33 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Note You need to log in before you can comment on or make changes to this bug.
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);
    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.