const bool dedicated;
};
-// A helper function to choose tiling type for cross instance sharing tests.
-// On Linux, DMABUF requires VK_EXT_image_drm_format_modifier support when
-// VK_IMAGE_TILING_OPTIMAL is used, therefore we choose to use linear with these tests.
-vk::VkImageTiling chooseTiling(VkExternalMemoryHandleTypeFlagBits memoryHandleType)
-{
- // Choose tiling depending on memory handle type
- return memoryHandleType == vk::VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT ? vk::VK_IMAGE_TILING_LINEAR : vk::VK_IMAGE_TILING_OPTIMAL;
-}
-
// A helper class to test for extensions upfront and throw not supported to speed up test runtimes compared to failing only
// after creating unnecessary vkInstances. A common example of this is win32 platforms taking a long time to run _fd tests.
class NotSupportedChecker
&externalInfo,
config.resource.imageFormat,
config.resource.imageType,
- chooseTiling(config.memoryHandleType),
+ vk::VK_IMAGE_TILING_OPTIMAL,
readOp.getInResourceUsageFlags() | writeOp.getOutResourceUsageFlags(),
0u
};
1u,
1u,
resourceDesc.imageSamples,
- chooseTiling(externalType),
+ vk::VK_IMAGE_TILING_OPTIMAL,
readOp.getInResourceUsageFlags() | writeOp.getOutResourceUsageFlags(),
vk::VK_SHARING_MODE_EXCLUSIVE,
DE_NULL,
(vk::VkExternalMemoryHandleTypeFlags)externalType
};
- const vk::VkImageTiling tiling = chooseTiling(externalType);
+ const vk::VkImageTiling tiling = vk::VK_IMAGE_TILING_OPTIMAL;
const vk::VkImageCreateInfo createInfo =
{
vk::VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO,
vk::Move<vk::VkImage> image = createImage(m_vkdA, *m_deviceA, resourceDesc, extent, m_queueFamilyIndicesA,
*m_supportReadOp, *m_supportWriteOp, m_memoryHandleType);
- const vk::VkImageTiling tiling = chooseTiling(m_memoryHandleType);
+ const vk::VkImageTiling tiling = vk::VK_IMAGE_TILING_OPTIMAL;
const vk::VkMemoryRequirements requirements = getMemoryRequirements(m_vkdA, *m_deviceA, *image, m_config.dedicated, m_getMemReq2Supported);
exportedMemoryTypeIndex = chooseMemoryType(requirements.memoryTypeBits);
vk::Move<vk::VkDeviceMemory> memory = allocateExportableMemory(m_vkdA, *m_deviceA, requirements.size, exportedMemoryTypeIndex, m_memoryHandleType, m_config.dedicated ? *image : (vk::VkImage)0);