radv: suspend/resume dynamic rendering completely
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

The Vulkan spec says:
    "The contents of pRenderingInfo must match between suspended
     render pass instances and the render pass instances that resume
     them, other than the presence or absence of the0
     VK_RENDERING_RESUMING_BIT, VK_RENDERING_SUSPENDING_BIT, and
     VK_RENDERING_CONTENTS_SECONDARY_COMMAND_BUFFERS_BIT flags. No
     action or synchronization commands, or other render pass
     instances, are allowed between suspending and resuming render
     pass instances. All pairs of resuming and suspending render passes
     must be submitted in the same batch. "

So it should be safe to avoid re-emitting the rendering state because
nothing can blow it up.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40004>
This commit is contained in:
Samuel Pitoiset 2026-02-20 09:46:09 +01:00 committed by Marge Bot
parent e6523feed9
commit 06949b74eb

View file

@ -10111,6 +10111,9 @@ radv_CmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo *pRe
const uint32_t maxx = minx + render->area.extent.width;
const uint32_t maxy = miny + render->area.extent.height;
if (pRenderingInfo->flags & VK_RENDERING_RESUMING_BIT)
return;
radeon_check_space(device->ws, cs->b, 10);
radeon_begin(cs);
@ -10151,8 +10154,7 @@ radv_CmdBeginRendering(VkCommandBuffer commandBuffer, const VkRenderingInfo *pRe
radv_emit_framebuffer_state(cmd_buffer);
if (!(pRenderingInfo->flags & VK_RENDERING_RESUMING_BIT))
radv_cmd_buffer_clear_rendering(cmd_buffer, pRenderingInfo);
radv_cmd_buffer_clear_rendering(cmd_buffer, pRenderingInfo);
}
VKAPI_ATTR void VKAPI_CALL