vulkan: Use image row pitch (#2077)

When importing a Vulkan external image, query and
pass OpenCL a row pitch if OpenCL is assuming linear for the imported
external handle type. Additionally fix a bug where OpenCL is being told
to create mipmapped images at all times.

---------

Co-authored-by: dcrawley <dcrawley@qti.qualcomm.com>
This commit is contained in:
joshqti
2024-10-22 09:48:41 -07:00
committed by GitHub
parent ec6394488a
commit 5026b1be00
4 changed files with 34 additions and 3 deletions

View File

@@ -1870,6 +1870,16 @@ VulkanExtent3D VulkanImage2D::getExtent3D(uint32_t mipLevel) const
return VulkanExtent3D(width, height, depth);
}
VkSubresourceLayout VulkanImage2D::getSubresourceLayout() const
{
VkImageSubresource subresource = { VK_IMAGE_ASPECT_COLOR_BIT, 0, 0 };
VkSubresourceLayout subresourceLayout = { 0 };
vkGetImageSubresourceLayout(m_device, m_vkImage, &subresource,
&subresourceLayout);
return subresourceLayout;
}
//////////////////////////////////
// VulkanImage3D implementation //
//////////////////////////////////