Module: Mesa
Branch: main
Commit: 887ac765bbd0829ff6ad0714592c4c58c5f6aeac
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=887ac765bbd0829ff6ad0714592c4c58c5f6aeac

Author: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Date:   Tue Jan  2 15:48:09 2024 +0100

radv: remove duplicated si_tile_mode_index() function

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26854>

---

 src/amd/vulkan/radv_device.c     | 9 ---------
 src/amd/vulkan/radv_image.c      | 9 +++++++++
 src/amd/vulkan/radv_image_view.c | 9 ---------
 src/amd/vulkan/radv_private.h    | 2 ++
 4 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 0da0a60ce86..9d2111f4263 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -1400,15 +1400,6 @@ radv_GetDeviceImageMemoryRequirements(VkDevice device, 
const VkDeviceImageMemory
    radv_DestroyImage(device, image, NULL);
 }
 
-static inline unsigned
-si_tile_mode_index(const struct radv_image_plane *plane, unsigned level, bool 
stencil)
-{
-   if (stencil)
-      return plane->surface.u.legacy.zs.stencil_tiling_index[level];
-   else
-      return plane->surface.u.legacy.tiling_index[level];
-}
-
 static uint32_t
 radv_surface_max_layer_count(struct radv_image_view *iview)
 {
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index cb86bb192a0..c15aefc8fdf 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -1546,6 +1546,15 @@ radv_image_is_renderable(const struct radv_device 
*device, const struct radv_ima
    return true;
 }
 
+unsigned
+si_tile_mode_index(const struct radv_image_plane *plane, unsigned level, bool 
stencil)
+{
+   if (stencil)
+      return plane->surface.u.legacy.zs.stencil_tiling_index[level];
+   else
+      return plane->surface.u.legacy.tiling_index[level];
+}
+
 VKAPI_ATTR VkResult VKAPI_CALL
 radv_CreateImage(VkDevice _device, const VkImageCreateInfo *pCreateInfo, const 
VkAllocationCallbacks *pAllocator,
                  VkImage *pImage)
diff --git a/src/amd/vulkan/radv_image_view.c b/src/amd/vulkan/radv_image_view.c
index 463ababade4..71267429f5a 100644
--- a/src/amd/vulkan/radv_image_view.c
+++ b/src/amd/vulkan/radv_image_view.c
@@ -93,15 +93,6 @@ radv_tex_dim(VkImageType image_type, VkImageViewType 
view_type, unsigned nr_laye
    }
 }
 
-static inline unsigned
-si_tile_mode_index(const struct radv_image_plane *plane, unsigned level, bool 
stencil)
-{
-   if (stencil)
-      return plane->surface.u.legacy.zs.stencil_tiling_index[level];
-   else
-      return plane->surface.u.legacy.tiling_index[level];
-}
-
 void
 si_set_mutable_tex_desc_fields(struct radv_device *device, struct radv_image 
*image,
                                const struct legacy_surf_level 
*base_level_info, unsigned plane_id, unsigned base_level,
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
index 0526d7ecd36..2ce35ac6974 100644
--- a/src/amd/vulkan/radv_private.h
+++ b/src/amd/vulkan/radv_private.h
@@ -2630,6 +2630,8 @@ unsigned radv_image_queue_family_mask(const struct 
radv_image *image, enum radv_
 
 bool radv_image_is_renderable(const struct radv_device *device, const struct 
radv_image *image);
 
+unsigned si_tile_mode_index(const struct radv_image_plane *plane, unsigned 
level, bool stencil);
+
 struct radeon_bo_metadata;
 void radv_init_metadata(struct radv_device *device, struct radv_image *image, 
struct radeon_bo_metadata *metadata);
 

Reply via email to