<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - GLSL compiler ignores layout(binding=N) on uniform blocks"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=76323">76323</a>
          </td>
        </tr>

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

        <tr>
          <th>Summary</th>
          <td>GLSL compiler ignores layout(binding=N) on uniform blocks
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>github@socker.lepus.uberspace.de
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>10.1
          </td>
        </tr>

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

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=96005" name="attach_96005" title="minimal example using glfw and glm">attachment 96005</a> <a href="attachment.cgi?id=96005&action=edit" title="minimal example using glfw and glm">[details]</a></span>
minimal example using glfw and glm

Hi Folks,

it seems that the GLSL compiler (or maybe some other component) simply ignores
a layout(binding=N) specifier on uniform blocks. This means, no matter what you
set there, the binding is always overridden by some default value (when having
a single uniform block it seems to be always 0).

I've attached a simple test program (could be a little simpler, I just copied
stuff together from my projects) that demonstrates the bug. The program either
works when binding the uniform buffer to binding point 0, or when manually
setting the shaders bind point with glUniformBlockBinding.

Tested on a Intel HD4000 with Mesa 10.0.3 and Mesa 10.1.0 on Arch Linux. Tried
Kernels 3.13.5 and 3.13.6. The program works on a nVidia GeForce 9600 GT with
the proprietary driver (haven't tested nouveau yet).

Regards</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>