The open source OpenXR runtime
0
fork

Configure Feed

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

st/oxr: Fixes crash bug in xrGetVisibilityMaskKHR for in-process builds

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2210>

authored by

Korcan Hussein and committed by
Marge Bot
2639d830 6cd8181b

+10
+4
src/xrt/include/xrt/xrt_device.h
··· 667 667 uint32_t view_index, 668 668 struct xrt_visibility_mask **out_mask) 669 669 { 670 + 671 + if (xdev->get_visibility_mask == NULL) { 672 + return XRT_ERROR_DEVICE_FUNCTION_NOT_IMPLEMENTED; 673 + } 670 674 return xdev->get_visibility_mask(xdev, type, view_index, out_mask); 671 675 } 672 676
+6
src/xrt/state_trackers/oxr/oxr_session.c
··· 29 29 #include "util/u_debug.h" 30 30 #include "util/u_misc.h" 31 31 #include "util/u_time.h" 32 + #include "util/u_visibility_mask.h" 32 33 #include "util/u_verify.h" 33 34 34 35 #include "math/m_api.h" ··· 1417 1418 // If we didn't have any cached mask get it. 1418 1419 if (mask == NULL) { 1419 1420 xret = xrt_device_get_visibility_mask(xdev, type, viewIndex, &mask); 1421 + if (xret == XRT_ERROR_DEVICE_FUNCTION_NOT_IMPLEMENTED && xdev->hmd != NULL) { 1422 + const struct xrt_fov fov = xdev->hmd->distortion.fov[viewIndex]; 1423 + u_visibility_mask_get_default(type, &fov, &mask); 1424 + xret = XRT_SUCCESS; 1425 + } 1420 1426 OXR_CHECK_XRET(log, sess, xret, get_visibility_mask); 1421 1427 sys->visibility_mask[viewIndex] = mask; 1422 1428 }