From e98759c7f4c898f084dfe95ba77a833f6e77755c Mon Sep 17 00:00:00 2001 From: Aditya Swarup Date: Tue, 22 Oct 2024 16:11:37 -0700 Subject: [PATCH] anv: Use RCS engine for copying stencil resource for gfx125 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HSD 14021541470 lists a HW bug on blitter engine where the compression pairing bit is not programmed correctly for stencil resources. Use RCS Engine to perform copy instead. Signed-off-by: Aditya Swarup Reviewed-by: Tapani Pälli Part-of: --- src/intel/vulkan/anv_blorp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index 776c8bcca87..1f7f5b6d6aa 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -513,6 +513,8 @@ static bool anv_blorp_execute_on_companion(struct anv_cmd_buffer *cmd_buffer, struct anv_image *dst_image) { + const struct intel_device_info *devinfo = cmd_buffer->device->info; + /* MSAA images have to be dealt with on the companion RCS command buffer * for both CCS && BCS engines. */ @@ -528,6 +530,21 @@ anv_blorp_execute_on_companion(struct anv_cmd_buffer *cmd_buffer, dst_image->emu_plane_format != VK_FORMAT_UNDEFINED) return true; + /* HSD 14021541470: + * The compression pairing bit on blitter engine is not programmed correctly + * for stencil resources. Fallback to RCS engine for performing a copy to + * workaround the issue. + */ + if ((devinfo->verx10 == 125) && + (dst_image->vk.aspects & VK_IMAGE_ASPECT_STENCIL_BIT)) { + + const uint32_t plane = + anv_image_aspect_to_plane(dst_image, VK_IMAGE_ASPECT_STENCIL_BIT); + + if (isl_aux_usage_has_compression(dst_image->planes[plane].aux_usage)) + return true; + } + return false; }