<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 - Specifying an explicit location for an array output messes up transform feedback"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104360">104360</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Specifying an explicit location for an array output messes up transform feedback
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>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>Drivers/DRI/i965
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>nroberts@igalia.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=136344" name="attach_136344" title="Test case showing the problem">attachment 136344</a> <a href="attachment.cgi?id=136344&action=edit" title="Test case showing the problem">[details]</a></span>
Test case showing the problem

There is a piglit test called
arb_enhanced_layouts-transform-feedback-layout-qualifiers which tests transform
feedback with a float array output like this:

layout(xfb_offset = 4) out float x2_out[2];

It verifies that the two floats in the array are written out to the XFB buffer
packed tightly together. This works ok and seems to make sense. I have been
trying to get this working with SPIR-V which effectively requires adding an
explicit location. If you do this, then I think Mesa ends up assigning a
separate location to each element of the array which means there will be three
wasted components in each location. This is presumably the correct behaviour.
However, this seems to be also affecting the XFB and the second element no
longer gets written out.

I was thinking maybe the second would get written out with some padding
in-between but this doesn’t seem to be the case. In any case on the proprietary
nVidia driver it continues to write the two values out packed together even
with an explicit location so I don’t think padding them out would be the
correct behaviour.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>