radv: fix ignoring conditional rendering with vkCmdResolveImage()

This command isn't supposed to be affected by conditional rendering.

This fixes new VKCTS coverage
dEQP-VK.conditional_rendering.conditional_ignore.resolve_image*.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34338>
This commit is contained in:
Samuel Pitoiset 2025-04-02 08:40:27 +02:00 committed by Marge Bot
parent dd1ba74777
commit 4d1d6d4147

View file

@ -407,6 +407,13 @@ radv_CmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2 *
VkImageLayout src_image_layout = pResolveImageInfo->srcImageLayout;
VkImageLayout dst_image_layout = pResolveImageInfo->dstImageLayout;
enum radv_resolve_method resolve_method = pdev->info.gfx_level >= GFX11 ? RESOLVE_FRAGMENT : RESOLVE_HW;
bool old_predicating;
/* VK_EXT_conditional_rendering says that resolve commands should not be affected by conditional
* rendering.
*/
old_predicating = cmd_buffer->state.predicating;
cmd_buffer->state.predicating = false;
/* we can use the hw resolve only for single full resolves */
if (pResolveImageInfo->regionCount == 1) {
@ -432,6 +439,9 @@ radv_CmdResolveImage2(VkCommandBuffer commandBuffer, const VkResolveImageInfo2 *
resolve_image(cmd_buffer, src_image, src_image_layout, dst_image, dst_image_layout, region, resolve_method);
}
/* Restore conditional rendering. */
cmd_buffer->state.predicating = old_predicating;
}
static void