<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 - ES3-CTS.gtf.GL3Tests.shadow.shadow_execution_vert fails"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91114">91114</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ES3-CTS.gtf.GL3Tests.shadow.shadow_execution_vert fails
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>git
          </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>idr@freedesktop.org
          </td>
        </tr>

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

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>bisected to:
--- 8< ---
2b1cdb0eddb73f62e4848d4b64840067f1f70865 is the first bad commit
commit 2b1cdb0eddb73f62e4848d4b64840067f1f70865
Author: Iago Toral Quiroga <<a href="mailto:itoral@igalia.com">itoral@igalia.com</a>>
Date:   Tue Feb 24 19:02:50 2015 +0100

    i965: Fix textureGrad with cube samplers

    We can't use sampler messages with gradient information (like
    sample_g or sample_d) to deal with this scenario because according
    to the PRM:

    "The r coordinate and its gradients are required only for surface
    types that use the third coordinate. Usage of this message type on
    cube surfaces assumes that the u, v, and gradients have already been
    transformed onto the appropriate face, but still in [-1,+1] range.
    The r coordinate contains the faceid, and the r gradients are ignored
    by hardware."

    Instead, we should lower this to compute the LOD manually based on the
    gradients and use a different sample message that takes the computed
    LOD instead of the gradients. This is already being done in
    brw_lower_texture_gradients.cpp, but it is restricted to shadow
    samplers only, although there is a comment stating that we should
    probably do this also for samplerCube and samplerCubeArray.

    Because of this, both dEQP and Piglit test cases for textureGrad with
    cube maps currently fail.

    This patch does two things:
    1) Activates the texturegrad lowering pass for all cube samplers.
    2) Corrects the computation of the LOD value for cube samplers.

    I had to do 2) because for cube maps the calculations implemented
    in the lowering pass always compute a value of rho that is twice
    the value we want (so we get a LOD value one unit larger than we
    want). This only happens for cube map samplers (all kinds). I am
    not sure about why we need to do this, but I suspect that it is
    related to the fact that cube map coordinates, when transported
    to a specific face in the cube, are in the range [-1, 1] instead of
    [0, 1] so we probably need to divide the derivatives by 2 when
    we compute the LOD. Doing that would produce the same result as
    dividing the final rho computation by 2 (or removing a unit
    from the computed LOD, which is what we are doing here).

    Fixes the following piglit tests:
    bin/tex-miplevel-selection textureGrad Cube -auto -fbo
    bin/tex-miplevel-selection textureGrad CubeArray -auto -fbo
    bin/tex-miplevel-selection textureGrad CubeShadow -auto -fbo

    Fixes 10 dEQP tests in the following category:
    dEQP-GLES3.functional.shaders.texture_functions.texturegrad.*cube*

    Reviewed-by: Ben Widawsky <<a href="mailto:ben@bwidawsk.net">ben@bwidawsk.net</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>