<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Oct 4, 2016 at 8:55 AM, Tapani Pälli <span dir="ltr"><<a href="mailto:tapani.palli@intel.com" target="_blank">tapani.palli@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
    <div>On 10/04/2016 06:09 PM, Jason Ekstrand
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Thu, Sep 29, 2016 at 11:27 PM,
            Xu,Randy <span dir="ltr"><<a href="mailto:randy.xu@intel.com" target="_blank">randy.xu@intel.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Add the
              miptree level/slice x/y_offset when count the surface
              offset<br>
              in brw_emit_surface_state. The surface offset has two
              parts, one is<br>
              from mt->offset, which should be 32 aligned in
              width/height for tiled<br>
              buffer; another is from mt->level[current_level].slice<wbr>[current_slice].<br>
              x/y_offset.<br>
              <br>
              This fix will solve 12 deqp failure<br>
              dEQP-EGL.functional.image.crea<wbr>te.gles2_cubemap_negative_*_<wbr>texture<br>
              <br>
              Signed-off-by: Xu,Randy <<a href="mailto:randy.xu@intel.com" target="_blank">randy.xu@intel.com</a>><br>
              ---<br>
               src/mesa/drivers/dri/i965/<wbr>brw_wm_surface_state.c | 3
              ++-<br>
               1 file changed, 2 insertions(+), 1 deletion(-)<br>
              <br>
              diff --git a/src/mesa/drivers/dri/i965/br<wbr>w_wm_surface_state.c
              b/src/mesa/drivers/dri/i965/br<wbr>w_wm_surface_state.c<br>
              index 61a4b94..3a5c573 100644<br>
              --- a/src/mesa/drivers/dri/i965/br<wbr>w_wm_surface_state.c<br>
              +++ b/src/mesa/drivers/dri/i965/br<wbr>w_wm_surface_state.c<br>
              @@ -85,7 +85,8 @@ brw_emit_surface_state(struct
              brw_context *brw,<br>
                                      unsigned read_domains, unsigned
              write_domains)<br>
               {<br>
                  const struct surface_state_info ss_info =
              surface_state_infos[brw->gen];<br>
              -   uint32_t tile_x = 0, tile_y = 0;<br>
              +   uint32_t tile_x = mt->level[0].slice[0].x_offset<wbr>;<br>
              +   uint32_t tile_y = mt->level[0].slice[0].y_offset<wbr>;<br>
            </blockquote>
            <div><br>
            </div>
            <div>This isn't correct.  First off, there are some fairly
              strict restrictions on what we can do with tile_x and
              tile_y and we can't just shove x/y_offset in there.  We
              need to use intel_miptree_get_tile_offsets to get both a
              byte offset and an intratile offset.  Second, we should
              already be taking slices into account for cube maps via
              base_array_layer where needed.<br>
              <br>
            </div>
            <div>Unfortunately, I'm not 100% sure what the correct patch
              is without a bit more information about what the test is
              doing that causes a problem.<br>
              <br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br></div></div>
    I did take a brief look and when running the set mentioned above
    (for example with ./deqp-egl
--deqp-case=*EGL.functional.<wbr>image.create.gles2_cubemap_<wbr>negative_*_texture)
    what happens is that we never end up to the part of code calling
    intel_miptree_get_tile_offsets in that function (because
    surf.dim_layout != dim_layout condition does not trigger). This is
    just what I observed, should we just call
    intel_miptree_get_tile_<wbr>offsets() unconditionally then?<span class=""><br></span></div></blockquote><div><br></div><div>No.  Very much no.  The intel_miptree_get_tile_offsets() stuff is a hack that lets us convert non-2D things to 2D things and it comes with piles of restrictions.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><span class="">
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div>--Jason<br>
            </div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  uint32_t offset = mt->offset;<br>
              <br>
                  struct isl_surf surf;<br>
              <span><font color="#888888">--<br>
                  2.7.4<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></blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>______________________________<wbr>_________________
mesa-dev mailing list
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a>
<a 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>
  </span></div>

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