radv: always dirty the framebuffer when restoring a subpass
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 23 May 2019 12:57:07 +0000 (14:57 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 27 May 2019 11:52:36 +0000 (13:52 +0200)
The old code was not wrong because the transitions performed
after the resolves should re-emit the framebuffer if needed.

This change is mostly a no-op but it improves consistency
regarding other meta operations that need to save/restore subpasses.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_meta_resolve.c
src/amd/vulkan/radv_meta_resolve_fs.c

index ade5d43..b9f5106 100644 (file)
@@ -691,7 +691,8 @@ radv_cmd_buffer_resolve_subpass(struct radv_cmd_buffer *cmd_buffer)
                             &(VkExtent2D) { fb->width, fb->height });
        }
 
-       cmd_buffer->state.subpass = subpass;
+       radv_cmd_buffer_set_subpass(cmd_buffer, subpass);
+
        radv_meta_restore(&saved_state, cmd_buffer);
 }
 
index 3c63195..9f20f67 100644 (file)
@@ -632,6 +632,7 @@ radv_cmd_buffer_resolve_subpass_fs(struct radv_cmd_buffer *cmd_buffer)
                             &(VkExtent2D) { fb->width, fb->height });
        }
 
-       cmd_buffer->state.subpass = subpass;
+       radv_cmd_buffer_set_subpass(cmd_buffer, subpass);
+
        radv_meta_restore(&saved_state, cmd_buffer);
 }