From: Topi Pohjolainen Date: Sun, 21 May 2017 04:39:07 +0000 (+0300) Subject: i965/gen4: Set depth offset when there is stencil attachment only X-Git-Tag: upstream/18.1.0~8699 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69672859814f36e9b8756b8f1c4655c49b9f6f4f;p=platform%2Fupstream%2Fmesa.git i965/gen4: Set depth offset when there is stencil attachment only Current version fails to set depthstencil.depth_offset when there is only stencil attachment (it does set the intra tile offsets though). Fixes piglits: g45,g965,ilk: depthstencil-render-miplevels 1024 s=z24_s8 g45,ilk: depthstencil-render-miplevels 273 s=z24_s8 CC: mesa-stable@lists.freedesktop.org Reviewed-by: Jason Ekstrand Signed-off-by: Topi Pohjolainen --- diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c index df52165..bf0a147 100644 --- a/src/mesa/drivers/dri/i965/brw_misc_state.c +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c @@ -432,6 +432,12 @@ brw_workaround_depthstencil_alignment(struct brw_context *brw, brw->depthstencil.stencil_offset = (stencil_draw_y & ~tile_mask_y) * stencil_mt->pitch + (stencil_draw_x & ~tile_mask_x) * 64; + } else if (!depth_irb) { + brw->depthstencil.depth_offset = + intel_miptree_get_aligned_offset( + stencil_mt, + stencil_irb->draw_x & ~tile_mask_x, + stencil_irb->draw_y & ~tile_mask_y); } } }