<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:apuentes@igalia.com" title="Antia Puentes <apuentes@igalia.com>"> <span class="fn">Antia Puentes</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - GL45-CTS.vertex_attrib_binding.basic-inputL-case1 fails"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=97287">bug 97287</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - GL45-CTS.vertex_attrib_binding.basic-inputL-case1 fails"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=97287#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - GL45-CTS.vertex_attrib_binding.basic-inputL-case1 fails"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=97287">bug 97287</a>
              from <span class="vcard"><a class="email" href="mailto:apuentes@igalia.com" title="Antia Puentes <apuentes@igalia.com>"> <span class="fn">Antia Puentes</span></a>
</span></b>
        <pre>This bug should be fixed by commit:

commit 61a8a55f557784c8ec17fb1758775c6f18252201
Author: Antia Puentes <<a href="mailto:apuentes@igalia.com">apuentes@igalia.com</a>>
Date:   Fri Oct 21 11:40:11 2016 +0200

    i965/gen8: Fix vertex attrib upload for dvec3/4 shader inputs

    The emission of vertex attributes corresponding to dvec3 and dvec4
    vertex shader input variables was not correct when the <size> passed
    to the VertexAttribL* commands was <= 2.

    This was because we were using the vertex array size when emitting vertices
    to decide if we uploaded a 64-bit floating point attribute as 1 slot
(128-bits)
    for sizes 1 and 2, or 2 slots (256-bits) for sizes 3 and 4. This caused
problems
    when mapping the input variables to registers because, for deciding which
    registers contain the values uploaded for a certain variable, we use the
size
    and type given to the variable in the shader, so we will be assigning
256-bits
    to dvec3/4 variables, even if we only uploaded 128-bits for them, which
happened
    when the vertex array size was <= 2.

    The patch uses the shader information to only emit as 128-bits those 64-bit
floating
    point variables that were declared as double or dvec2 in the vertex shader.
Dvec3 and
    dvec4 variables will be always uploaded as 256-bits, independently of the
<size> given
    to the VertexAttribL* command.

    From the ARB_vertex_attrib_64bit specification:

       "For the 64-bit double precision types listed in Table X.1, no default
        attribute values are provided if the values of the vertex attribute
variable
        are specified with fewer components than required for the attribute
        variable. For example, the fourth component of a variable of type dvec4
        will be undefined if specified using VertexAttribL3dv or using a vertex
        array specified with VertexAttribLPointer and a size of three."

    We are filling these unspecified components with zeros, which
coincidentally is
    also what the GL44-CTS.vertex_attrib_binding.basic-inputL-case1 expects.

    v2: Do not use bitcount (Kenneth Graunke)

    Fixes: GL44-CTS.vertex_attrib_binding.basic-inputL-case1 test

    Bugzilla: <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - GL45-CTS.vertex_attrib_binding.basic-inputL-case1 fails"
   href="show_bug.cgi?id=97287">https://bugs.freedesktop.org/show_bug.cgi?id=97287</a>
    Reviewed-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>></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>