Commit graph

751 commits

Author SHA1 Message Date
Simon Ser 9347ecfe00
xrt: check arraySize==1 when using OpenGL ES 2
Only OpenGL ES 3 supports GL_TEXTURE_2D_ARRAY.
2019-11-18 15:16:16 +01:00
Simon Ser c395f85565
oxr: add XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR support 2019-11-18 15:16:16 +01:00
Simon Ser 81cace0250
comp: replace glCreateTextures with glGenTextures+glBindTexture
glCreateTextures is only available on OpenGL 4.5. It's not supported on
OpenGL ES.
2019-11-18 15:16:16 +01:00
Simon Ser a8b2370946
xrt: accept OpenGL ES in oxr_session_populate_egl 2019-11-18 15:16:15 +01:00
Simon Ser 5eacb6f309
xrt: add support for OpenGL ES
This commit advertises the extension and adds support for
xrGetOpenGLESGraphicsRequirementsKHR
2019-11-18 15:16:15 +01:00
Jakob Bornecrantz b358e22fd7 t/calib: Stub in support for mono calibration 2019-11-17 22:11:41 +00:00
Jakob Bornecrantz ad45aeb0a7 t/calib: Refactor loading a bit more 2019-11-17 22:09:01 +00:00
Jakob Bornecrantz 4af9978803 st/gui: Correctly destroy timekeeping 2019-11-17 20:53:18 +00:00
Christoph Haag b17f1c2f97 st/oxr: Initialize sdl on main thread
Calling SDL_Init() in different threads in the same process crashes.

In this SDL2 code X11_XOpenDisplay() will be a null pointer on the second thread;

    if (SDL_X11_LoadSymbols()) {
        display = X11_XOpenDisplay(NULL);

This becomes a problem when monado starts the debug UI in a thread,
and then an OpenXR client application tries to initialize SDL.

Two consecutive SDL_Init() in the same thread is harmless though.
2019-11-17 13:59:21 +00:00
Jakob Bornecrantz 2ad2243fe7 t/doc: Do not put directory in aux_tracking group 2019-11-16 23:29:29 +00:00
Jakob Bornecrantz 38ec113c04 t/calib: Add comments to sizes 2019-11-16 23:29:10 +00:00
Jakob Bornecrantz 8917607a49 t/calib: Also expose disparity_to_depth on both raw and refined settings 2019-11-16 23:27:32 +00:00
Jakob Bornecrantz 6d8abd87a8 t/calib: Tidy and rename calibration data to settings 2019-11-16 23:17:11 +00:00
Jakob Bornecrantz f364b7a45b t/calib: Make prober load calibration data instead of trackers 2019-11-16 12:17:07 +00:00
Jakob Bornecrantz 5a600ffbcf t/calib: Make destroy funcitons take pointer to pointer 2019-11-16 11:42:33 +00:00
Jakob Bornecrantz ee3d9d08f6 u/time: Send in a pointer to pointer to the timekeeping destroy function 2019-11-15 20:30:01 +00:00
Jakob Bornecrantz 786e67f189 u/time: Mark exported functions as C to get even better errors 2019-11-15 20:28:24 +00:00
Jakob Bornecrantz 76445c8fe9 d/psvr: Fix use after free of timekeeping 2019-11-15 15:23:25 +00:00
Jakob Bornecrantz b33811930b d/psvr: Get data info packet 0x82 2019-11-15 14:55:18 +00:00
Jakob Bornecrantz 419f038017 t/calib: Also save the fisheye distortion always 2019-11-14 17:05:16 +00:00
Jakob Bornecrantz f9599a6763 t/imu: Make sure imu_fusion is aligned 2019-11-14 16:35:56 +00:00
Jakob Bornecrantz 08e898c111 comp: Do not use cut-off in vive shader 2019-11-14 15:12:17 +00:00
Ryan Pavlik e01cf5efd3 t_imu: Actually return non-zero leftover acceleration data. 2019-11-14 12:14:58 +00:00
Ryan Pavlik 2823193302 t_imu_fusion: Add capability to get world non-gravity acceleration 2019-11-14 12:14:58 +00:00
Ryan Pavlik 21352ca338 t_imu: Add param for accelerometer output 2019-11-14 12:14:58 +00:00
Ryan Pavlik a17413744b t_calibration: clang-tidy 2019-11-14 12:14:58 +00:00
Ryan Pavlik 4d411723a1 t/psvr: Fix parameter names 2019-11-14 12:14:58 +00:00
Ryan Pavlik e9d64c4c41 a/math: Clang-tidy 2019-11-14 12:14:58 +00:00
Ryan Pavlik 0a9efbf443 t_imu: Comments 2019-11-14 12:14:58 +00:00
Ryan Pavlik 958c1b7df9 t_imu_fusion: Perform some filtering of accelerometer signal 2019-11-14 12:14:58 +00:00
Ryan Pavlik 29c630cec8 d/psvr: Port PSVR to use timestamps 2019-11-14 12:14:58 +00:00
Ryan Pavlik 194938c405 d/psmv: Port positional tracking to use t_imu_fusion with timestamps 2019-11-14 12:14:58 +00:00
Ryan Pavlik 7bb9fad5e6 t_imu_fusion: adjust to use timepoints directly 2019-11-14 12:14:58 +00:00
Ryan Pavlik aaf08a2abd d/psmv: Porting to changed API that uses timestamps instead of dt 2019-11-14 12:14:58 +00:00
Ryan Pavlik 7314bd75b7 t_imu: Change C API to take timestamps instead of dt 2019-11-14 12:14:58 +00:00
Ryan Pavlik 1440c95f78 t/psmv: Angular rate limit. 2019-11-14 12:14:58 +00:00
Ryan Pavlik 83f652bda1 aux/tracking: Add low-pass IIR filter 2019-11-14 12:14:58 +00:00
Ryan Pavlik ca7397be45 d/psmv: Initial port to imu fusion for orientation-only 2019-11-14 12:14:58 +00:00
Julian Eisel 05b069b0a0 Fix two use-after-free's and multiple memory leaks 2019-11-13 21:53:16 +01:00
Ryan Pavlik af0515232f t_imu_fusion: Fix initialization of orientation from accelerometer. 2019-11-11 18:14:44 -06:00
Ryan Pavlik 08903e67b3 u_var: Update comments/prototypes. 2019-11-11 18:14:14 -06:00
Ryan Pavlik 355476d6b7 aux/tracking: Remove accidentally-left-in parameters from t_imu 2019-11-11 17:57:40 -06:00
Ryan Pavlik 882388b320 st/prober: Fix typo 2019-11-11 17:57:40 -06:00
Ryan Pavlik e44dd1a755 d/vive: Use define for standard gravity 2019-11-11 17:57:40 -06:00
Ryan Pavlik 5eaced0e4d aux/tracking: Use define for standard gravity 2019-11-11 17:57:40 -06:00
Ryan Pavlik 8a0ab71c09 t_imu: Comments. 2019-11-11 17:57:40 -06:00
Ryan Pavlik 8ce507391a external: Update flexkalman 2019-11-11 17:57:34 -06:00
Jakob Bornecrantz 76d6133142 cmake: Fix v4l2 flag not being set 2019-11-10 01:36:46 +00:00
Jakob Bornecrantz c6e6ba7485 t/psmv: Expose ball last position to debug gui 2019-11-10 01:36:44 +00:00
Jakob Bornecrantz 47bc4de56d t/doc: Fallout from latest codespell version 2019-11-09 12:53:42 +00:00
Jakob Bornecrantz a29dd8c0a4 st/oxr: Improve destruction of GUI hack 2019-11-09 12:53:42 +00:00
Jakob Bornecrantz 86244f726f st/oxr: Improve error condition handling on instance creation 2019-11-09 12:53:42 +00:00
Christoph Haag e78e5c8045 st/oxr: Return appropriate errors for incomplete OpenGL XLib binding
* xDisplay must be a pointer to a Display value
* glxDrawable must be a valid GLXDrawable value
* glxContext must be a valid GLXContext value

intentionally not checked:
* glxFBConfig must be a valid GLXFBConfig value
We don't care about this one for now.
2019-11-08 16:07:10 +01:00
Drew DeVault 4c7f830ea5 d/vive: reset orientation on headset button 2019-11-07 09:39:33 -05:00
Jakob Bornecrantz 1f02c54858 d/vive: Fix copy typo 2019-11-07 13:45:56 +00:00
Lubosz Sarnecki 2ffa77d923 d/vive: Handle error when config could not be read. 2019-11-07 14:16:09 +01:00
Lubosz Sarnecki db1e5b9f16 d/vive: Initialize useful defaults.
This initializes default values in the display, distortion and IMU
properties so the runtime is happy in case the JSON config could not be
read.

This patch also moves default value initialization for the Index
into one place with the others, for cases we do not have the data.
2019-11-07 14:16:09 +01:00
Jakob Bornecrantz e7e550fa8d d/psmv: Fix build 2019-11-06 19:51:24 +00:00
Jakob Bornecrantz a54cdb2632 d/psvr: Can we get some info out of the calibration data 2019-11-06 19:50:07 +00:00
Jakob Bornecrantz 845af78c20 d/psvr: Only flip Z-axis after calibration is applied 2019-11-06 19:50:07 +00:00
Jakob Bornecrantz c60b9881e2 d/psmv: More verbose error handling 2019-11-06 19:48:01 +00:00
Drew DeVault e5a9cbb2f9
Implement XR_MND_egl_enable
This extension introduces a more robust way of creating an XrSession for
OpenGL. It also lays the groundwork for future OpenGL ES support.

https://github.com/KhronosGroup/OpenXR-Docs/pull/40

Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Drew DeVault <sir@cmpwn.com>
2019-11-06 10:07:21 +01:00
Simon Ser eefeec12fd oxr: check input type in oxr_swapchain_gl_enumerate_images
Don't blindly cast the input struct to XrSwapchainImageOpenGLKHR, check
that the type is XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR.
2019-11-05 16:32:04 +00:00
Christoph Haag 3b87d518c4 build: Fix meson build without v4l2 2019-11-05 15:36:52 +01:00
Jakob Bornecrantz 93218fa9e4 d/psvr: Tweak panotools values 2019-11-05 12:31:42 +00:00
Jakob Bornecrantz 5e3565c28f st/oxr: Set maximum image rect size to 200% 2019-11-05 12:31:42 +00:00
Jakob Bornecrantz defdd97288 st/oxr: Fix recommended swapchain image height 2019-11-05 12:31:42 +00:00
Jakob Bornecrantz 9eedb05f1b st/prober: Do not autoprobe if we have a HMD 2019-11-05 12:15:56 +00:00
Simon Ser 9183f53c5f
xrt: allow NULL args in various functions
The spec says NULL arguments are valid when the argument just exists for
extensibility. Fix the implementation to accept NULL args.
2019-11-05 10:40:21 +01:00
Simon Ser 8ade6b654b
xrt: introduce OXR_VERIFY_ARG_TYPE_CAN_BE_NULL
It's like OXR_VERIFY_ARG_TYPE_AND_NOT_NULL, but doesn't ensure the argument
is non-NULL.
2019-11-05 10:21:23 +01:00
Simon Ser 1b51db68f9
xrt: rename OXR_VERIFY_ARG_TYPE_AND_NULL to …_NOT_NULL 2019-11-05 10:15:35 +01:00
Jakob Bornecrantz 072e9afb54 t/psvr: Counter tracking origin offset
At least until we have proper tracking for the PSVR.
2019-11-03 14:23:03 +00:00
Jakob Bornecrantz 7c73a1b6bd xrt: Tidy xrt_compiler.h and silence some doxygen warnings 2019-11-02 22:54:23 +00:00
Jakob Bornecrantz b59676e184 st/oxr: Comment all parameters 2019-11-02 22:40:26 +00:00
Ryan Pavlik 059234bbfc d/vive: Cleanup scopes, types, leak in vive_sensors_read_config 2019-11-01 22:41:22 +00:00
Ryan Pavlik e8660a18bd build: Use CMAKE_POSITION_INDEPENDENT_CODE instead of target props.
Reduces repetitive code.
2019-11-01 16:51:54 -05:00
Drew DeVault 6bce0838e0 d/vive: Fix minor typo in vive driver 2019-11-01 14:35:41 +00:00
Simon Ser 36102bfa1e
comp: make Wayland window unresizable
This prevents the compositor from issuing resize requests. We ignore
those anyway.
2019-10-31 16:42:26 +01:00
Christoph Haag 746cccca36 meson: HDK driver does not depend on hidapi 2019-10-31 02:26:19 +01:00
Christoph Haag 680b8971b3 d/hdk: Remove unused hidapi include 2019-10-31 01:50:30 +01:00
Jakob Bornecrantz b5ee4f0dbd comp: Make it obvious that you should implement destroy yourself 2019-10-30 11:06:02 +00:00
Jakob Bornecrantz 46b9d28e8d t/imu: No fancy new c++ syntax until clang-format-8 is used on CI
Go to your room clang-format and think about what you have done.
2019-10-29 20:08:59 +00:00
Jakob Bornecrantz 477e740568 d/psmv: Fix flipped bit for cross and square 2019-10-29 20:08:49 +00:00
Jakob Bornecrantz e84ca2de34 st/oxr: Use xrt_compositor helpers 2019-10-28 21:00:56 +00:00
Jakob Bornecrantz 1abdae5b64 xrt: Add helper functions for xrt_compositor 2019-10-28 20:56:33 +00:00
Jakob Bornecrantz c11640d66b st/oxr: Make sure actions that are not marked as active are deactivated 2019-10-28 14:58:59 +00:00
Jakob Bornecrantz 312a99ecf8 st/oxr: Implement any sub-action path handling 2019-10-28 14:58:59 +00:00
Christoph Haag 7d9ef2f371 comp: Add setting to force a vulkan gpu index 2019-10-25 21:05:06 +02:00
Jakob Bornecrantz 186f3ff7e0 st/prober: Ignore I2C based hid devices 2019-10-25 18:39:34 +01:00
Jakob Bornecrantz 5f4ddcc414 t/cli: Add a just probe command 2019-10-25 18:34:18 +01:00
Ryan Pavlik 56f61412f5 d/psmv: Fix possible alignment issues and endianness comments 2019-10-25 18:08:20 +01:00
Jakob Bornecrantz 06ffb8da8f d/psvr: Remove none used inbuilt mesh 2019-10-25 13:05:54 +00:00
pblack 73420739d9 d/psvr: Adjust values and remove comments 2019-10-25 13:05:54 +00:00
Jakob Bornecrantz c5e1511271 d/psvr: Use new mesh distortion generator functions 2019-10-25 13:05:54 +00:00
Jakob Bornecrantz be712c7049 d/ohmd: Use mesh shader for none distortion 2019-10-25 13:05:54 +00:00
Jakob Bornecrantz ef6931b7f9 aux/util: Refactor mesh generation 2019-10-25 13:05:54 +00:00
Jakob Bornecrantz b403da22eb aux/util: Add distortion mesh generation 2019-10-25 13:05:54 +00:00
Jakob Bornecrantz b67d65b4a5 aux/util: Add function to free device and stuff hanging off it 2019-10-25 13:05:54 +00:00
Jakob Bornecrantz 9b6625961a comp: Implement new mesh shader 2019-10-25 13:05:54 +00:00
Jakob Bornecrantz 9d238d7313 xrt: Refactor mesh distortion fields 2019-10-25 13:05:54 +00:00
Jakob Bornecrantz cdafcda626 math: Add some vec2 functions 2019-10-25 13:05:54 +00:00
Jakob Bornecrantz c906caabf4 d/psvr: Disable mesh distortion 2019-10-25 13:05:54 +00:00
Jakob Bornecrantz babd3af4ae d/psvr: Add link to documention 2019-10-25 12:32:40 +01:00
Jakob Bornecrantz b9e1ca6e55 d/psvr: Document calibration data getting process better 2019-10-25 12:27:54 +01:00
Jakob Bornecrantz fda43c5a19 d/psvr: Add code to get device name and calibration data 2019-10-25 11:11:45 +01:00
Jakob Bornecrantz 6580e3ee3f d/psmv: Use U_ZERO 2019-10-24 22:45:07 +01:00
Jakob Bornecrantz 6bfb1d9110 d/psmv: Fix buttons parsing 2019-10-24 22:16:40 +01:00
Ryan Pavlik 6b8b1ae935 st/oxr: Fix changed since last sync and support for more input types 2019-10-24 22:16:40 +01:00
Jakob Bornecrantz aa52da072f xrt: Remove relation input type 2019-10-24 21:51:07 +01:00
Ryan Pavlik 0ebf754996 xrt: Add XRT_GET_INPUT_TYPE, document XRT_INPUT_NAME 2019-10-24 21:43:18 +01:00
Ryan Pavlik 166bee167e xrt: Comment the input types 2019-10-24 21:43:14 +01:00
Ryan Pavlik 6b0f18bf6e tracking: Build kalman things as a single TU 2019-10-24 18:51:21 +02:00
Jakob Bornecrantz 8f6da565e2 d/v4l2: Align up the buffer size 2019-10-24 16:43:45 +01:00
Ryan Pavlik d3d6f15107 st/prober: More data in the "failed to get interface number" messages. 2019-10-24 15:45:41 +01:00
Ryan Pavlik 1ce0124d5c t/psmv: Simple two-state machine for tracking. 2019-10-24 15:45:41 +01:00
Ryan Pavlik af85f6af6b t/psmv: Reset filter if we get non-finite 2019-10-24 15:44:01 +01:00
Ryan Pavlik 28abcf7ce6 t/psmv: Filter the blobs selected 2019-10-24 15:44:01 +01:00
Ryan Pavlik c713ca61f2 t/psmv: Rotate IMU into something like camera space 2019-10-24 15:44:01 +01:00
Jakob Bornecrantz ccd139ab68 xrt: Add xrt_atomic_cmpxchg 2019-10-23 23:39:22 +01:00
Ryan Pavlik e90ea99aa8 comp: Adjust frame waiting logic to behave correctly.
Some sub-calculations are still slightly hacky,
but now the overall structure is correct.
2019-10-23 17:18:46 +02:00
Jakob Bornecrantz 742fe05dd8 comp: Cody style shaders 2019-10-23 11:07:33 +01:00
Jakob Bornecrantz 127e5e67b4 comp: Cut-off is not needed 2019-10-23 10:21:33 +01:00
Jakob Bornecrantz 8301bd8d4c external: Refactor out sdl functions from main cimguo.cpp 2019-10-22 21:37:03 +01:00
Jakob Bornecrantz 60be24e119 external: If out non-implemented imgui init functions 2019-10-22 21:24:58 +01:00
Ryan Pavlik 939c41aba9 st/oxr: If the app called request-exit, go to exiting instead of ready. 2019-10-22 21:14:04 +02:00
Jakob Bornecrantz 6b99e2fbdc d/psvr: Add new imu code, but it's stubbed out... Unless? 2019-10-22 19:51:24 +01:00
Jakob Bornecrantz 35ae8f31ce d/vive: Add some variable tracking 2019-10-22 18:52:52 +01:00
Ryan Pavlik 713830338e st/oxr: Allow wait frame in headless since it does more than just waiting. 2019-10-22 17:29:04 +00:00
Lubosz Sarnecki 5becb60714 d/vive: Use different device string for each variant. 2019-10-22 19:18:47 +02:00
Lubosz Sarnecki 02dc839ca8 d/vive: Add initial support for the Valve Index. 2019-10-22 19:18:47 +02:00
Lubosz Sarnecki 2ed3109c95 d/vive: Add initial support for Vive Pro. 2019-10-22 19:18:47 +02:00
Lubosz Sarnecki e063e8245e d/vive: Add native driver for the Vive.
This adds a driver for the Vive family of devices based on Philipp
Zabel's ouvrt.
The driver currently only handles the IMU and main board report streams,
but is able to acquire the JSON configuration and utilize it for IMU
calibration as well as distortion configuration.
2019-10-22 19:18:47 +02:00
Lubosz Sarnecki 8e6cc11d69 external: Add nxjson. 2019-10-22 19:18:47 +02:00
Lubosz Sarnecki a1d729af8f os/hid: Add os_hid_get_feature_timeout. 2019-10-22 19:18:47 +02:00
Lubosz Sarnecki 6eb1086578 st/prober: Add string functions.
Functions for printing and matching xrt_proper_string.
2019-10-22 19:18:47 +02:00
Ryan Pavlik e2428ee7fa st/oxr: Handle request exit session and stopping state 2019-10-22 18:00:00 +02:00
Jakob Bornecrantz 0826ff9273 st/oxr: xrCreateActionSpace is fully implemented 2019-10-22 15:19:23 +01:00
pblack e32902843c comp: Add chromatic aberration correction to mesh 2019-10-22 14:44:26 +01:00
Jakob Bornecrantz cd5153dead xrt: Spelling 2019-10-22 12:10:20 +01:00
Jakob Bornecrantz 937f5d582a st/oxr: Refactor logging options to instance 2019-10-22 11:47:25 +01:00
Jakob Bornecrantz ce57fae37d st/oxr: Actually implement oxr_slog_abort 2019-10-22 11:45:21 +01:00
Jakob Bornecrantz 0b16e1e94d d/v4l2: Set the timestamp 2019-10-22 09:44:39 +01:00
Jakob Bornecrantz 4d0b2f0b81 d/v4l2: Better control quirking tools 2019-10-21 17:21:28 +01:00
Jakob Bornecrantz 24bc8135e0 t/hsv: Add a debug sink 2019-10-19 23:15:51 +01:00
Jakob Bornecrantz dcd9bbb4d7 st/gui: Use r8g8b8 or l8 converter 2019-10-19 23:15:49 +01:00
Jakob Bornecrantz f38f631fe8 aux/util: Add special r8g8b8x8 or l8 converter 2019-10-19 23:15:48 +01:00
Jakob Bornecrantz 078ac7c59e st/oxr: Slightly better error message 2019-10-19 22:18:29 +01:00
Jakob Bornecrantz e56271d968 st/oxr: Add super hacky debug gui 2019-10-15 20:54:57 +01:00
Jakob Bornecrantz 5f1078675d st/gui: Do not call prober select in debug scene 2019-10-15 20:54:52 +01:00
Jakob Borncrantz 7239282aab st/prober: Add tracking factory variable tracking 2019-10-15 21:05:37 +02:00