Lubosz Sarnecki
b1541c2d1e
st/oxr: Return XR_ERROR_SWAPCHAIN_RECT_INVALID.
...
For out of bounds imageRect offsets on quad layers.
2020-05-26 11:33:58 +01:00
Lubosz Sarnecki
1bad77efb4
st/oxr: Return XR_ERROR_SWAPCHAIN_RECT_INVALID.
...
For negative imageRect offsets on quad layers.
2020-05-26 11:33:58 +01:00
Jakob Bornecrantz
129d76687e
c/main: Idle VkDevice after presenting VkSwapchain
2020-05-26 11:33:58 +01:00
Jakob Bornecrantz
7ab48b691c
c/main&ipc: Adopt to flip y in layers change
...
Client side changes by Lubosz Sarnecki.
2020-05-26 11:33:58 +01:00
Lubosz Sarnecki
9c8d0ae3cc
xrt: Pass the flip y on layer per layer basis.
...
st/oxr: Adopt to flip y in layers change.
c/client: Adapt to flip y in layers change.
Set true for GL and false for Vulkan.
2020-05-26 11:33:58 +01:00
Lubosz Sarnecki
e445f60ccf
ipc: Add client side support for layers.
2020-05-26 11:33:58 +01:00
Jakob Bornecrantz
83ace60132
c/main: Add simple support for new layer interface
2020-05-26 11:33:58 +01:00
Jakob Bornecrantz
e36e457560
c/client: Add full support for new layer interface
2020-05-26 11:33:58 +01:00
Lubosz Sarnecki
9349193d0c
st/oxr: Use new layer interface and accept multiple projection and quad layers.
...
Authered by Jakob Bornecrantz and Lubosz Sarnecki.
2020-05-26 11:33:58 +01:00
Jakob Bornecrantz
84700f3209
xrt: Add layers to the compositor interface
2020-05-26 11:33:58 +01:00
Jakob Bornecrantz
f9e933af39
d/psmv: Transform the ball tip pose so it can be used for pointing
2020-05-25 19:50:31 +00:00
Christoph Haag
07d8fdae46
build: Set XRT_HAVE_V4L2 in meson too
2020-05-25 20:50:33 +02:00
Jakob Bornecrantz
b7b9d9307b
ipc: Remove leftover fprintf (NFC)
2020-05-23 13:54:49 +01:00
Jakob Bornecrantz
cea8f93892
st/oxr: Fix missed change from MNDX_egl_enable name change
2020-05-21 11:20:32 +01:00
Jakob Bornecrantz
d37f446def
st/oxr: Update openxr header and switch to XR_MNDX_egl_enable
2020-05-20 18:08:56 +00:00
Ryan Pavlik
75d05c49de
build: Fix missed rename of config
2020-05-19 16:15:00 -05:00
Christoph Haag
854272a7d0
d/vive_controller: Don't infinitely loop in device update
...
This prevented the update thread from being joined and the driver from being destroyed.
2020-05-14 00:25:34 +02:00
Christoph Haag
b32652c4df
ipc: Implement xrWaitFrame by waiting on a shared semaphore v2
...
Version 2 additions by Jakob, still use a semaphore to wake up the client.
But now instead call the compositor wait frame and have that thread wake up
the client, and return immediatly on the IPC channel.
2020-05-13 17:07:08 +01:00
Jakob Bornecrantz
ac38679641
r/debug: Fix ODR rule violation
...
Closes #79
2020-05-12 22:06:10 +01:00
Ryan Pavlik
4638b0af7b
build: Switch all CMake options to XRT_... to match what's used in source.
...
Also revise other small related parts of the build to make them more clear and consistent.
2020-05-12 11:52:51 -05:00
Ryan Pavlik
4dd7a603f4
xrt: Temporarily fix build broken by layer violation.
2020-05-12 11:52:51 -05:00
Ryan Pavlik
098ddde5da
ipc: Fix typo
2020-05-12 11:46:53 -05:00
Christoph Haag
653ca1d39d
d/vive: Declare struct forward declaration as extern
...
Fixes build with gcc on arch.
2020-05-12 15:38:04 +02:00
Lubosz Sarnecki
136794ab63
c/distortion: Idle before running destructor.
2020-05-11 20:22:51 +01:00
Lubosz Sarnecki
3e88a850ff
c/renderer: Use vk_submit_cmd_buffer from vk_helpers.
2020-05-11 20:22:51 +01:00
Lubosz Sarnecki
dc45605c84
c/renderer: Use vk_init_cmd_buffer from vk_helpers.
2020-05-11 20:22:51 +01:00
Lubosz Sarnecki
e8d273bc41
aux/vk: Add vkFlushMappedMemoryRanges.
2020-05-11 20:22:51 +01:00
Lubosz Sarnecki
54985b110a
aux/vk: Add descriptor set functions.
2020-05-11 20:22:50 +01:00
Lubosz Sarnecki
f131739c00
aux/vk: Take VkExtent2D and VkImageUsageFlags in vk_create_image_simple.
2020-05-11 20:21:58 +01:00
Lubosz Sarnecki
c09beb9efb
aux/vk: Add vk_get_access_flags.
2020-05-11 20:21:58 +01:00
Lubosz Sarnecki
06ce79272d
aux/vk: Add vk_check_error macro.
2020-05-11 20:21:58 +01:00
Lubosz Sarnecki
6aa1b4e571
aux/math: Add function to calculate view matrix from pose.
2020-05-11 20:21:58 +01:00
Lubosz Sarnecki
0b6d97ec8f
aux/math: Add matrix_4x4 identity and matrix_4x4_muliply.
2020-05-11 20:21:58 +01:00
Lubosz Sarnecki
0e5d10ca39
c/renderer: Rename comment.
2020-05-11 20:21:58 +01:00
Lubosz Sarnecki
501d8dadd4
c/main: Split nvidia test to function.
2020-05-11 20:21:58 +01:00
Lubosz Sarnecki
03074cd52e
st/oxr: Unreleased swapchain must return XR_ERROR_LAYER_INVALID.
2020-05-11 20:21:58 +01:00
Jakob Bornecrantz
d8538d3a2f
gui: Require OpenGL version 3.3
2020-05-11 18:13:49 +00:00
Christoph Haag
26539e79b6
ipc: Fix looking up tracking origins
...
Fixes #78
2020-05-09 21:14:24 +02:00
Jakob Bornecrantz
cf3a337547
ipc: Be paranoid about tracking origins
2020-05-09 19:37:48 +01:00
Christoph Haag
5908c33439
d/survive: Add survive driver
2020-05-09 13:12:06 +00:00
Christoph Haag
5b2efcbb7a
st/prober: Fix typo in error message
2020-05-09 13:12:06 +00:00
Jakob Bornecrantz
66bcdf712e
ipc: Track tracking origins with variable tracking
2020-05-09 12:43:26 +01:00
Jakob Bornecrantz
ee163cbdb2
ipc: Reflect tracking origins correctly
2020-05-09 12:43:26 +01:00
Jakob Bornecrantz
694d978e25
st/prober: Name the tracking origin and make offset editable
2020-05-09 12:43:26 +01:00
Ryan Pavlik
8f6b7b930a
ipc: Output the attempted filename in the bind error message.
2020-05-08 14:53:03 -05:00
Jakob Bornecrantz
e620fa9063
st/prober: Refactor JSON config loading so that we print less errors when we don't need the config
2020-05-07 22:25:44 +00:00
Jakob Bornecrantz
1744715a5d
u/file: Do not print errors
2020-05-07 22:25:44 +00:00
Ryan Pavlik
83cace51d4
ipc: Add error message on bind failure.
2020-05-07 17:00:25 -05:00
Ryan Pavlik
c4f8c7fdf7
ipc: Unlink on exit, not before start.
2020-05-07 16:55:10 -05:00
Ryan Pavlik
acbac4f1a6
t/service: Add ability to generate, link, install systemd unit files
2020-05-07 16:54:17 -05:00
Ryan Pavlik
5935fad73b
ipc: Add ability for service to be launched by systemd socket activation.
2020-05-07 16:54:11 -05:00
Ryan Pavlik
d7e84cf5b5
build: Fix include directories for IPC server module
2020-05-07 15:46:29 -05:00
Ryan Pavlik
b52b3ec649
meson: Improve build when sdl2 not available
...
Unfortunately doesn't fix 32-bit meson CI
2020-05-07 20:04:08 +00:00
Christoph Haag
aaa2f0a0bd
d/vive_controller: read from usb with timeout
...
This aligns with the vive HMD driver and fixes high CPU usage.
2020-05-07 21:24:43 +02:00
Christoph Haag
dc4dcf15a9
d/vive_controller: Fix left index controller imu
...
The IMU in the left index controller has a different orientation
than the right one.
2020-05-05 19:50:20 +00:00
Christoph Haag
f8b2e179cb
d/vive_controller: index controller trackpad: send 0,0 position after release
2020-05-05 14:19:37 +00:00
Christoph Haag
344846b3e2
aux/vk: Print available GPUs with XRT_COMPOSITOR_PRINT_DEBUG
...
Useful for finding out a gpu index to use for XRT_COMPOSITOR_FORCE_GPU_INDEX.
2020-05-05 15:12:08 +02:00
Christoph Haag
d95c77ad54
comp: Also enable vk debug print with XRT_COMPOSITOR_PRINT_DEBUG
...
This is useful because it prints which GPU the compositor runs on.
2020-05-05 15:12:08 +02:00
Christoph Haag
a1b6efd16b
d/vive_controller: Report zero values for trigger and trackpad
...
Turns out we actually want to know when theose transition into/over zero.
2020-05-04 21:25:03 +02:00
Jakob Bornecrantz
695ac70dab
st/oxr: Silence warning about uninitialized variable and add todo (NFC)
2020-05-04 18:05:13 +01:00
Christoph Haag
cf0e5d7861
st/oxr: store preferred path per binding, not per action
...
Fixes d62c2d2011
For any one action, multiple bindings may be suggested. The preferred/matched
input path depends on which binding is active.
Each bindings already stores a list of actions for which the suggested bindings
matched any of the input paths, just add a corresponding list *which* path matched.
2020-05-04 17:29:43 +02:00
Christoph Haag
2a58d1225f
bindings: Don't create broken subpath for haptic output
...
This macro created two paths for haptics, the first of which was useless/wrong:
/user/hand/*/output/haptics/
/user/hand/*/output/haptics
2020-05-04 17:29:43 +02:00
Jakob Bornecrantz
c582bde17a
d/dd: Make touchpad a single input
2020-05-03 22:58:47 +00:00
Christoph Haag
d62c2d2011
st/oxr: properly enable binding to /x and /y
...
Store Thumbstick, Trackpad etc. data internally in a vec2f.
The knowledge that a binding path ../x and ../y refers to the x and y components of this vec2f
is stored as an INPUT_REDIRECT_VEC2_X_TO_VEC1 or INPUT_REDIRECT_VEC2_Y_TO_VEC enum.
Actions now also store the index of the binding paths it matched to,
e.g. when an action binds ../trackpad/y to an input that provides bindings [../trackpad, ../trackpad/x, ../trackpad/y],
the index 2 is stored.
v2: Clarify preferred binding path index variable
2020-05-03 22:58:47 +00:00
Jakob Bornecrantz
d8428b2544
ipc/client: Don't assert on devices with no output
2020-05-01 19:20:03 +01:00
Christoph Haag
7ab1ca727f
ipc: Make send_and_get_reply thread safe
...
When multiple threads call OpenXR functions, make sure one thread
can not read the reply meant for another thread.
Unfortunately this also blocks other OpenXR functions from being
called while xrWaitFrame() is blocking.
2020-05-01 16:11:26 +02:00
Christoph Haag
d491f59b55
ipc: Log unexpected messaging events as errors
...
Any of these unexpected events will likely lead to more errors down the line.
Always printing them as errors will make it easier to diagnose the ipc.
2020-05-01 16:11:00 +02:00
Christoph Haag
a195f22bc3
ipc: disconnect client on xrDestroyInstance()
...
The service considers clients to be connected as long as the fd is not closed.
After destroying an XrInstance this prevents the client from creating a subsequent XrInstance.
2020-05-01 02:49:44 +02:00
Jakob Bornecrantz
a4dcdf1f0b
ipc/server: Improve error messages
2020-04-30 20:45:34 +01:00
Jakob Bornecrantz
6d770336b7
ipc/server: Pass in MSG_NOSIGNAL to not get SIGPIPEd
2020-04-30 20:44:35 +01:00
Jakob Bornecrantz
a02293e8dd
ipc: Improve swapchain handling a tiny bit
2020-04-30 20:44:35 +01:00
Jakob Bornecrantz
11539e28b7
ipc/server: Fix swapchain being swapped left and right
2020-04-30 14:00:27 +01:00
Ryan Pavlik
457d411016
comp: Remaining 32-bit warning fixes
2020-04-29 17:47:32 -05:00
Ryan Pavlik
233c63a773
comp: Fix Wint-to-pointer-cast warnings on 32-bit.
...
Culprit is a Vulkan non-dispatchable handle:
Fix is simpler than for OpenXR because we aren't a Vulkan
implementation so they're all opaque to us.
2020-04-29 17:44:07 -05:00
Ryan Pavlik
53f9eb332d
st/oxr: Fix more pointer conversion warnings.
2020-04-29 17:44:07 -05:00
Ryan Pavlik
e89a3c1d8f
st/oxr: Fix 32-bit warnings when checking for null handles
2020-04-29 17:44:07 -05:00
Ryan Pavlik
d95219810e
st/oxr: Add XRT_CAST_OXR_HANDLE_TO_PTR macro
2020-04-29 17:44:07 -05:00
Ryan Pavlik
cecb8f31af
st/oxr: Add and use XRT_CAST_PTR_TO_OXR_HANDLE macro to avoid warnings.
...
Other places we do these similar conversions will need this same modification.
2020-04-29 17:44:07 -05:00
Jakob Bornecrantz
7a70f86b2d
targets: Add and change targets to support service process
2020-04-29 15:13:43 +01:00
Jakob Bornecrantz
220f37a75d
xrt: Add build config file for optinal components
2020-04-29 14:58:24 +01:00
Jakob Bornecrantz
7c8a8a3f87
ipc: Add code to enable a service process
...
This enables out of process compositing.
2020-04-29 14:58:24 +01:00
Lubosz Sarnecki
5ba751a239
c/renderer: Expose idle image control.
2020-04-29 09:58:52 +01:00
Pete Black
8082e8dbca
c/renderer: Add new reset rendering function
2020-04-29 09:58:52 +01:00
Ryan Pavlik
ee90eb1d7e
d/vive: Fix typos
2020-04-28 16:49:13 -05:00
Ryan Pavlik
ba71b6f027
t/cli: Add missing include
2020-04-28 16:49:13 -05:00
Ryan Pavlik
777f905ee1
t/cli: Fix typos
2020-04-28 16:49:13 -05:00
Ryan Pavlik
cb3096128a
d/vive: Fix build on Android NDK by switching byte order utilities.
2020-04-28 21:40:57 +00:00
Ryan Pavlik
974c68dead
xrt: Re-arrange build to avoid unnecessary includes.
...
Avoid unintentionally including cJSON from the source tree when using system,
etc. This adds granularity to the usage of "external" sources.
2020-04-28 21:36:46 +00:00
Ryan Pavlik
47710e0532
t/openxr: Fix build without OpenGL
2020-04-28 21:36:46 +00:00
Ryan Pavlik
4fc8d3dbea
st/gui: Fix build without OpenCV
2020-04-28 21:36:46 +00:00
Jakob Bornecrantz
b2c987945e
st/prober: Use and expose usb serial and manufacturer
2020-04-28 18:51:07 +00:00
Jakob Bornecrantz
80dd892987
xrt: Add serial and manufacturer to xrt_prober video device probing interface
2020-04-28 18:51:07 +00:00
Jakob Bornecrantz
cb90837d97
d/v4l2: Add support for XRT_FORMAT_UYVY422
2020-04-28 11:46:31 +00:00
Jakob Bornecrantz
c7903e2d5e
u/sink: Add support for XRT_FORMAT_UYVY422
2020-04-28 11:46:31 +00:00
Jakob Bornecrantz
1de7eb7cc9
t/calibration: Add support for XRT_FORMAT_UYVY422
2020-04-28 11:46:31 +00:00
Jakob Bornecrantz
7602e555b0
xrt: Add the format XRT_FORMAT_UYVY422
2020-04-28 11:46:31 +00:00
Jakob Bornecrantz
59b7794172
xrt: Rename XRT_FORMAT_YUV422 to XRT_FORMAT_YUYV422
2020-04-28 11:46:31 +00:00
Jakob Bornecrantz
a8941859d7
d/v4l2: A bit more extra error printing
2020-04-28 11:46:31 +00:00
Christoph Haag
d4e4a690db
d/vive_controller: Add basic 3dof vive_controller_driver
...
v2: Add basic 3DOF Index Controller support
Only the "gen1" watchman usb protocol is supported (almost same as vive wand).
Note: Lighthouse v2 data is not properly ignored, the IMU data is only parsed correctly
when controller is not hit by lighthouse lasers.
Supported:
* trigger value
* trigger button
* trackpad x, y
* trackpad touch
* thumbstick x, y
* thumbstick click
* system click
* a click,
* b click
Not supported:
* trigger touch
* touchpad force
* thumbstick touch
* system touch
* a touch
* b touch
* grip squeeze
* finger tracking
2020-04-28 10:22:42 +00:00
Christoph Haag
74a328e909
u/json: Add json getter
...
u_json_get() is much, much shorter than cJSON_GetObjectItemCaseSensitive().
2020-04-28 10:22:42 +00:00
Christoph Haag
e3b74c2e70
d/vive: Fix _json_get_string
2020-04-28 10:22:42 +00:00
Christoph Haag
2c818d5051
xrt: Add duration to xrt_output_value
...
The Vive Controller driver benefits from knowing the duration because
the hardware supports vibrating for a specific duration.
2020-04-28 10:22:42 +00:00
Christoph Haag
88ce6b5dcc
st/oxr: Add Vive Wand and Valve Index Controller bindings
...
v2: add vive & index haptic output to khronos/simple_controller
2020-04-28 10:22:41 +00:00
Christoph Haag
04ebc42666
d/vive: Make common functions available through vive_protocol.h
...
Move common code to vive_protocol.c
2020-04-28 10:22:41 +00:00
Ryan Pavlik
427808d09a
build: Use version script in Meson build too.
2020-04-27 17:33:43 -05:00
Ryan Pavlik
95b5c03f10
build: Relink if version script changes.
2020-04-27 17:33:38 -05:00
Ryan Pavlik
75d5e5b9f2
t/psmv: Fix FTBFS on PPC.
...
Apparently EIGEN_PI isn't a double by default.
2020-04-27 20:18:31 +00:00
Jakob Bornecrantz
a10e7fe968
d/psmv: Move led and rumble update to thread
2020-04-25 16:24:28 +01:00
Ryan Pavlik
b8b6e958f2
xrt: Fix FTBFS on ppc64, s390x
2020-04-24 20:34:53 +00:00
Ryan Pavlik
7fab448cf0
build: Support building with system cJSON.
...
Fixes #62 .
2020-04-24 20:34:53 +00:00
Ryan Pavlik
a11f5cc429
target/oxr: Mark the runtime target as a module, not a shared library.
2020-04-24 20:34:53 +00:00
Ryan Pavlik
fc686f27dd
d/psmv: Codespell fix
2020-04-24 15:31:51 -05:00
Ryan Pavlik
c191f4bc30
st/oxr: Codespell fixes
2020-04-24 15:30:46 -05:00
Ryan Pavlik
b7e28b0eb8
d/psmv: Codespell fix
2020-04-24 15:30:46 -05:00
Ryan Pavlik
128abac9e8
comp: Codespell fixes.
2020-04-24 15:30:46 -05:00
Lubosz Sarnecki
ba3b220ad2
c/renderer: Use gray as idle image color.
2020-04-22 22:00:13 +01:00
Jakob Bornecrantz
01c479468c
d/psvr: Use the simple 3dof imu filter
2020-04-22 22:00:13 +01:00
Lubosz Sarnecki
d81b3797ba
c/meson: Expose include directory in meson
2020-04-22 22:00:13 +01:00
Pete Black
ccb1b911f6
c/client: Get the supported formats from the fd compositor
2020-04-22 22:00:13 +01:00
Jakob Bornecrantz
0ad9a7406c
os/threading: Add #pragma once
2020-04-22 21:59:20 +01:00
Jakob Bornecrantz
e37d8f4cf5
xrt: Remove timestate from xrt_device interface
2020-04-16 17:29:34 +01:00
Jakob Bornecrantz
48957b97c2
os/time: Fix warnings on C++
2020-04-16 14:51:08 +01:00
Jakob Bornecrantz
76f83364e3
os/ble_dbus: Check if bluetooth is available
...
Closes #65
2020-04-16 13:48:34 +00:00
Jakob Bornecrantz
530cbf0d6c
os/ble: Detect errors better
2020-04-16 13:48:34 +00:00
Jakob Bornecrantz
ded6a8a4b9
os/ble_dbus: Fix return check
2020-04-16 13:48:34 +00:00
Christoph Haag
99af2b76d3
d/hdk: Remove unused, accidentally left in code
2020-04-16 14:44:54 +02:00
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
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
Ryan Pavlik
98b1b11604
include/xrt: Add a bit-width detection define.
2020-03-03 10:33:14 +00:00
Ryan Pavlik
d7121e8df4
st/oxr: Fix the declaration of our entry points.
...
We need the attributes and calling convention to match the header
2020-03-03 10:33:14 +00:00