[Mesa-dev] [PATCH] anv/blorp: Emit depth flush and stall prior to HiZ clears

Chad Versace chadversary at chromium.org
Fri Aug 31 21:48:00 UTC 2018


On Fri 31 Aug 2018, Jason Ekstrand wrote:
> We had the flush/stall after the clear but missed the one that needs to
> go before the clear.
> 
> Cc: mesa-stable at lists.freedesktop.org
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107760
> ---
>  src/intel/vulkan/anv_blorp.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
> index 3dfc8087630..532e8185c0e 100644
> --- a/src/intel/vulkan/anv_blorp.c
> +++ b/src/intel/vulkan/anv_blorp.c
> @@ -1605,6 +1605,16 @@ anv_image_hiz_clear(struct anv_cmd_buffer *cmd_buffer,
>                                     ISL_AUX_USAGE_NONE, &stencil);
>     }
>  
> +   /* From the Sky Lake PRM Volume 7, "Depth Buffer Clear":
> +    *
> +    *    "If other rendering operations have preceded this clear, a

The hw spec is vague, in my opinion. Does this WA apply to only
preceding "rendering operations" to *this* depth buffer? To *any* depth
buffer? To *any* render target at all?

And, does the hiz clear op reset the WA condition? That is, if two
sucessive 3DPRIMITIVEs perform a hiz clear op, does the hw require the
WA before the second one? After all, no true "rendering operations"
occurred between the two.

Ahhhhhh! Why does the specification fail to specify???

Anyway, I convinced myself that genX(blorp_exec) emits the requested
bits before the problematic 3DPRIMITIVE.

Reviewed-by: Chad Versace <chadversary at chromium.org>

> +    *    PIPE_CONTROL with depth cache flush enabled, Depth Stall bit enabled
> +    *    must be issued before the rectangle primitive used for the depth
> +    *    buffer clear operation."
> +    */
> +   cmd_buffer->state.pending_pipe_bits |=
> +      ANV_PIPE_DEPTH_CACHE_FLUSH_BIT | ANV_PIPE_DEPTH_STALL_BIT;
> +
>     blorp_hiz_clear_depth_stencil(&batch, &depth, &stencil,
>                                   level, base_layer, layer_count,
>                                   area.offset.x, area.offset.y,
> -- 
> 2.17.1
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list