radv: save current state just before resolving with FS
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 18 Jul 2018 14:19:06 +0000 (16:19 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 20 Jul 2018 08:17:15 +0000 (10:17 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_meta_resolve_fs.c

index 3feeb4589718b40e7f2bcb49fbe260fbeb1429c5..7c6ddf513c56d251042c7d81c0c54dde45e68bf7 100644 (file)
@@ -582,11 +582,6 @@ radv_cmd_buffer_resolve_subpass_fs(struct radv_cmd_buffer *cmd_buffer)
        struct radv_meta_saved_state saved_state;
        struct radv_subpass_barrier barrier;
 
-       radv_meta_save(&saved_state, cmd_buffer,
-                      RADV_META_SAVE_GRAPHICS_PIPELINE |
-                      RADV_META_SAVE_CONSTANTS |
-                      RADV_META_SAVE_DESCRIPTORS);
-
        /* Resolves happen before the end-of-subpass barriers get executed,
         * so we have to make the attachment shader-readable */
        barrier.src_stage_mask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
@@ -597,6 +592,11 @@ radv_cmd_buffer_resolve_subpass_fs(struct radv_cmd_buffer *cmd_buffer)
 
        radv_decompress_resolve_subpass_src(cmd_buffer);
 
+       radv_meta_save(&saved_state, cmd_buffer,
+                      RADV_META_SAVE_GRAPHICS_PIPELINE |
+                      RADV_META_SAVE_CONSTANTS |
+                      RADV_META_SAVE_DESCRIPTORS);
+
        for (uint32_t i = 0; i < subpass->color_count; ++i) {
                struct radv_subpass_attachment src_att = subpass->color_attachments[i];
                struct radv_subpass_attachment dest_att = subpass->resolve_attachments[i];