<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 6, 2017 at 6:36 AM, Samuel Iglesias Gonsálvez <span dir="ltr"><<a href="mailto:siglesias@igalia.com" target="_blank">siglesias@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    
  
  <div><span class=""><div>On Fri, 2017-10-06 at 14:23 +0100, Lionel Landwerlin wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex">
    <div class="m_8490001533273201730moz-cite-prefix">I fixed a similar bug in the vec4
      backend a couple of days ago.<br>
      Can we maybe put this logic somewhere that could reused across
      backends?<br>
      Or maybe a nir pass to add the missing parameters?<br>
      <br>
      Thanks,<br>
      <br>
      -<br>
      Lionel<br>
      <br></div></blockquote><div><br></div></span><div>Right. I think it should be reused across the backends, as it is the sampling</div><div>instruction the one who needs it; but I'm OK with either option.</div></div></blockquote><div><br></div><div>I don't care much where it goes.  I guess we could always add it to nir_lower_tex with a default_lod_0 option.  Or we can just fix it up in both back-ends.  Or we could fix it up here.  The nir_lower_tex option may be the most reliable.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Sam</div><div><div class="h5"><div><br></div><blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div class="m_8490001533273201730moz-cite-prefix">
      On 06/10/17 14:07, Jason Ekstrand wrote:</div><div class="m_8490001533273201730moz-cite-prefix">
    </div>
    <blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex">
      
      <div dir="ltr">
        <div>Is there a test case for this?<br>
          <br>
        </div>
        Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>><br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Fri, Oct 6, 2017 at 2:36 AM, Samuel
          Iglesias Gonsálvez <span dir="ltr"><<a href="mailto:siglesias@igalia.com" target="_blank">siglesias@igalia.com</a>></span>
          wrote:<br>
          <blockquote type="cite" style="margin:0 0 0 .8ex;border-left:2px #729fcf solid;padding-left:1ex">SpvOpImageFetch
            doesn't provide it, so set it to zero.<br>
            <br>
            Signed-off-by: Samuel Iglesias Gonsálvez <<a href="mailto:siglesias@igalia.com" target="_blank">siglesias@igalia.com</a>><br>
            ---<br>
             src/intel/compiler/brw_fs_<wbr>nir.cpp | 9 +++++----<br>
             1 file changed, 5 insertions(+), 4 deletions(-)<br>
            <br>
            diff --git a/src/intel/compiler/brw_fs_<wbr>nir.cpp
            b/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
            index 5b8ccd50bff..25488303c29 100644<br>
            --- a/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
            +++ b/src/intel/compiler/brw_fs_<wbr>nir.cpp<br>
            @@ -4518,11 +4518,12 @@ fs_visitor::nir_emit_texture(<wbr>const
            fs_builder &bld, nir_tex_instr *instr)<br>
                   unreachable("unknown texture opcode");<br>
                }<br>
            <br>
            -   /* TXS and TXL require a LOD but not everything we
            implement using those<br>
            -    * two opcodes provides one.  Provide a default LOD of
            0.<br>
            +   /* TXF, TXS and TXL require a LOD but not everything we
            implement using those<br>
            +    * three opcodes provides one.  Provide a default LOD of
            0.<br>
                 */<br>
            -   if ((opcode == SHADER_OPCODE_TXS_LOGICAL ||<br>
            -        opcode == SHADER_OPCODE_TXL_LOGICAL) &&<br>
            +   if ((opcode == SHADER_OPCODE_TXF_LOGICAL ||<br>
            +         opcode == SHADER_OPCODE_TXS_LOGICAL ||<br>
            +         opcode == SHADER_OPCODE_TXL_LOGICAL) &&<br>
                    srcs[TEX_LOGICAL_SRC_LOD].file == BAD_FILE) {<br>
                   srcs[TEX_LOGICAL_SRC_LOD] = brw_imm_ud(0u);<br>
                }<br>
            <span class="m_8490001533273201730HOEnZb"><font color="#888888">--<br>
                2.13.6<br>
                <br>
                ______________________________<wbr>_________________<br>
                mesa-dev mailing list<br>
                <a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
                <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
              </font></span><br></blockquote>
        </div>
        <br>
      </div>
      <br>
      
      <br>
      <pre>______________________________<wbr>_________________
mesa-dev mailing list
<a class="m_8490001533273201730moz-txt-link-abbreviated" href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a>
<a class="m_8490001533273201730moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  

</blockquote></div></div></div></blockquote></div><br></div></div>