Mesa (main): radv: Don't emit framebuffer state if there is no renderpass active.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Dec 2 01:13:33 UTC 2021


Module: Mesa
Branch: main
Commit: 577a0a73527b684d4b309f3328da6f07951a29de
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=577a0a73527b684d4b309f3328da6f07951a29de

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Sun Nov 28 13:09:57 2021 +0100

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: 5632359959f ("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 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13969>

---

 src/amd/vulkan/radv_cmd_buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 5ce3356fb57..ead18219fb0 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -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.



More information about the mesa-commit mailing list