Module: Mesa Branch: main Commit: 2fd5aa79b2d4fb2daa42ed4c20f4eaf7cf18af2b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2fd5aa79b2d4fb2daa42ed4c20f4eaf7cf18af2b
Author: Samuel Pitoiset <[email protected]> Date: Tue May 17 13:28:02 2022 +0200 radv: use the fragment resolve path by default on GFX11 GFX11 doesn't support CB_RESOLVE which means it doesn't support the hardware resolve path. If necessary (for arrays or integer formats) the driver will select the compute path. No CTS regressions by forcing the fragment resolve path on GFX10.3 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timur Kristóf <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16557> --- src/amd/vulkan/radv_meta_resolve.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_meta_resolve.c b/src/amd/vulkan/radv_meta_resolve.c index a72c1242c76..e37bb6fad78 100644 --- a/src/amd/vulkan/radv_meta_resolve.c +++ b/src/amd/vulkan/radv_meta_resolve.c @@ -548,7 +548,10 @@ radv_CmdResolveImage2(VkCommandBuffer commandBuffer, RADV_FROM_HANDLE(radv_image, dst_image, pResolveImageInfo->dstImage); VkImageLayout src_image_layout = pResolveImageInfo->srcImageLayout; VkImageLayout dst_image_layout = pResolveImageInfo->dstImageLayout; - enum radv_resolve_method resolve_method = RESOLVE_HW; + const struct radv_physical_device *pdevice = cmd_buffer->device->physical_device; + enum radv_resolve_method resolve_method = + pdevice->rad_info.gfx_level >= GFX11 ? RESOLVE_FRAGMENT : RESOLVE_HW; + /* we can use the hw resolve only for single full resolves */ if (pResolveImageInfo->regionCount == 1) { if (pResolveImageInfo->pRegions[0].srcOffset.x || @@ -648,8 +651,10 @@ radv_cmd_buffer_resolve_subpass_hw(struct radv_cmd_buffer *cmd_buffer) void radv_cmd_buffer_resolve_subpass(struct radv_cmd_buffer *cmd_buffer) { + const struct radv_physical_device *pdevice = cmd_buffer->device->physical_device; const struct radv_subpass *subpass = cmd_buffer->state.subpass; - enum radv_resolve_method resolve_method = RESOLVE_HW; + enum radv_resolve_method resolve_method = + pdevice->rad_info.gfx_level >= GFX11 ? RESOLVE_FRAGMENT : RESOLVE_HW; if (!subpass->has_color_resolve && !subpass->ds_resolve_attachment) return;
