[Mesa-dev] [Bug 29607] New: Global scope re-declarations regression after GLSL2 merge

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Aug 17 03:01:56 PDT 2010


           Summary: Global scope re-declarations regression after GLSL2
           Product: Mesa
           Version: git
          Platform: x86 (IA32)
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: mesa-dev at lists.freedesktop.org
        ReportedBy: cedricv at neonux.com

Compiling the following testcase fail after GLSL2 merge :

const float exp = 1.0; // !!! error: `exp' redeclared

void main()
    const float exp = 1.0; // works (as usual)
    gl_Position = vec4(0.0);


This works if `exp' was redeclared as a function.

However this should work with a re-declaration as variable as well as it used
to be before the merge, the built-in functions scope (where 'exp' is declared)
being the outermost scope, distinct from the shader's global scope, and that
"All variable names, structure type names, and function names in a given scope
share the same name space." (GLSL spec section 4.2).

Other than this small issue, GLSL2 is awesome! :)

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the mesa-dev mailing list