[Mesa-dev] [PATCH 1/2] radv: remove useless radv_meta_{begin, end}_XXX() helpers

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Wed Sep 27 03:43:22 UTC 2017


For the series:

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

On Tue, Sep 26, 2017 at 2:26 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/amd/vulkan/radv_meta.h          | 12 -----------
>  src/amd/vulkan/radv_meta_bufimage.c | 42 -------------------------------------
>  src/amd/vulkan/radv_meta_clear.c    |  4 ++--
>  src/amd/vulkan/radv_meta_copy.c     | 13 ++++++------
>  4 files changed, 9 insertions(+), 62 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_meta.h b/src/amd/vulkan/radv_meta.h
> index c7c9a6bd5e..8a443fa1b1 100644
> --- a/src/amd/vulkan/radv_meta.h
> +++ b/src/amd/vulkan/radv_meta.h
> @@ -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,
> diff --git a/src/amd/vulkan/radv_meta_bufimage.c b/src/amd/vulkan/radv_meta_bufimage.c
> index 96b5c22662..b460143df2 100644
> --- a/src/amd/vulkan/radv_meta_bufimage.c
> +++ b/src/amd/vulkan/radv_meta_bufimage.c
> @@ -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,
> diff --git a/src/amd/vulkan/radv_meta_clear.c b/src/amd/vulkan/radv_meta_clear.c
> index 08a6278a5c..b1cbb505ad 100644
> --- a/src/amd/vulkan/radv_meta_clear.c
> +++ b/src/amd/vulkan/radv_meta_clear.c
> @@ -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);
>  }
> diff --git a/src/amd/vulkan/radv_meta_copy.c b/src/amd/vulkan/radv_meta_copy.c
> index 411d0b8974..fdef37f39f 100644
> --- a/src/amd/vulkan/radv_meta_copy.c
> +++ b/src/amd/vulkan/radv_meta_copy.c
> @@ -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);
>  }
> --
> 2.14.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list