Mesa (main): anv: use shadow surface for stencil input attachment on gfx7
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 15 10:24:16 UTC 2022
Module: Mesa
Branch: main
Commit: 7be6632f7d9a18557d2f75cce607ea17d93313f5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7be6632f7d9a18557d2f75cce607ea17d93313f5
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Wed Sep 1 13:01:11 2021 +0300
anv: use shadow surface for stencil input attachment on gfx7
This fixes a number of tests like :
dEQP-VK.renderpass*.suballocation.multisample.s8_uint.*
dEQP-VK.renderpass*.suballocation.multisample.separate_stencil_usage.d24_unorm_s8_uint.*.test_stencil
dEQP-VK.renderpass*.suballocation.multisample.d24_unorm_s8_uint.*
dEQP-VK.renderpass*.suballocation.multisample.d32_sfloat_s8_uint.*
Because the driver asserts when generating RENDER_SURFACE_STATE with a
8 Valign value for stencil buffer (only 2 & 4 are supported).
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12670>
---
src/intel/vulkan/anv_image.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 7422ccdaf9e..62d14cc3b80 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -360,7 +360,8 @@ anv_image_plane_needs_shadow_surface(const struct intel_device_info *devinfo,
if (devinfo->ver <= 7 &&
plane_format.aspect == VK_IMAGE_ASPECT_STENCIL_BIT &&
- (vk_plane_usage & VK_IMAGE_USAGE_SAMPLED_BIT)) {
+ (vk_plane_usage & (VK_IMAGE_USAGE_SAMPLED_BIT |
+ VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT))) {
/* gfx7 can't sample from W-tiled surfaces. */
return true;
}
More information about the mesa-commit
mailing list