diff --git a/src/imagination/vulkan/pvr_image.c b/src/imagination/vulkan/pvr_image.c index 3294a6ed633..673df51c12f 100644 --- a/src/imagination/vulkan/pvr_image.c +++ b/src/imagination/vulkan/pvr_image.c @@ -233,12 +233,10 @@ VkResult pvr_BindImageMemory2(VkDevice _device, return VK_SUCCESS; } -void pvr_GetImageSubresourceLayout(VkDevice device, - VkImage _image, - const VkImageSubresource *subresource, - VkSubresourceLayout *layout) +void pvr_get_image_subresource_layout(const struct pvr_image *image, + const VkImageSubresource *subresource, + VkSubresourceLayout *layout) { - PVR_FROM_HANDLE(pvr_image, image, _image); const struct pvr_mip_level *mip_level = &image->mip_levels[subresource->mipLevel]; @@ -253,6 +251,16 @@ void pvr_GetImageSubresourceLayout(VkDevice device, layout->size = mip_level->size; } +void pvr_GetImageSubresourceLayout(VkDevice device, + VkImage _image, + const VkImageSubresource *subresource, + VkSubresourceLayout *layout) +{ + PVR_FROM_HANDLE(pvr_image, image, _image); + + pvr_get_image_subresource_layout(image, subresource, layout); +} + VkResult pvr_CreateImageView(VkDevice _device, const VkImageViewCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, diff --git a/src/imagination/vulkan/pvr_private.h b/src/imagination/vulkan/pvr_private.h index a0bd529a5ba..a71da85567a 100644 --- a/src/imagination/vulkan/pvr_private.h +++ b/src/imagination/vulkan/pvr_private.h @@ -1489,6 +1489,10 @@ VkResult pvr_emit_ppp_from_template( const struct pvr_static_clear_ppp_template *const template, struct pvr_bo **const pvr_bo_out); +void pvr_get_image_subresource_layout(const struct pvr_image *image, + const VkImageSubresource *subresource, + VkSubresourceLayout *layout); + static inline struct pvr_compute_pipeline * to_pvr_compute_pipeline(struct pvr_pipeline *pipeline) {