diff --git a/src/xrt/state_trackers/oxr/oxr_session_gfx_egl.c b/src/xrt/state_trackers/oxr/oxr_session_gfx_egl.c index f70d9e5b7..6b8299094 100644 --- a/src/xrt/state_trackers/oxr/oxr_session_gfx_egl.c +++ b/src/xrt/state_trackers/oxr/oxr_session_gfx_egl.c @@ -9,10 +9,6 @@ * @ingroup comp_client */ -#ifndef XR_USE_PLATFORM_EGL -#error "Must build this file with EGL enabled!" -#endif - #include #include "util/u_misc.h" @@ -30,6 +26,10 @@ #include "xrt/xrt_gfx_egl.h" +#ifndef XR_USE_PLATFORM_EGL +#error "Must build this file with EGL enabled!" +#endif + // Not forward declared by mesa typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYCONTEXTPROC)(EGLDisplay dpy, EGLContext ctx, diff --git a/src/xrt/state_trackers/oxr/oxr_session_gfx_gl_win32.c b/src/xrt/state_trackers/oxr/oxr_session_gfx_gl_win32.c index 23208fd5b..4dda7de49 100644 --- a/src/xrt/state_trackers/oxr/oxr_session_gfx_gl_win32.c +++ b/src/xrt/state_trackers/oxr/oxr_session_gfx_gl_win32.c @@ -9,14 +9,6 @@ * @ingroup comp_client */ -#ifndef XR_USE_PLATFORM_WIN32 -#error "Must build this file with Win32 enabled!" -#endif - -#ifndef XR_USE_GRAPHICS_API_OPENGL -#error "Must build this file with OpenGL enabled!" -#endif - #include #include "util/u_misc.h" @@ -30,6 +22,14 @@ #include "xrt/xrt_gfx_win32.h" +#ifndef XR_USE_PLATFORM_WIN32 +#error "Must build this file with Win32 enabled!" +#endif + +#ifndef XR_USE_GRAPHICS_API_OPENGL +#error "Must build this file with OpenGL enabled!" +#endif + XrResult oxr_session_populate_gl_win32(struct oxr_logger *log, struct oxr_system *sys, diff --git a/src/xrt/state_trackers/oxr/oxr_session_gfx_gl_xlib.c b/src/xrt/state_trackers/oxr/oxr_session_gfx_gl_xlib.c index 12a7c9499..5a3d845f0 100644 --- a/src/xrt/state_trackers/oxr/oxr_session_gfx_gl_xlib.c +++ b/src/xrt/state_trackers/oxr/oxr_session_gfx_gl_xlib.c @@ -8,14 +8,6 @@ * @ingroup comp_client */ -#ifndef XR_USE_PLATFORM_XLIB -#error "Must build this file with XLIB enabled!" -#endif - -#ifndef XR_USE_GRAPHICS_API_OPENGL -#error "Must build this file with OpenGL enabled!" -#endif - #include #include "util/u_misc.h" @@ -29,6 +21,14 @@ #include "xrt/xrt_gfx_xlib.h" +#ifndef XR_USE_PLATFORM_XLIB +#error "Must build this file with XLIB enabled!" +#endif + +#ifndef XR_USE_GRAPHICS_API_OPENGL +#error "Must build this file with OpenGL enabled!" +#endif + XrResult oxr_session_populate_gl_xlib(struct oxr_logger *log, struct oxr_system *sys, diff --git a/src/xrt/state_trackers/oxr/oxr_session_gfx_gles_android.c b/src/xrt/state_trackers/oxr/oxr_session_gfx_gles_android.c index 67c86b31d..fc4c2e549 100644 --- a/src/xrt/state_trackers/oxr/oxr_session_gfx_gles_android.c +++ b/src/xrt/state_trackers/oxr/oxr_session_gfx_gles_android.c @@ -10,10 +10,6 @@ * @ingroup comp_client */ -#ifndef XR_USE_GRAPHICS_API_OPENGL_ES -#error "Must build this file with OpenGL ES enabled!" -#endif - #include #include "util/u_misc.h" @@ -34,6 +30,10 @@ #include +#ifndef XR_USE_GRAPHICS_API_OPENGL_ES +#error "Must build this file with OpenGL ES enabled!" +#endif + XrResult oxr_session_populate_gles_android(struct oxr_logger *log, struct oxr_system *sys, diff --git a/src/xrt/state_trackers/oxr/oxr_session_gfx_vk.c b/src/xrt/state_trackers/oxr/oxr_session_gfx_vk.c index 5961d9fc6..f955429d0 100644 --- a/src/xrt/state_trackers/oxr/oxr_session_gfx_vk.c +++ b/src/xrt/state_trackers/oxr/oxr_session_gfx_vk.c @@ -8,10 +8,6 @@ * @ingroup comp_client */ -#ifndef XR_USE_GRAPHICS_API_VULKAN -#error "Must build this file with Vulkan enabled!" -#endif - #include "xrt/xrt_instance.h" #include "xrt/xrt_handles.h" #include "xrt/xrt_gfx_vk.h" @@ -27,6 +23,10 @@ #include "oxr_handle.h" +#ifndef XR_USE_GRAPHICS_API_VULKAN +#error "Must build this file with Vulkan enabled!" +#endif + DEBUG_GET_ONCE_BOOL_OPTION(force_timeline_semaphores, "OXR_DEBUG_FORCE_TIMELINE_SEMAPHORES", false) DEBUG_GET_ONCE_BOOL_OPTION(force_debug_utils, "OXR_DEBUG_FORCE_VK_DEBUG_UTILS", false)