[Bug 95184] A function local symbols should shadow a global struct symbol.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 28 12:12:26 UTC 2016


            Bug ID: 95184
           Summary: A function local symbols should shadow a global struct
           Product: Mesa
           Version: 11.2
          Hardware: All
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: glsl-compiler
          Assignee: idr at freedesktop.org
          Reporter: corentin at wallez.net
        QA Contact: intel-3d-bugs at lists.freedesktop.org

This a shader compilation error that looks like it might be a bug in Mesa while
running top of tree chromium with --enable-unsafe-es3-apis --use-gl=angle on
You'll find the relevant log below.

Basically a function parameter named S (in int func(int S) below), should
shadow the struct S declaration but the error message seems to indicate that it
didn't and that it tried to parse a constructor.

The same happens with shadowing from a local variable and shadowing from a
local struct declaration.

Note that Mesa (Intel driver) got the translated shader with the mangled names

Please let me know if you need more information.

#version 300 es
precision mediump float;
bool isOk (int a, int b) { return (a == b); }
layout(location = 0) out mediump vec4 dEQP_FragColor;
in float v_in0;
uniform int ref_out0;
int out0;

struct S { int x; };

int func (int S) { return S; }

void main()
    int in0 = int(v_in0 * 1.0025);

    out0 = func(in0);
    bool RES = isOk(out0, ref_out0);
dEQP_FragColor = vec4(RES, RES, RES, 1.0);


#version 300 es
bool webgl_26daf0ef1d00ab6d(in mediump int webgl_2420662cd003acfa, in mediump
int webgl_44a9acbe7629930d){
return (webgl_2420662cd003acfa == webgl_44a9acbe7629930d);
layout(location = 0) out mediump vec4 webgl_341844a501096ec4;
in mediump float webgl_c64db3cf02d35b2e;
uniform mediump int webgl_20b06c95b742317e;
mediump int webgl_50c85a6bbb49f119;
struct webgl_bc2ee2bf060ca60{
mediump int webgl_4fc82888d13de398;
} ;
mediump int webgl_8e5fc8b7c9b6652c(in mediump int webgl_bc2ee2bf060ca60){
return webgl_bc2ee2bf060ca60;
void main(){
mediump int webgl_e4819ca83edf6f18 = int((webgl_c64db3cf02d35b2e * 1.0025001));
(webgl_50c85a6bbb49f119 = webgl_8e5fc8b7c9b6652c(webgl_e4819ca83edf6f18));
bool webgl_64928d1969e45ae2 = webgl_26daf0ef1d00ab6d(webgl_50c85a6bbb49f119,
(webgl_341844a501096ec4 = vec4(webgl_64928d1969e45ae2, webgl_64928d1969e45ae2,
webgl_64928d1969e45ae2, 1.0));

0:13(29): error: syntax error, unexpected ';', expecting '('

You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20160428/a3a8603a/attachment.html>

More information about the intel-3d-bugs mailing list