The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

comp: Return proper errors for OpenGL xrCreateSwapchain

authored by

Christoph Haag and committed by
Jakob Bornecrantz
b64b6f75 cb352839

+10 -2
+2 -2
src/xrt/compositor/client/comp_gl_client.c
··· 354 354 U_LOG_E( 355 355 "Only one array layer is supported with OpenGL ES " 356 356 "2"); 357 - return XRT_ERROR_OPENGL; 357 + return XRT_ERROR_SWAPCHAIN_FLAG_VALID_BUT_UNSUPPORTED; 358 358 } 359 359 } 360 360 361 361 int64_t vk_format = gl_format_to_vk(info->format); 362 362 if (vk_format == 0) { 363 363 U_LOG_E("Invalid format!"); 364 - return XRT_ERROR_VULKAN; 364 + return XRT_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED; 365 365 } 366 366 367 367 struct xrt_swapchain_create_info xinfo = *info;
+5
src/xrt/include/xrt/xrt_results.h
··· 48 48 * Multiple not supported on this layer level (IPC, compositor). 49 49 */ 50 50 XRT_ERROR_MULTI_SESSION_NOT_IMPLEMENTED = -11, 51 + 52 + /*! 53 + * The requested format is not supported by Monado. 54 + */ 55 + XRT_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED = -12, 51 56 } xrt_result_t;
+3
src/xrt/state_trackers/oxr/oxr_swapchain.c
··· 211 211 return oxr_error(log, XR_ERROR_FEATURE_UNSUPPORTED, 212 212 "Specified swapchain creation flag is valid, " 213 213 "but not supported"); 214 + } else if (xret == XRT_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED) { 215 + return oxr_error(log, XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED, 216 + "Specified swapchain format is not supported"); 214 217 } 215 218 if (xret != XRT_SUCCESS) { 216 219 return oxr_error(log, XR_ERROR_RUNTIME_FAILURE, "Failed to create swapchain");