<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 22, 2017 at 12:12 PM, Topi Pohjolainen <span dir="ltr"><<a href="mailto:topi.pohjolainen@gmail.com" target="_blank">topi.pohjolainen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Current version fails to set depthstencil.depth_offset when there<br>
is only stencil attachment (it does set the intra tile offsets<br>
though). Fixes piglits:<br>
<br>
g45,g965,ilk:   depthstencil-render-miplevels 1024 s=z24_s8<br>
g45,ilk:        depthstencil-render-miplevels 273 s=z24_s8<br>
<br>
CC: <a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.<wbr>org</a><br>
Signed-off-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
---<br>
 src/mesa/drivers/dri/i965/brw_<wbr>misc_state.c | 6 ++++++<br>
 1 file changed, 6 insertions(+)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_misc_state.c b/src/mesa/drivers/dri/i965/<wbr>brw_misc_state.c<br>
index afa7e08..66f8555 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_misc_state.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_misc_state.c<br>
@@ -431,6 +431,12 @@ brw_workaround_depthstencil_<wbr>alignment(struct brw_context *brw,<br>
          brw->depthstencil.stencil_<wbr>offset =<br>
             (stencil_draw_y & ~tile_mask_y) * stencil_mt->pitch +<br>
             (stencil_draw_x & ~tile_mask_x) * 64;<br>
+      } else if (!depth_irb) {<br>
+         brw->depthstencil.depth_offset =<br>
+            intel_miptree_get_aligned_<wbr>offset(<br>
+               stencil_mt,<br>
+               stencil_irb->draw_x & ~tile_mask_x,<br>
+               stencil_irb->draw_y & ~tile_mask_y);<br></blockquote><div><br></div><div>We don't do separate stencil on gen4-5 so the "if" case will never trigger.  Feel free to delete more code if you'd like.  Or, you can leave it as is.  Either way,<br><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
       }<br>
    }<br>
 }<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.9.3<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">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>