<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: vectorize optimization goes wrong on dot products"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=75224">75224</a>
          </td>
        </tr>

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

        <tr>
          <th>Summary</th>
          <td>GLSL: vectorize optimization goes wrong on dot products
          </td>
        </tr>

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

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

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

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>aras@unity3d.com
          </td>
        </tr>

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

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

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

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

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>"Vectorize multiple scalar assignments" optimization (added in 4bd6e0d7c69 on
master) goes wrong on dot products.

For example, on a fragment shader like this:

varying vec3 inA;
varying vec2 inB;
void main()
{
    vec2 v;
    v.x = dot(inA.xy, inB);
    v.y = dot(inA.yz, inB);
    gl_FragColor = vec4(v.x, v.y, 0.0, 1.0);
}

It produces two problems:

1) tries to vectorize both dots into a v=dot(inA.xy,inB), which is different
result.
2) in the result it ends up with an expression node of vec2 type, but a
ir_binop_dot operation. asserts in ir_validate in debug build.

It feels like these kinds of "horizontal" operations (probably only dot?)
shouldn't be attempted to vectorize.</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>