[Mesa-dev] [Bug 106996] Compute shader compiling fails for invalid input layout qualifier used

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jun 22 07:51:40 UTC 2018


            Bug ID: 106996
           Summary: Compute shader compiling fails for invalid input
                    layout qualifier used
           Product: Mesa
           Version: 17.1
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: xinghua.cao at intel.com
        QA Contact: mesa-dev at lists.freedesktop.org

1. Attached file is the source code;
2. build the source code, "gcc -o compileshader compileshader.c -lX11 -lepoxy";
3. run executable file, "./compileshader", mesa explicitly reports "invalid
input layout qualifier used", compute shader compiling fails.

1. I am nearly sure that this issue is not mesa bug. It is possible that my
shader is not correct, but I could not find the root cause, so I file the bug
to get some help.

2. Compute shader is as below, defines a user-defined function, with image type
parameter, if uses "in" key to qualify the parameter, error happens, but if
remove "in" and "out" keys, shader compiling successfully. Quotes OpenGL ES
GLSL 3.1 spec section 6.1.1, "A function parameter declared with no such
qualifier(in, out, inout) means the same thing as specifying in". Here
explicitly specifies "in" key, why reports an error.
#version 310 es
layout(local_size_x=1, local_size_y=1, local_size_z=1) in;
layout(r32ui, binding = 0) uniform readonly highp uimage2D uImage_1;
layout(r32ui, binding = 1) uniform writeonly highp uimage2D uImage_2;
void dataCopy(in readonly highp uimage2D src, out writeonly highp uimage2D dst,
ivec2 pos)
    uvec4 value = imageLoad(src, pos);
    imageStore(dst, pos, value);
void main()
    dataCopy(uImage_1, uImage_2, ivec2(gl_LocalInvocationID.xy));

You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180622/9e627a38/attachment.html>

More information about the mesa-dev mailing list