Bug 25827 - [GLSL] vector constructor accepts too many arguments successfully
Summary: [GLSL] vector constructor accepts too many arguments successfully
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: All All
: medium normal
Assignee: Ian Romanick
QA Contact:
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.

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.