radv: don't check if a subpass has resolve attachments twice
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 18 Jul 2018 14:19:05 +0000 (16:19 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 20 Jul 2018 08:17:13 +0000 (10:17 +0200)
We already check that in radv_cmd_buffer_resolve_subpass().

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

index ad02594614ceb29e50959af8d63b03a701178bfe..2d79cb09fecda019346d76eb30a8351633bcfb19 100644 (file)
@@ -475,18 +475,6 @@ radv_cmd_buffer_resolve_subpass_cs(struct radv_cmd_buffer *cmd_buffer)
        struct radv_meta_saved_state saved_state;
        struct radv_subpass_barrier barrier;
 
-       /* FINISHME(perf): Skip clears for resolve attachments.
-        *
-        * From the Vulkan 1.0 spec:
-        *
-        *    If the first use of an attachment in a render pass is as a resolve
-        *    attachment, then the loadOp is effectively ignored as the resolve is
-        *    guaranteed to overwrite all pixels in the render area.
-        */
-
-       if (!subpass->has_resolve)
-               return;
-
        /* Resolves happen before the end-of-subpass barriers get executed, so
         * we have to make the attachment shader-readable.
         */
index 0e4957b163cbeccb7d2add7de1503e004d4e9a63..3feeb4589718b40e7f2bcb49fbe260fbeb1429c5 100644 (file)
@@ -582,18 +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;
 
-       /* FINISHME(perf): Skip clears for resolve attachments.
-        *
-        * From the Vulkan 1.0 spec:
-        *
-        *    If the first use of an attachment in a render pass is as a resolve
-        *    attachment, then the loadOp is effectively ignored as the resolve is
-        *    guaranteed to overwrite all pixels in the render area.
-        */
-
-       if (!subpass->has_resolve)
-               return;
-
        radv_meta_save(&saved_state, cmd_buffer,
                       RADV_META_SAVE_GRAPHICS_PIPELINE |
                       RADV_META_SAVE_CONSTANTS |