radv: remove useless radv_meta_{begin,end}_XXX() helpers
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 26 Sep 2017 21:26:19 +0000 (23:26 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 27 Sep 2017 07:26:42 +0000 (09:26 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_meta.h
src/amd/vulkan/radv_meta_bufimage.c
src/amd/vulkan/radv_meta_clear.c
src/amd/vulkan/radv_meta_copy.c

index c7c9a6bd5e19f70c22fda075924d049d3694071c..8a443fa1b176a0d184c717a9c243705bec471ce3 100644 (file)
@@ -153,18 +153,6 @@ void radv_meta_end_blit2d(struct radv_cmd_buffer *cmd_buffer,
 
 VkResult radv_device_init_meta_bufimage_state(struct radv_device *device);
 void radv_device_finish_meta_bufimage_state(struct radv_device *device);
-void radv_meta_begin_bufimage(struct radv_cmd_buffer *cmd_buffer,
-                             struct radv_meta_saved_compute_state *save);
-void radv_meta_end_bufimage(struct radv_cmd_buffer *cmd_buffer,
-                           struct radv_meta_saved_compute_state *save);
-void radv_meta_begin_itoi(struct radv_cmd_buffer *cmd_buffer,
-                         struct radv_meta_saved_compute_state *save);
-void radv_meta_end_itoi(struct radv_cmd_buffer *cmd_buffer,
-                       struct radv_meta_saved_compute_state *save);
-void radv_meta_begin_cleari(struct radv_cmd_buffer *cmd_buffer,
-                           struct radv_meta_saved_compute_state *save);
-void radv_meta_end_cleari(struct radv_cmd_buffer *cmd_buffer,
-                         struct radv_meta_saved_compute_state *save);
 void radv_meta_image_to_buffer(struct radv_cmd_buffer *cmd_buffer,
                               struct radv_meta_blit2d_surf *src,
                               struct radv_meta_blit2d_buffer *dst,
index 96b5c22662271dd39e48fb6e7a154ab950fa713e..b460143df2e9a8926756be8f70cc778ed2767723 100644 (file)
@@ -814,48 +814,6 @@ fail_itob:
        return result;
 }
 
-void
-radv_meta_begin_itoi(struct radv_cmd_buffer *cmd_buffer,
-                    struct radv_meta_saved_compute_state *save)
-{
-       radv_meta_save_compute(save, cmd_buffer, 16);
-}
-
-void
-radv_meta_end_itoi(struct radv_cmd_buffer *cmd_buffer,
-                  struct radv_meta_saved_compute_state *save)
-{
-       radv_meta_restore_compute(save, cmd_buffer, 16);
-}
-
-void
-radv_meta_begin_bufimage(struct radv_cmd_buffer *cmd_buffer,
-                        struct radv_meta_saved_compute_state *save)
-{
-       radv_meta_save_compute(save, cmd_buffer, 12);
-}
-
-void
-radv_meta_end_bufimage(struct radv_cmd_buffer *cmd_buffer,
-                      struct radv_meta_saved_compute_state *save)
-{
-       radv_meta_restore_compute(save, cmd_buffer, 12);
-}
-
-void
-radv_meta_begin_cleari(struct radv_cmd_buffer *cmd_buffer,
-                      struct radv_meta_saved_compute_state *save)
-{
-       radv_meta_save_compute(save, cmd_buffer, 16);
-}
-
-void
-radv_meta_end_cleari(struct radv_cmd_buffer *cmd_buffer,
-                    struct radv_meta_saved_compute_state *save)
-{
-       radv_meta_restore_compute(save, cmd_buffer, 16);
-}
-
 static void
 create_iview(struct radv_cmd_buffer *cmd_buffer,
              struct radv_meta_blit2d_surf *surf,
index 08a6278a5c26e9f5dabb953a7cb51057579a375b..b1cbb505ad08089d49e9eb43b13173abedc22c80 100644 (file)
@@ -1392,7 +1392,7 @@ void radv_CmdClearColorImage(
        bool cs = cmd_buffer->queue_family_index == RADV_QUEUE_COMPUTE;
 
        if (cs)
-               radv_meta_begin_cleari(cmd_buffer, &saved_state.compute);
+               radv_meta_save_compute(&saved_state.compute, cmd_buffer, 16);
        else
                radv_meta_save_graphics_reset_vport_scissor_novertex(&saved_state.gfx, cmd_buffer);
 
@@ -1401,7 +1401,7 @@ void radv_CmdClearColorImage(
                             rangeCount, pRanges, cs);
 
        if (cs)
-               radv_meta_end_cleari(cmd_buffer, &saved_state.compute);
+               radv_meta_restore_compute(&saved_state.compute, cmd_buffer, 16);
        else
                radv_meta_restore(&saved_state.gfx, cmd_buffer);
 }
index 411d0b897459761c0a99ac86542e47a2ba61c6d5..fdef37f39f0fafc6d7433d965b91e046fb87df4f 100644 (file)
@@ -121,7 +121,7 @@ meta_copy_buffer_to_image(struct radv_cmd_buffer *cmd_buffer,
        assert(image->info.samples == 1);
 
        if (cs)
-               radv_meta_begin_bufimage(cmd_buffer, &saved_state.compute);
+               radv_meta_save_compute(&saved_state.compute, cmd_buffer, 12);
        else
                radv_meta_save_graphics_reset_vport_scissor_novertex(&saved_state.gfx, cmd_buffer);
 
@@ -203,7 +203,7 @@ meta_copy_buffer_to_image(struct radv_cmd_buffer *cmd_buffer,
                }
        }
        if (cs)
-               radv_meta_end_bufimage(cmd_buffer, &saved_state.compute);
+               radv_meta_restore_compute(&saved_state.compute, cmd_buffer, 12);
        else
                radv_meta_restore(&saved_state.gfx, cmd_buffer);
 }
@@ -233,7 +233,8 @@ meta_copy_image_to_buffer(struct radv_cmd_buffer *cmd_buffer,
 {
        struct radv_meta_saved_compute_state saved_state;
 
-       radv_meta_begin_bufimage(cmd_buffer, &saved_state);
+       radv_meta_save_compute(&saved_state, cmd_buffer, 12);
+
        for (unsigned r = 0; r < regionCount; r++) {
 
                /**
@@ -303,7 +304,7 @@ meta_copy_image_to_buffer(struct radv_cmd_buffer *cmd_buffer,
                                slice_array++;
                }
        }
-       radv_meta_end_bufimage(cmd_buffer, &saved_state);
+       radv_meta_restore_compute(&saved_state, cmd_buffer, 12);
 }
 
 void radv_CmdCopyImageToBuffer(
@@ -339,7 +340,7 @@ meta_copy_image(struct radv_cmd_buffer *cmd_buffer,
         */
        assert(src_image->info.samples == dest_image->info.samples);
        if (cs)
-               radv_meta_begin_itoi(cmd_buffer, &saved_state.compute);
+               radv_meta_save_compute(&saved_state.compute, cmd_buffer, 16);
        else
                radv_meta_save_graphics_reset_vport_scissor_novertex(&saved_state.gfx, cmd_buffer);
 
@@ -413,7 +414,7 @@ meta_copy_image(struct radv_cmd_buffer *cmd_buffer,
        }
 
        if (cs)
-               radv_meta_end_itoi(cmd_buffer, &saved_state.compute);
+               radv_meta_restore_compute(&saved_state.compute, cmd_buffer, 16);
        else
                radv_meta_restore(&saved_state.gfx, cmd_buffer);
 }