radv: Don't emit framebuffer state if there is no renderpass active.

The framebuffer state could still be dirty from when the previous
renderpass was bound.

Fixes: 5632359959 ("radv: Remove the skipping of framebuffer emission if we don't have a framebuffer.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5702
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13969>
This commit is contained in:
Bas Nieuwenhuizen
2021-11-28 13:09:57 +01:00
committed by Marge Bot
parent c3e014670f
commit 577a0a7352

View File

@@ -5586,7 +5586,7 @@ radv_CmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCou
if (secondary->gds_needed)
primary->gds_needed = true;
if (!secondary->state.framebuffer && (primary->state.dirty & RADV_CMD_DIRTY_FRAMEBUFFER)) {
if (!secondary->state.framebuffer && primary->state.pass && (primary->state.dirty & RADV_CMD_DIRTY_FRAMEBUFFER)) {
/* Emit the framebuffer state from primary if secondary
* has been recorded without a framebuffer, otherwise
* fast color/depth clears can't work.