<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - gl_arb_shading_language_420pack does not allow binding of image variables"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93266">93266</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>gl_arb_shading_language_420pack does not allow binding of image variables
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>glsl-compiler
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>idr@freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>bugReporter92@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>If I am creating a shader like so:

#version 330
#extension GL_ARB_shader_image_load_store : require
#extension GL_ARB_shading_language_420pack : require

layout(binding = 0, r16ui) uniform readonly uimage2D uZlutImage;
...

This currently gives the error:
"the "binding" qualifier only applies to uniform blocks, opaque variables, or
arrays thereof"
If I set the first line of the shader to "#version 420" it compiles and works
as expected (because both of those extensions are supported in Mesa, so
although I'm using 420 behaviour which isn't yet fully supported in Mesa it
should still be possible. I need to set the environment variable
MESA_GLSL_VERSION_OVERRIDE=420 of course)

In the extension specification for GL_ARB_shading_language_420pack
(<a href="https://www.opengl.org/registry/specs/ARB/shading_language_420pack.txt">https://www.opengl.org/registry/specs/ARB/shading_language_420pack.txt</a>) it
reads
"Add layout qualifier identifier "binding" to bind units to sampler and image
variable declarations." I could be wrong, but I think I should be able to bind
image variables without using the environment variables.

I think the fix here could be as simple as forcing "#extension
GL_ARB_shading_language_420pack" to imply "#version 420". It might be more
complex than that though.

If I'm wrong here, and my interpretation of how to use this extension is false,
do you mind directing me in how to bind image variables using only extensions,
and if that's even possible?

Thank-you very much
Matt
i965 (Ivybridge I think)
Debian Sarge</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>