mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
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:
parent
4660d18199
commit
24de6f9edf
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue