mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
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:
@@ -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 //
|
||||
//////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user