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

Author: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Date:   Fri Dec 15 16:26:29 2023 +0100

radv: move radv_image_is_renderable() to radv_image.c

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

---

 src/amd/vulkan/meta/radv_meta_copy.c | 17 -----------------
 src/amd/vulkan/radv_image.c          | 17 +++++++++++++++++
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/amd/vulkan/meta/radv_meta_copy.c 
b/src/amd/vulkan/meta/radv_meta_copy.c
index b18851be32e..6714b5f6fad 100644
--- a/src/amd/vulkan/meta/radv_meta_copy.c
+++ b/src/amd/vulkan/meta/radv_meta_copy.c
@@ -68,23 +68,6 @@ blit_surf_for_image_level_layer(struct radv_image *image, 
VkImageLayout layout,
    };
 }
 
-bool
-radv_image_is_renderable(const struct radv_device *device, const struct 
radv_image *image)
-{
-   if (image->vk.format == VK_FORMAT_R32G32B32_UINT || image->vk.format == 
VK_FORMAT_R32G32B32_SINT ||
-       image->vk.format == VK_FORMAT_R32G32B32_SFLOAT)
-      return false;
-
-   if (device->physical_device->rad_info.gfx_level >= GFX9 && 
image->vk.image_type == VK_IMAGE_TYPE_3D &&
-       vk_format_get_blocksizebits(image->vk.format) == 128 && 
vk_format_is_compressed(image->vk.format))
-      return false;
-
-   if (image->planes[0].surface.flags & RADEON_SURF_NO_RENDER_TARGET)
-      return false;
-
-   return true;
-}
-
 static bool
 alloc_transfer_temp_bo(struct radv_cmd_buffer *cmd_buffer)
 {
diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index fcc96b65025..675eabc90b4 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -2473,6 +2473,23 @@ radv_image_queue_family_mask(const struct radv_image 
*image, enum radv_queue_fam
    return 1u << family;
 }
 
+bool
+radv_image_is_renderable(const struct radv_device *device, const struct 
radv_image *image)
+{
+   if (image->vk.format == VK_FORMAT_R32G32B32_UINT || image->vk.format == 
VK_FORMAT_R32G32B32_SINT ||
+       image->vk.format == VK_FORMAT_R32G32B32_SFLOAT)
+      return false;
+
+   if (device->physical_device->rad_info.gfx_level >= GFX9 && 
image->vk.image_type == VK_IMAGE_TYPE_3D &&
+       vk_format_get_blocksizebits(image->vk.format) == 128 && 
vk_format_is_compressed(image->vk.format))
+      return false;
+
+   if (image->planes[0].surface.flags & RADEON_SURF_NO_RENDER_TARGET)
+      return false;
+
+   return true;
+}
+
 VKAPI_ATTR VkResult VKAPI_CALL
 radv_CreateImage(VkDevice _device, const VkImageCreateInfo *pCreateInfo, const 
VkAllocationCallbacks *pAllocator,
                  VkImage *pImage)

Reply via email to