[Mesa-stable] [Mesa-dev] [v2 1/7] i965/gen4: Set depth offset when there is stencil attachment only

Jason Ekstrand jason at jlekstrand.net
Thu Jun 15 16:08:21 UTC 2017


On Mon, May 22, 2017 at 12:12 PM, Topi Pohjolainen <
topi.pohjolainen at gmail.com> wrote:

> 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 at lists.freedesktop.org
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_misc_state.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c
> b/src/mesa/drivers/dri/i965/brw_misc_state.c
> index afa7e08..66f8555 100644
> --- a/src/mesa/drivers/dri/i965/brw_misc_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
> @@ -431,6 +431,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);
>

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,

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>


>        }
>     }
>  }
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20170615/0dd4307e/attachment.html>


More information about the mesa-stable mailing list