radv: remove duplicated si_tile_mode_index() function

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26854>
This commit is contained in:
Samuel Pitoiset 2024-01-02 15:48:09 +01:00 committed by Marge Bot
parent aa1eb54b3b
commit 887ac765bb
4 changed files with 11 additions and 18 deletions

View file

@ -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)
{

View file

@ -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)

View file

@ -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,

View file

@ -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);