The open source OpenXR runtime
0
fork

Configure Feed

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

st/oxr: Check for compile definitions after includes

If the defines are set in a header instead of with the compiler, they need
to be checked after includes.

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

authored by

Christoph Haag and committed by
Marge Bot
8b2571b6 8f30fd13

+28 -28
+4 -4
src/xrt/state_trackers/oxr/oxr_session_gfx_egl.c
··· 9 9 * @ingroup comp_client 10 10 */ 11 11 12 - #ifndef XR_USE_PLATFORM_EGL 13 - #error "Must build this file with EGL enabled!" 14 - #endif 15 - 16 12 #include <stdlib.h> 17 13 18 14 #include "util/u_misc.h" ··· 29 25 #include <EGL/egl.h> 30 26 #include "xrt/xrt_gfx_egl.h" 31 27 28 + 29 + #ifndef XR_USE_PLATFORM_EGL 30 + #error "Must build this file with EGL enabled!" 31 + #endif 32 32 33 33 // Not forward declared by mesa 34 34 typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYCONTEXTPROC)(EGLDisplay dpy,
+8 -8
src/xrt/state_trackers/oxr/oxr_session_gfx_gl_win32.c
··· 9 9 * @ingroup comp_client 10 10 */ 11 11 12 - #ifndef XR_USE_PLATFORM_WIN32 13 - #error "Must build this file with Win32 enabled!" 14 - #endif 15 - 16 - #ifndef XR_USE_GRAPHICS_API_OPENGL 17 - #error "Must build this file with OpenGL enabled!" 18 - #endif 19 - 20 12 #include <stdlib.h> 21 13 22 14 #include "util/u_misc.h" ··· 29 21 #include "xrt/xrt_instance.h" 30 22 #include "xrt/xrt_gfx_win32.h" 31 23 24 + 25 + #ifndef XR_USE_PLATFORM_WIN32 26 + #error "Must build this file with Win32 enabled!" 27 + #endif 28 + 29 + #ifndef XR_USE_GRAPHICS_API_OPENGL 30 + #error "Must build this file with OpenGL enabled!" 31 + #endif 32 32 33 33 XrResult 34 34 oxr_session_populate_gl_win32(struct oxr_logger *log,
+8 -8
src/xrt/state_trackers/oxr/oxr_session_gfx_gl_xlib.c
··· 8 8 * @ingroup comp_client 9 9 */ 10 10 11 - #ifndef XR_USE_PLATFORM_XLIB 12 - #error "Must build this file with XLIB enabled!" 13 - #endif 14 - 15 - #ifndef XR_USE_GRAPHICS_API_OPENGL 16 - #error "Must build this file with OpenGL enabled!" 17 - #endif 18 - 19 11 #include <stdlib.h> 20 12 21 13 #include "util/u_misc.h" ··· 28 20 #include "xrt/xrt_instance.h" 29 21 #include "xrt/xrt_gfx_xlib.h" 30 22 23 + 24 + #ifndef XR_USE_PLATFORM_XLIB 25 + #error "Must build this file with XLIB enabled!" 26 + #endif 27 + 28 + #ifndef XR_USE_GRAPHICS_API_OPENGL 29 + #error "Must build this file with OpenGL enabled!" 30 + #endif 31 31 32 32 XrResult 33 33 oxr_session_populate_gl_xlib(struct oxr_logger *log,
+4 -4
src/xrt/state_trackers/oxr/oxr_session_gfx_gles_android.c
··· 10 10 * @ingroup comp_client 11 11 */ 12 12 13 - #ifndef XR_USE_GRAPHICS_API_OPENGL_ES 14 - #error "Must build this file with OpenGL ES enabled!" 15 - #endif 16 - 17 13 #include <stdlib.h> 18 14 19 15 #include "util/u_misc.h" ··· 33 29 34 30 #include <dlfcn.h> 35 31 32 + 33 + #ifndef XR_USE_GRAPHICS_API_OPENGL_ES 34 + #error "Must build this file with OpenGL ES enabled!" 35 + #endif 36 36 37 37 XrResult 38 38 oxr_session_populate_gles_android(struct oxr_logger *log,
+4 -4
src/xrt/state_trackers/oxr/oxr_session_gfx_vk.c
··· 8 8 * @ingroup comp_client 9 9 */ 10 10 11 - #ifndef XR_USE_GRAPHICS_API_VULKAN 12 - #error "Must build this file with Vulkan enabled!" 13 - #endif 14 - 15 11 #include "xrt/xrt_instance.h" 16 12 #include "xrt/xrt_handles.h" 17 13 #include "xrt/xrt_gfx_vk.h" ··· 26 22 #include "oxr_two_call.h" 27 23 #include "oxr_handle.h" 28 24 25 + 26 + #ifndef XR_USE_GRAPHICS_API_VULKAN 27 + #error "Must build this file with Vulkan enabled!" 28 + #endif 29 29 30 30 DEBUG_GET_ONCE_BOOL_OPTION(force_timeline_semaphores, "OXR_DEBUG_FORCE_TIMELINE_SEMAPHORES", false) 31 31 DEBUG_GET_ONCE_BOOL_OPTION(force_debug_utils, "OXR_DEBUG_FORCE_VK_DEBUG_UTILS", false)