From 99c69e624b6bb4c52c47ef460ff18fa1f874b36b Mon Sep 17 00:00:00 2001 From: Danylo Piliaiev Date: Thu, 16 Nov 2023 15:55:42 +0100 Subject: [PATCH] freedreno: Disable UBWC for D/S images on A690 Mirrors workaround done for Turnip. A690 seem to have broken UBWC for depth/stencil, it requires depth flushing where we cannot realistically place it, like between ordinary draw calls writing read/depth. WSL blob seem to use ubwc sometimes for depth/stencil. Signed-off-by: Danylo Piliaiev Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_resource.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc b/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc index b0a8b40a1b7..711685c7598 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_resource.cc @@ -68,6 +68,15 @@ ok_ubwc_format(struct pipe_screen *pscreen, enum pipe_format pfmt) break; } + /* A690 seem to have broken UBWC for depth/stencil, it requires + * depth flushing where we cannot realistically place it, like between + * ordinary draw calls writing read/depth. WSL blob seem to use ubwc + * sometimes for depth/stencil. + */ + if (info->a6xx.broken_ds_ubwc_quirk && + util_format_is_depth_or_stencil(pfmt)) + return false; + switch (fd6_color_format(pfmt, TILE6_LINEAR)) { case FMT6_10_10_10_2_UINT: case FMT6_10_10_10_2_UNORM_DEST: