From 508f044d41753d5e33ef38e088768a620d69326f Mon Sep 17 00:00:00 2001 From: Jarred Davies Date: Mon, 9 Dec 2024 13:56:15 +0000 Subject: [PATCH] pvr: Disable PBE resolve on cores without gs_rta_support On cores without gs_rta_support, PBE resolves might depend on writes that occur within the deferred RTA clears that happen after the PBE has written. Since the driver can't know at renderpass creation whether RTA clears are needed, PBE resolves must be disabled. Fix for deqp-vk: dEQP-VK.api.image_clearing.*.clear_color_attachment.multiple_layers.* Signed-off-by: Jarred Davies Acked-by: Erik Faye-Lund Part-of: --- src/imagination/vulkan/pvr_pass.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/imagination/vulkan/pvr_pass.c b/src/imagination/vulkan/pvr_pass.c index e8fd2b98b4f..45aae86c00d 100644 --- a/src/imagination/vulkan/pvr_pass.c +++ b/src/imagination/vulkan/pvr_pass.c @@ -564,6 +564,7 @@ VkResult pvr_CreateRenderPass2(VkDevice _device, { struct pvr_render_pass_attachment *attachments; PVR_FROM_HANDLE(pvr_device, device, _device); + const struct pvr_device_info *dev_info = &device->pdevice->dev_info; struct pvr_render_subpass *subpasses; const VkAllocationCallbacks *alloc; size_t subpass_attachment_count; @@ -636,10 +637,17 @@ VkResult pvr_CreateRenderPass2(VkDevice _device, attachment->vk_format = desc->format; attachment->sample_count = desc->samples; attachment->initial_layout = desc->initialLayout; + attachment->index = i; + + /* On cores without gs_rta_support, PBE resolves might depend on writes + * that occur within the deferred RTA clears that happen after the PBE has + * written. Since the driver doesn't know at renderpass creation whether + * RTA clears are needed, PBE resolves can't be used. + */ attachment->is_pbe_downscalable = + PVR_HAS_FEATURE(dev_info, gs_rta_support) && pvr_format_is_pbe_downscalable(&device->pdevice->dev_info, attachment->vk_format); - attachment->index = i; if (attachment->sample_count > pass->max_sample_count) pass->max_sample_count = attachment->sample_count;