Stop using optimally-tiled images in external memory tests (#2349)

Support for optimally-tiled images and tiling inference in general is
implementation-defined. It should not be relied upon in the CTS.

Also build the code base as C++17 for std::optional. Many Khronos
projects are now using C++17 and the transition in the CTS is IMO
overdue.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit is contained in:
Kévin Petit
2025-04-15 18:28:35 +01:00
committed by GitHub
parent e96edaef8b
commit 829e91663a
7 changed files with 68 additions and 36 deletions

View File

@@ -216,14 +216,19 @@ struct ConsistencyExternalImageTest : public VulkanTestBase
getSupportedVulkanExternalMemoryHandleTypeList(
vkDevice->getPhysicalDevice())[0];
VulkanImageTiling vulkanImageTiling =
vkClExternalMemoryHandleTilingAssumption(
device, vkExternalMemoryHandleType, &errNum);
auto vulkanImageTiling = vkClExternalMemoryHandleTilingAssumption(
device, vkExternalMemoryHandleType, &errNum);
ASSERT_SUCCESS(errNum, "Failed to query OpenCL tiling mode");
if (vulkanImageTiling == std::nullopt)
{
log_info("No image tiling supported by both Vulkan and OpenCL "
"could be found\n");
return TEST_SKIPPED_ITSELF;
}
VulkanImage2D vkImage2D = VulkanImage2D(
*vkDevice, VULKAN_FORMAT_R8G8B8A8_UNORM, width, height,
vulkanImageTiling, 1, vkExternalMemoryHandleType);
*vulkanImageTiling, 1, vkExternalMemoryHandleType);
const VulkanMemoryTypeList& memoryTypeList =
vkImage2D.getMemoryTypeList();