c/util: Expand on swapchain import error codes

This allows the CTS in Direct3D12 to not fail when attempting to import sRGB swapchains with flags such as XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT
This commit is contained in:
Fernando Velazquez Innella 2024-03-11 16:50:30 -04:00
parent 4660d18199
commit 24de6f9edf

View file

@ -571,6 +571,12 @@ comp_swapchain_import_init(struct comp_swapchain *sc,
// Use the image helper to get the images. // Use the image helper to get the images.
ret = vk_ic_from_natives(vk, info, native_images, native_image_count, &sc->vkic); ret = vk_ic_from_natives(vk, info, native_images, native_image_count, &sc->vkic);
if (ret == VK_ERROR_FEATURE_NOT_PRESENT) {
return XRT_ERROR_SWAPCHAIN_FLAG_VALID_BUT_UNSUPPORTED;
}
if (ret == VK_ERROR_FORMAT_NOT_SUPPORTED) {
return XRT_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED;
}
if (ret != VK_SUCCESS) { if (ret != VK_SUCCESS) {
return XRT_ERROR_VULKAN; return XRT_ERROR_VULKAN;
} }