Commit graph

1012 commits

Author SHA1 Message Date
Jakob Bornecrantz bc31233570 xrt: Add new "settings" interface for sharing camera settings across components 2020-04-10 12:29:21 +00:00
Jakob Bornecrantz de20d87f87 xrt: Make it possible for the prober to pass in JSON data to the drivers 2020-04-10 12:29:21 +00:00
Jakob Bornecrantz 7b049a9d65 t/file: Expose non-hack version of the calibration data save function 2020-04-10 12:29:21 +00:00
Jakob Bornecrantz f47c384b79 u/json: Add bool getter function 2020-04-10 12:29:21 +00:00
Jakob Bornecrantz b5dd07f2fa u/file: Add file helpers 2020-04-10 12:29:21 +00:00
Pete Black c02f89dc18 comp: Spell check 2020-04-09 17:34:27 +01:00
Lubosz Sarnecki bf49a421ba c/direct: Use common init swapchain function.
Simplify and add error messages.
2020-04-09 16:15:17 +00:00
Lubosz Sarnecki 77207ed585 c/direct: Shorten displays member names. 2020-04-09 16:15:17 +00:00
Lubosz Sarnecki 29b771818e c/direct: Move common direct mode code to comp_window_direct.
Create code file for common direct mode code.

Make common functions take generic parameters.

Use common code in randr and nvidia back ends.

Remove redunant includes.
2020-04-09 16:15:17 +00:00
Lubosz Sarnecki 94bc4cba28 c/direct: Split NVIDIA and RandR backends.
Rename functions and structs.

Define unused function overrides separatelty.

c/window: Define new backend init methods.
2020-04-09 16:15:17 +00:00
Lubosz Sarnecki 4ddcca7abd w/direct_mode: Use same num_displays variable for NVIDIA and RandR. 2020-04-09 16:15:17 +00:00
Jakob Bornecrantz 1ccfa236db xrt: Tidy whitespace 2020-04-09 15:08:11 +01:00
Pete Black 80d1d29cb5 comp: Tidy and spell check 2020-04-09 14:50:35 +01:00
Jakob Bornecrantz 6fe02588f9 comp: Get num_images from the fd compositor 2020-04-08 15:20:36 +01:00
Jakob Bornecrantz 9d009784b6 st/gui: Show name of device when no modes are found 2020-04-08 10:51:12 +01:00
Jakob Bornecrantz 817ec2f2bc u/hashset: Fix ISO C++ warning 2020-04-07 16:19:55 +01:00
Lubosz Sarnecki 6b05c216ce c/settings: Add a bunch of display strings to NVIDIA whitelist.
Whitelist Oculus DK1, DK2 and CV1.
Whitelist Vive Pro and Valve Index.
2020-04-07 13:45:11 +00:00
Lubosz Sarnecki 56a8e80844 c/direct_mode: Print meaningful error if no display matches NVIDIA whitelist. 2020-04-07 13:45:11 +00:00
Lubosz Sarnecki 7da70568be c/direct_mode: Use VkDisplayModeParametersKHR.
In favor of own struct to determine best available mode.
The loop now also starts as one, as we do not need compare the 0th mode
it itself and returns if there is only one mode.
2020-04-07 15:38:11 +02:00
Lubosz Sarnecki 7afb012544 c/direct_mode: Check if NVIDIA path found any displays.
This helps failing earlier with an NVIDIA Optimus setup, which currently
is not supported.
2020-04-07 15:00:16 +02:00
Lubosz Sarnecki 6158a23dd9 c/direct_mode: Port to plain C. 2020-04-07 15:00:16 +02:00
Lubosz Sarnecki 16d6500923 c/direct_mode: Don't cache enumerated modes in a std:map. 2020-04-07 15:00:16 +02:00
Lubosz Sarnecki 015d9457fe c/direct_mode: Extract append_randr_display function
Don't allocate string when it's not needed.
2020-04-07 15:00:16 +02:00
Lubosz Sarnecki b399960f67 c/direct_mode: Cast display int only for comparision with size().
It is clearer to leave `int display` from settings as signed integer and
cast only for the comparision with the unsigned vector size.
2020-04-07 15:00:16 +02:00
Lubosz Sarnecki a449ed174a c/direct_mode: Create append_nvidia_entry_on_match function. 2020-04-07 15:00:16 +02:00
Lubosz Sarnecki f8c99b0230 c/direct_mode: Use ARRAY_SIZE macro. 2020-04-07 15:00:16 +02:00
Lubosz Sarnecki c0ae309415 c/direct_mode: Remove unused nv_modes map. 2020-04-07 15:00:16 +02:00
Lubosz Sarnecki 865b668ee7 c/xcb: Port to plain C.
The code was already essentialy C, just needed to replace the pairs with
structs and the vector with an array, it was fixed length anyway.

The code feels more natural in C.
2020-04-07 15:00:16 +02:00
Jakob Bornecrantz 46f51e8139 os/ble: Fix memory leak if we fail to find a device 2020-04-03 17:21:55 +01:00
Jakob Bornecrantz 4d7634845d st/prober: Print serial, product and manufacturer from udev 2020-04-03 14:10:07 +01:00
Jakob Bornecrantz 96edbd9249 st/prober: Print serial, product and manufacturer from libuvc 2020-04-03 14:09:56 +01:00
Lubosz Sarnecki 1b7b8c163f comp: Further remove unused struct field initializers. 2020-04-01 12:50:10 +00:00
Lubosz Sarnecki b6d8d4b458 comp: Don't initialize unused fields in Vulkan structs.
In order to save redundancy with initializing empty fields with NULL / 0
values and improve readability of the Vulkan code.

This patch also uses struct initializers where possible.

This essentially reverts 1eae45212e.
2020-04-01 12:50:10 +00:00
Lubosz Sarnecki 65d6ade6f3 d/ns: Remove redundant semicolons.
As found by C++ pedantic warnings.
2020-03-31 18:26:56 +02:00
Lubosz Sarnecki 4d0c49096d comp/window_direct_mode: Use XCB/Xlib interop.
Since there currently is no Vulkan extension that takes XCB handles to
aqcuire the display Xlib interop needs to be used.

Before this patch Monado was opening connections for both APIs, which
introduced overhead.

Even though all XCB handles can be casted to Xlib ones, this cannot be
done with the main xcb_connection_t / Display. In it's design the
interop between both APIs can create a xcb_connection_t from a XCB
handle, but not the other way round. So in an interop case the Xlib
connection is the main one, since it's on a higher level.
More information on this can be found here:
https://xcb.freedesktop.org/MixingCalls/

Unfortunately the clean solution for this would be to specify a Vulkan
extension that takes XCB handles. This would make sense since Vulkan
is aware of XCB in other parts of the API as well. In Mesa the Xlib
structs will be ultimately casted to XCB.
2020-03-31 17:47:17 +02:00
Lubosz Sarnecki 20f281631b comp: Don't leak xcb replies.
According the XCB documentation the reply structs must be freed. I found
this when running a minimal example related to the direct mode code in
valgrind.
2020-03-31 17:47:01 +02:00
Jakob Bornecrantz a8a4d8c3dd d/arduino: Add new flexible arduino based input device 2020-03-27 10:22:19 +00:00
Ryan Pavlik bc53be8562 t/imu_fusion: Clean up and improve comments 2020-03-26 12:00:26 +00:00
Ryan Pavlik 4c54ccd0fb d/psmv: Switch to using pre-filter 2020-03-26 12:00:26 +00:00
Ryan Pavlik 98ad405d59 d/psmv: Use all 6 calibration measurements to compute accel bias. 2020-03-26 12:00:26 +00:00
Ryan Pavlik 86b3d9f587 t/calibration: Provide read-only access to size as cv::Size in calibration wrapper 2020-03-26 12:00:26 +00:00
Ryan Pavlik 4f5e2aea4e aux/tracking: Fix the API that led to the error I hit. 2020-03-26 12:00:26 +00:00
Ryan Pavlik c6a574191d aux/tracking: Add image undistort/normalize cache mechanism 2020-03-26 12:00:26 +00:00
Ryan Pavlik cf883817c2 t/psmv: Retrieve more data from camera calib. 2020-03-26 12:00:26 +00:00
Ryan Pavlik d198e93fcb external: Update flexkalman 2020-03-26 12:00:26 +00:00
Jakob Bornecrantz 9ff0ee2e6a st/gui: Fix compilation issue with OpenCV
Closes #63
2020-03-25 19:59:16 +00:00
Jakob Bornecrantz 622c848fa2 t/calib: Silence missing reference warning 2020-03-25 16:32:16 +00:00
Jakob Bornecrantz dd5246ceaf d/dd: Use new pre-filter and 3DOF fusion, also tidy driver. 2020-03-25 13:58:51 +00:00
Jakob Bornecrantz 2a68f3c9d3 d/dd: Give correct delta into math_quat_integrate_velocity 2020-03-25 13:58:51 +00:00
Jakob Bornecrantz 99eda56d39 d/vive: Use new 3DOF fusion 2020-03-25 13:58:51 +00:00
Jakob Bornecrantz 3e5da414f7 aux/math: Add 3DOF imu fusion 2020-03-25 13:58:51 +00:00
Jakob Bornecrantz f2ebe74748 aux/math: Add a simple imu pre-filter 2020-03-25 13:58:51 +00:00
Jakob Bornecrantz 23a66eb031 aux/math: Add math_matrix_3x3_rotate_vec3 function 2020-03-25 13:58:51 +00:00
Jakob Bornecrantz 18373730a8 aux/math: Expand the vec3 functions 2020-03-25 13:58:51 +00:00
Jakob Bornecrantz 21e77b85d7 aux/math: Add quat from angle vector function 2020-03-25 13:58:51 +00:00
Jakob Bornecrantz e3516061bb u/var: Add expand RO values 2020-03-25 13:58:51 +00:00
Ryan Pavlik a974562d43 t/openxr: Unify configured files for Meson and CMake. 2020-03-23 17:29:43 -05:00
Ryan Pavlik 377ae07e53 xrt: Add missing SPDX tags 2020-03-23 17:29:43 -05:00
Ryan Pavlik 33236fb20a imgui: Add license texts 2020-03-23 17:29:43 -05:00
Ryan Pavlik 09c189b6ba build: Install more targets 2020-03-23 17:29:43 -05:00
Jakob Bornecrantz f8847912a7 os/ble: Fix error on not finding any device 2020-03-13 11:07:32 +00:00
Jakob Bornecrantz c99546e88f xrt: Add some docu to refcount function 2020-03-11 22:00:54 +00:00
Jakob Bornecrantz 6ecc1e30f3 xrt: Make stereo_camera_calibration refcounted
This allows the data to be safely shared and passed around, even allowing us
to tag frames with the data and passed around that way instead.

Since it now can be passed around more safely make the prober call the save
function instead of the calibration code. This then forms a basis for further
work where we can hook this up into a more proper configuration file.
2020-03-11 22:00:54 +00:00
Pete Black b6613db5d4 d/dd: Add Daydream driver 2020-03-11 21:36:49 +00:00
Pete Black 6b4ec70d14 aux/os: Add D-Bus based BLE code 2020-03-11 21:36:49 +00:00
Pete Black a0be6e139a xrt: Add xrt_vec2_i32 2020-03-11 21:36:49 +00:00
Pete Black 8597ad5ee8 u/bitwise: Add bitwise manipulator functions 2020-03-11 21:36:49 +00:00
Jakob Bornecrantz 0b63cb2da3 aux/math: Add vec2 squared length function 2020-03-11 20:37:20 +00:00
Jakob Bornecrantz 119dc283af u/mesh: Fix file brief 2020-03-11 20:37:20 +00:00
Christoph Haag de7d9de5ae st/oxr: Fill XrViewConfigurationView with new two call helper
The previous two call helper macro copied the entire input struct to output struct.
In particular this did not keep the .type and .next fields intact.

Rather than trying to keep those intact, each struct type should have its own fill function,
only filling in the data we actually want to fill in.
2020-03-11 05:10:07 +01:00
Jakob Bornecrantz 622320904a xrt: Misc tidy of u_var_timing 2020-03-09 20:01:38 +00:00
Jakob Bornecrantz a54b92162e comp: Fix accidental code change from commit 9b662596
Spotted by @mpiatka.
2020-03-09 14:40:10 +00:00
Christoph Haag e8ccb07db7 st/gui: Add compositor frame timing graph to debug ui 2020-03-09 12:59:12 +01:00
Christoph Haag a3118f5ef2 st/gui: Add custom imgui element for timing graph
Features:
* draws 6 level lines with labels
* draws a line for a reference timing
* reference timing can be bottom of the graph, or center
* range around (up from) the reference timing can be specified
* optional automatic rescaling of the graph
2020-03-06 01:56:29 +01:00
Ryan Pavlik 8548d3f7e6 build: Another missed linking fix. 2020-03-05 17:52:49 +00:00
Jakob Bornecrantz a03d1fbf97 d/rs: Use realsense2::realsense2 in cmake
Not sure if this is the correct thing todo as the librealsense example
doesn't use the realsense2::realsense2 form.

https://github.com/IntelRealSense/librealsense/blob/master/examples/cmake/CMakeLists.txt
2020-03-05 17:27:08 +00:00
Jakob Bornecrantz 59f0d0ff0a u/time: Use smaller xrt_config_os.h instead of xrt_config.h 2020-03-05 11:25:50 +00:00
Ryan Pavlik 46c9fa7c2b build: aux_util depends on aux_math. 2020-03-04 17:25:27 -06:00
Ryan Pavlik fe40691052 build: Start using version script to reduce the number of exported symbols 2020-03-04 09:55:16 -06:00
Ryan Pavlik 71c29425d4 build: Fix linking issues preventing the OpenXR runtime from working. 2020-03-04 09:54:47 -06:00
Ryan Pavlik 92205ab5be build: Refactor CMake build to use static libraries instead of object bundles.
This allows transitive dependencies to work easier and improves compatibility.
It takes a little bit more storage at build time, and possibly a little extra time.
2020-03-04 11:15:35 +00:00
Ryan Pavlik 91ba5d04bc st/prober: Fix some unused-thing warnings when building with fewer deps. 2020-03-04 11:15:35 +00:00
Ryan Pavlik f3eac87504 xrt: Correct usage of XRT_MAYBE_UNUSED on functions.
It shouldn't be used on a function marked "static inline" - that's
sufficient to avoid the warning. So, it should almost never be in
a header.
2020-03-04 11:15:35 +00:00
Ryan Pavlik 778315bc52 xrt: Fix layer violations in interface headers.
A few were including aux headers.
2020-03-04 11:15:35 +00:00
Ryan Pavlik b1b08a610c st/prober: Add missing includes 2020-03-04 11:15:35 +00:00
Jakob Bornecrantz d2126882f6 d/rs: Add missing include 2020-03-04 11:15:35 +00:00
Ryan Pavlik 443528030d d/psmv: Add missing include 2020-03-04 11:15:35 +00:00
Ryan Pavlik 601a079387 d/hydra: Add missing include 2020-03-04 11:15:35 +00:00
Ryan Pavlik 0cb53a8c53 d/vive: Add missing include 2020-03-04 11:15:35 +00:00
Ryan Pavlik 5a633905de t/psvr: Add missing include 2020-03-04 11:15:35 +00:00
Ryan Pavlik 2c271048c0 d/dummy: Fix typo in comment 2020-03-04 11:15:35 +00:00
Jakob Bornecrantz 2ded61258c build: Fix no drivers getting included on cmake
I'm pretty sure I already did this, I guess I dropped the patch by
misstake. Well here it is anyway.
2020-03-03 13:36:21 +00:00
Ryan Pavlik b1b451eb96 comp: Fix 32-bit warnings 2020-03-03 10:50:41 +00:00
Ryan Pavlik d4c5b37bc0 st/oxr: Fix 32-bit warnings 2020-03-03 10:50:41 +00:00
Ryan Pavlik 2aa3b27695 aux/vk: Fix 32-bit warning 2020-03-03 10:50:41 +00:00
Ryan Pavlik 5af6182810 comp: Fix 32-bit porting issues. 2020-03-03 10:33:14 +00:00
Ryan Pavlik ffa5a76cea comp/client: More 32-bit porting fixes 2020-03-03 10:33:14 +00:00
Ryan Pavlik 163b39b7a1 st/oxr: Fix some 32-bit porting warnings. 2020-03-03 10:33:14 +00:00
Ryan Pavlik 4d7a8d819c util/hashset: Add missing include. 2020-03-03 10:33:14 +00:00
Ryan Pavlik 7d10788232 include/xrt: Fix Vulkan-related build issue on 32-bit. 2020-03-03 10:33:14 +00:00