Mesa (staging/21.3): radv: disable HTILE for D32S8 format and mipmaps on GFX10
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Nov 18 19:01:42 UTC 2021
Module: Mesa
Branch: staging/21.3
Commit: 07c68d78b52e6db967c960b7844d0ba8c405bff5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=07c68d78b52e6db967c960b7844d0ba8c405bff5
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Tue Nov 16 11:08:15 2021 +0100
radv: disable HTILE for D32S8 format and mipmaps on GFX10
Stencil texturing with HTILE doesn't work with mipmapping on Navi10-14,
it's a hw bug. RadeonSI and PAL have a workaround too.
This fixes 35 piglit failures with Zink on Navi10.
Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13814>
(cherry picked from commit 341278f069a54a173fa646b16e0b68eefd28e5ed)
---
.pick_status.json | 2 +-
src/amd/vulkan/radv_image.c | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/.pick_status.json b/.pick_status.json
index bf653724bf2..49a087b76e4 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -4,7 +4,7 @@
"description": "radv: disable HTILE for D32S8 format and mipmaps on GFX10",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 5430f94794e..cd5a782d395 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -352,6 +352,11 @@ radv_use_htile_for_image(const struct radv_device *device, const struct radv_ima
bool use_htile_for_mips =
image->info.array_size == 1 && device->physical_device->rad_info.chip_class >= GFX10;
+ /* Stencil texturing with HTILE doesn't work with mipmapping on Navi10-14. */
+ if (device->physical_device->rad_info.chip_class == GFX10 &&
+ image->vk_format == VK_FORMAT_D32_SFLOAT_S8_UINT && image->info.levels > 1)
+ return false;
+
/* Do not enable HTILE for very small images because it seems less performant but make sure it's
* allowed with VRS attachments because we need HTILE.
*/
More information about the mesa-commit
mailing list