Commit graph

1299 commits

Author SHA1 Message Date
Lubosz Sarnecki fc271ad5da aux/math: Add function to calculate quad model matrix. 2020-05-28 22:16:57 +00:00
Lubosz Sarnecki 68c5eecb96 aux/vk: Add image helper struct and functions. 2020-05-28 22:16:56 +00:00
Lubosz Sarnecki 589c7e4fef aux/vk: Add buffer helper structs and functions. 2020-05-28 22:16:56 +00:00
Lubosz Sarnecki 905040319a aux/vk: Use optimal tiling in vk_create_image_simple.
Fixes an validation issue on NVIDIA and should bring more performance.
2020-05-28 22:16:56 +00:00
Jakob Bornecrantz 03f802de77 st/oxr: Correctly validate time in xrLocateSpace 2020-05-28 22:56:59 +01:00
Jakob Bornecrantz dd04379209 st/oxr: Now that layers are supported up the max layers to what the spec requires 2020-05-28 22:56:59 +01:00
Ryan Pavlik cef1970340 ipc: Make script more pythonic 2020-05-28 13:22:30 -05:00
Ryan Pavlik ff3a4d8b50 ipc: Fix all Flake8 warnings 2020-05-28 13:20:28 -05:00
Ryan Pavlik 4efdb6762a ipc: More script simplification. 2020-05-28 11:56:22 -05:00
Ryan Pavlik 0964a6dd07 ipc: Clean up generation script 2020-05-28 11:34:36 -05:00
Ryan Pavlik a44a915151 ipc: Put generator main in a function, for testing purposes 2020-05-28 11:34:36 -05:00
Ryan Pavlik 8bd1ac776e ipc: Fix class methods, mistaken use of class variables in IPC generator 2020-05-28 11:34:36 -05:00
Christoph Haag 7b2c54c223 d/survive: don't report invalid poses as valid 2020-05-28 17:37:09 +02:00
Christoph Haag 25bafd71c8 d/survive: Remove useless loop
We already have a SurviveSimpleObject, no need to look for it through iteration
2020-05-28 17:20:46 +02:00
Jakob Bornecrantz 7cd9dfabc8 st/oxr: Translate swapchain usage flags 2020-05-28 15:50:47 +01:00
Jakob Bornecrantz 23b882df08 st/oxr: Write out pose values on failure, better say which layer failed and also check projection layer poses 2020-05-28 15:50:47 +01:00
Jakob Bornecrantz 9d791cdfd3 math: Use non-squared 'length' of quat in validation
Correctly validate quaternion using non-squard "length" instead of squard
"length", certain combinations of elements would produce valid regular "length"
but not valid squard ones.
2020-05-28 15:50:47 +01:00
Ryan Pavlik 8c54139f79 inc/xrt: Remove declaration of xrt_prober_create. 2020-05-27 18:40:56 -05:00
Ryan Pavlik a034260ec3 ipc/client: Remove implementation of xrt_prober_create 2020-05-27 18:40:56 -05:00
Ryan Pavlik 293ec1e6dd st/p: Use helper functions for xrt_device 2020-05-27 18:40:56 -05:00
Ryan Pavlik 011a68704c st/gui: Use helper functions for xrt_device 2020-05-27 18:40:56 -05:00
Ryan Pavlik 1438541147 st/gui: Port to using xrt_instance, instead of xrt_prober directly. 2020-05-27 18:40:56 -05:00
Ryan Pavlik 1a313b6f58 t/cli: Port to use xrt_instance, instead of xrt_prober directly. 2020-05-27 18:40:56 -05:00
Ryan Pavlik 51dba8ad94 t/common: Add a target_instance_no_comp library 2020-05-27 18:40:56 -05:00
Ryan Pavlik 3b1f003705 t/openxr: Remove reference to/implementation of xrt_prober_create 2020-05-27 18:40:56 -05:00
Ryan Pavlik 6c77b8d314 t/common: Replace references to xrt_prober_create 2020-05-27 18:40:56 -05:00
Ryan Pavlik c42675437b st/gui: Remove no-longer-needed timekeeping. 2020-05-27 18:40:56 -05:00
Ryan Pavlik c7841fd73c inc/xrt: Improve docs for prober interface. 2020-05-27 18:40:56 -05:00
Jakob Bornecrantz aa0523e535 c/main: Only allocate one image for static swapchains 2020-05-27 21:57:48 +01:00
Jakob Bornecrantz e8e7493679 ipc: Pass all arguments to create swapchain image 2020-05-27 21:57:48 +01:00
Jakob Bornecrantz efd35da334 st/oxr: Correctly translate XrSwapchainCreateFlags 2020-05-27 21:21:00 +01:00
Jakob Bornecrantz 0aeb2ccfb2 st/oxr: Turn XrPaths into atoms 2020-05-27 21:21:00 +01:00
Jakob Bornecrantz 7cf5edbf87 st/oxr: Now that IPC correctly wait frames check predicted display for zero 2020-05-27 18:12:26 +01:00
Jakob Bornecrantz 51545411f9 st/oxr: Validate time better xrConvertTimeToTimespecTimeKHR 2020-05-27 18:12:26 +01:00
Jakob Bornecrantz ef41cf2088 u/time: Use a very large hammer to "fix" time_state 2020-05-27 17:50:06 +01:00
Jakob Bornecrantz 18fbd3f819 ipc: Make the XR client actually wait in wait frame by setting the correct semaphore value 2020-05-27 17:50:06 +01:00
Ryan Pavlik 168f2ced41 inc/xrt: Improve xrt_instance documentation 2020-05-26 19:36:28 +00:00
Ryan Pavlik 16d3020ae8 include/xrt: Fix doxygen warning. 2020-05-26 19:36:28 +00:00
Jakob Bornecrantz 4039dc7096 st/oxr: Validate some internal state and improve error message 2020-05-26 19:34:49 +01:00
Christoph Haag 41e3a6fd17 st/oxr: error on displayTime <= 0 in xrEndFrame 2020-05-26 19:34:49 +01:00
Jakob Bornecrantz 589a4ad3e9 st/oxr: Better printing of envBlendMode errors 2020-05-26 19:34:49 +01:00
Christoph Haag 4ea17ce7be st/oxr: Always error on unsupported blend mode
The spec requires always returning an error if the blend mode is unsupported:

XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED must be returned if
XrFrameEndInfo::environmentBlendMode is not supported.
2020-05-26 19:34:49 +01:00
Ryan Pavlik 5383944f85 comp/main: Fix warning 2020-05-26 11:25:03 -05:00
Ryan Pavlik e565ab6d0f d/psvr: Fix warnings 2020-05-26 11:25:03 -05:00
Ryan Pavlik 3624c17754 st/oxr: Fix some warnings by initializing variables. 2020-05-26 11:25:03 -05:00
Ryan Pavlik 525f9c09f2 inc/xrt: Documentation improvements and cleanups. 2020-05-26 11:24:57 -05:00
Ryan Pavlik 0f7832f2c8 st/p: Fix warnings when building without OpenCV 2020-05-26 11:21:09 -05:00
Jakob Bornecrantz 98d11709fb st/oxr: Remove head offset when submitting layers 2020-05-26 11:33:58 +01:00
Lubosz Sarnecki eab3cac623 st/oxr: Verify valid swapchain array index for quads. 2020-05-26 11:33:58 +01:00
Lubosz Sarnecki 8b0a43a64e st/oxr: Test for XR_ERROR_POSE_INVALID.
In quad verification.
2020-05-26 11:33:58 +01:00
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