Bug 26000 - [GLSL] allowing different parameter qualifier between the function definition and declaration
[GLSL] allowing different parameter qualifier between the function definition...
Status: VERIFIED FIXED
Product: Mesa
Classification: Unclassified
Component: Mesa core
git
All All
: medium normal
Assigned To: Ian Romanick
:
Depends on:
Blocks: 29044
  Show dependency treegraph
 
Reported: 2010-01-11 23:09 UTC by Gordon Jin
Modified: 2010-08-18 19:42 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Jin 2010-01-11 23:09:30 UTC
GLSL spec section 6.1 says:
"If functions' names and argument types match, then their return type and parameter qualifiers must also match."

But in piglit/tests/glslparsertest/shaders/function9.frag, the parameter qualifier in function declaration and definition doesn't match (note "const"), but it's compiled successfully: 

void function(const in int i);  

void main()
{
    int i;
    function(i);  
}

// function definition has different parameter qualifiers than function declaration
void function(in int i)  
{  
   i = 3;
}
Comment 1 Eric Anholt 2010-08-17 08:42:26 UTC
Fixed with the glsl2 merge.
Comment 2 Gordon Jin 2010-08-18 19:42:50 UTC
verified with mesa master d442a01ac14382d83cdaac87d2832315ceb3e963.