Christoph Haag
511dd78376
d/hdk: Poll imu in thread & drain queue on every poll
...
Fix #67
2020-04-16 00:24:59 +02:00
Jakob Bornecrantz
c8b4a00482
comp: Delay swapchain destruction until a safe time, like end frame.
2020-04-15 19:57:46 +01:00
Jakob Bornecrantz
061dbefbd0
u/threading: Add a new higher level threading helpers
2020-04-15 17:33:35 +00:00
Lubosz Sarnecki
916d7708c2
c/renderer: Don't wait for device idle every frame.
...
Do wait on device idle when destroying the swap chain.
Don't wait on device idle multiple times in resize.
Validation on NVIDA and AMD is happy when only keeping
the two idles when resizing and destroying the swapchain.
2020-04-15 18:07:17 +02:00
Lubosz Sarnecki
e477452ac6
c/renderer: Add fences for each command buffer.
...
Wait for fences on vkQueueSubmit.
2020-04-15 18:07:17 +02:00
Lubosz Sarnecki
8d3a0938fa
aux/vk: Add vkResetFences.
2020-04-15 16:43:57 +02:00
Lubosz Sarnecki
bda1cdaee1
c/renderer: Use only one buffer counter cache.
...
Use the same counter for frame and command buffers, as their number is
equal, which is retrieved from swapchain.image_count.
Use the struct member num_buffers in favor of passing it as parameter.
Reuse some command buffer functions.
2020-04-15 16:43:57 +02:00
Lubosz Sarnecki
ddc7ceb214
c/renderer: Don't wait on device idle after acquiring swapchain image.
...
vkAcquireNextImageKHR is synchronized with the present_complete
semaphore.
2020-04-15 16:43:57 +02:00
Lubosz Sarnecki
a34ad629f7
c/renderer: Don't wait idle queue after present.
...
This is not nesseccary as the vkQueuePresentKHR is synchronized by the
render_complete semaphore.
2020-04-15 16:38:54 +02:00
Lubosz Sarnecki
6cb99ea8bf
c/renderer: Return false when vkEndCommandBuffer fails.
2020-04-15 14:00:35 +02:00
Jakob Bornecrantz
ec076a0d5b
xrt: Add helper functions for xrt_swapchain
2020-04-11 15:44:44 +01:00
Jakob Bornecrantz
945f2c82ed
targets: Move xrt_instance implementation into targets
2020-04-11 12:31:58 +01:00
Jakob Bornecrantz
b5354c4d83
st/gui: Remove old video test
2020-04-11 12:31:55 +01:00
Jakob Bornecrantz
57f407f02e
st/gui: Tidy CMakeLists.txt
2020-04-11 12:19:28 +01:00
Jakob Bornecrantz
85bceaceca
st/prober: Tidy CMakeLists.txt
2020-04-11 12:19:28 +01:00
Jakob Bornecrantz
69043bbf33
xrt: Add helper functions to xrt_device.
2020-04-11 00:55:14 +01:00
Jakob Bornecrantz
c39cb39643
st/oxr: Use new xrt_instance object
2020-04-10 13:48:18 +01:00
Jakob Bornecrantz
bbc07ed5f2
st/prober: Provide a default implementation of xrt_instance interface
2020-04-10 13:48:18 +01:00
Jakob Bornecrantz
fa0789343e
targets: Add stub implementations of xrt_gfx_provider_create_fd
...
This is needed by st/prober's default implementation of xrt_instance.
2020-04-10 13:48:18 +01:00
Jakob Bornecrantz
3b084b5c91
xrt: Add new xrt_instance object
2020-04-10 13:32:25 +01:00
Jakob Bornecrantz
452c1c0ba3
d/v4l2: Tweaks for the ELP stereo camera
2020-04-10 12:29:21 +00:00
Jakob Bornecrantz
231d39185e
t/file: Remove hacky file handling functions
2020-04-10 12:29:21 +00:00
Jakob Bornecrantz
2063bc30b8
st/prober: Load tracking config from json and use new settings struct
2020-04-10 12:29:21 +00:00
Jakob Bornecrantz
a11aa689a7
st/gui: Save camera and calibration data using new settings
2020-04-10 12:29:21 +00:00
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
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
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