Ryan Pavlik
146218b346
xrt: Some clang tidy fixes.
...
A few suppressions as well where clang-tidy did the wrong thing.
2020-08-12 17:11:42 -05:00
Jakob Bornecrantz
38703fc1d2
st/oxr: Add plumbing for layers
2020-08-11 01:51:24 +01:00
Jakob Bornecrantz
1e3508d2ce
st/oxr: Fix crash in oxr_session_poll in headless mode
...
Spotted and reported by svillar (IRC).
2020-08-10 16:49:20 +01:00
Christoph Haag
e48c748a57
xrt: suggest correct GPU in xrGetVulkanGraphicsDevice()
...
As before, on the service side the GPU index the compositor runs on can be selected with
* XRT_COMPOSITOR_FORCE_GPU_INDEX=INDEX1
By default xrGetVulkanGraphicsDevice() will suggest the same GPU the compositor runs on.
It is also possible to override the GPU index suggested to applications with
* XRT_COMPOSITOR_FORCE_CLIENT_GPU_INDEX=INDEX2
The reason this is both done on the service side is that if compositor and client run
on different GPUs, the swapchains use linear tiling instead of optimal tiling.
To make chosen GPUs comparable across the compositor's and the client's vulkan instance,
VkPhysicalDeviceIDProperties.deviceUUID is used.
2020-08-07 17:01:13 +02:00
Jakob Bornecrantz
b7977424fc
st/oxr: Get viewport information from the native compositor
2020-08-06 15:14:49 +00:00
Jakob Bornecrantz
adc6ca8e8a
c/main: Fill out all of the compositor info struct
2020-08-06 15:14:49 +00:00
Jakob Bornecrantz
d1d841e7c3
xrt: Use new info struct for compositor formats
2020-08-06 15:14:49 +00:00
Jakob Bornecrantz
e8ca242967
xrt: Remove flip_y argument to native compositor creation
2020-08-06 15:14:49 +00:00
Jakob Bornecrantz
fb9ebe8b88
st/oxr: Add support for MND_swapchain_usage_input_attachment_bit
2020-08-06 14:28:23 +00:00
Ryan Pavlik
574631166f
st/p: Downgrade an "error" message to a "debug" message.
...
This message is always triggered on my machine by v4l2loopback.
2020-08-05 11:12:16 -05:00
Christoph Haag
c019fce797
st/oxr: Don't crash when native compositor creation fails
...
fixes crash and exits gracefully after
compositor_init_swapchain - Window init_swapchain failed!
XR_ERROR_INITIALIZATION_FAILED in xrCreateSession: Failed to create a native compositor '-1'
2020-08-04 22:32:58 +02:00
Christoph Haag
5d4a49a1c7
st/oxr: Actually return invalid path error in sync actions
2020-08-03 19:00:17 +02:00
Christoph Haag
d06f1c9ef9
st/oxr: error when sync with subactionpath that no action has
2020-08-03 19:00:17 +02:00
Christoph Haag
983665d95c
st/oxr: Respect action set priority for exact matching inputs
...
* Only suppress action when synced actionset has relevant subpath
2020-08-03 19:00:02 +02:00
Christoph Haag
4c8e3eb95f
st/oxr: Don't return early when not using 'any' subpath
...
'any' is only set when xrSyncActions was called with XR_NULL_PATH.
When only left or right is set, the already existing following code does the job.
2020-08-03 18:59:56 +02:00
Jakob Bornecrantz
9ae720b9d4
xrt: Add all remaining swapchain creation flags
2020-07-29 14:46:17 +01:00
Ryan Pavlik
b70d14f6b0
st/oxr: Convert some more missed subaction path iterations to x-macro usage.
...
Also make Doxygen expand macros so that these usages still result
in reasonable developer docs.
2020-07-23 15:40:18 -05:00
Ryan Pavlik
a9a502952a
st/oxr: Fix multiplicity of bound_path per action.
...
Thanks to @haagch for the start of this patch.
2020-07-23 14:34:38 -05:00
Ryan Pavlik
ae59a3ce15
st/oxr: Add design documentation for OpenXR input subsystem.
2020-07-23 14:29:12 -05:00
Ryan Pavlik
5ba5e6b03b
st/oxr: Fix typo
2020-07-23 12:50:17 +01:00
Ryan Pavlik
a04c162ab3
st/oxr: Centralize the lists of subaction paths using x-macros.
2020-07-22 16:00:23 -05:00
Christoph Haag
138fcc49d8
st/oxr: Fix haptic actions being disabled
...
fixes d226a60a
2020-07-22 00:45:44 +02:00
Jakob Bornecrantz
7818a5b9cf
st/oxr: Implement xrEnumerateBoundSourcesForAction
2020-07-21 22:41:13 +00:00
Jakob Bornecrantz
9f684dbc21
st/oxr: Add a very ugly stub implementation of xrGetInputSourceLocalizedName
2020-07-21 22:41:13 +00:00
Jakob Bornecrantz
53a0646e24
st/oxr: Add better verification in xrGetInputSourceLocalizedName
2020-07-21 22:41:13 +00:00
Jakob Bornecrantz
5e629b3437
st/oxr: Tidy header
2020-07-21 22:41:13 +00:00
Christoph Haag
d226a60aac
st/oxr: Combine input values
...
This enables binding two different inputs to the same action, for example
/user/hand/left/input/select/click and /user/hand/left/trigger/click to
the same grab action.
Also takes care of using the correct timestamp of the input that is
responsible for the last overall value change.
2020-07-21 20:59:07 +02:00
Jakob Bornecrantz
b87fd91bc8
st/oxr: Send XrEventDataInteractionProfileChanged events on interaction profile changes
2020-07-20 19:52:31 +01:00
Jakob Bornecrantz
56386aa1d7
st/oxr: Implement needed checks for xrGetCurrentInteractionProfile
2020-07-20 19:34:41 +01:00
Jakob Bornecrantz
b0593d7012
st/oxr: Better error message for unhandled case in xrGetCurrentInteractionProfile
2020-07-20 19:34:41 +01:00
Jakob Bornecrantz
18957e0636
st/oxr: Fix the any handiness controllers not getting assigned to right
2020-07-20 19:34:41 +01:00
Jakob Bornecrantz
9f11287fa3
st/oxr: A slightly better stub implementation of xrEnumerateBoundSourcesForAction
2020-07-20 19:34:41 +01:00
Jakob Bornecrantz
b93017911e
xrt: Make xrt_compositor::create_swapchain return xrt_result_t
2020-07-20 13:50:01 +00:00
Christoph Haag
f18c190eaa
st/oxr: Check if relating space to itself first
2020-07-20 15:41:17 +02:00
Christoph Haag
ddb528f002
st/oxr: Support locating stage space in local space
...
And the other way around.
Fixes hello_xr -s Local, which renders cubes at offset stage space locations,
relative to local space.
2020-07-20 14:05:31 +02:00
Christoph Haag
164eda38d4
st/oxr: use initial head pose as local space origin
...
Implements local space in xrLocateViews, xrLocateSpace, and Quad layers in xrEndFrame.
2020-07-19 23:55:20 +02:00
Ryan Pavlik
6f56d91c05
xrt: Add separate build config for OpenGL ES
2020-07-17 15:17:42 -05:00
Ryan Pavlik
4c5b38c836
st/oxr: Clean up GL/GLES image enumeration a bit for easier maintenance
2020-07-17 13:53:39 -05:00
Ryan Pavlik
852c9b589d
st/oxr: Handle Android better.
2020-07-17 13:53:39 -05:00
Ryan Pavlik
4220638afd
xrt: use _USE_MATH_DEFINES to make sure M_PI gets defined.
2020-07-17 13:53:39 -05:00
Christoph Haag
eb355f3643
st/oxr: Handle quad layer with reference space as base space again
...
fixes d64ef3df
2020-07-17 13:10:20 +02:00
Christoph Haag
d64ef3df74
st/oxr: Basic support for ActionSpace as base space in QuadLayer
2020-07-16 20:02:05 +00:00
Ryan Pavlik
1aa2cdb89a
build: Move determination of Vulkan usage to build system.
...
Vulkan is still required for most actual uses of Monado, but this
makes the coupling weaker.
2020-07-16 10:17:30 +00:00
Ryan Pavlik
54f56716fd
xrt: Rename references to compositor/swapchain/image_fd to ..._native.
...
Reflecting that the native buffer isn't an FD on all platforms.
2020-07-15 09:11:58 -05:00
Jakob Bornecrantz
c37dd46b0c
st/prober: Rework HMD logic a bit and put HMD always in first position
2020-07-14 12:55:18 +01:00
Christoph Haag
b073e3dfb9
xrt: Add support for assigned device roles
...
Abandons the assumption that in oxr_system.xdevs[], index 0 is HMD,
1 is left controller, 2 is right controller.
Now to represent the dynamically assigned roles, oxr_system.role contains
the index for a device in oxr_system.xdevs[] for head, left and right.
This role assignment happens on the client side and currently can not be updated
from the server side.
Also adds an enum that device drivers set indicating allowed assignments
(many controllers are physically designed to be held in a specific hand).
This also adds support for configurations with only a HMD and a right controller.
2020-07-13 18:03:01 +02:00
Christoph Haag
5788fb90a2
drivers: Add rotation/position tracking bool to xdev
...
xrGetSystemProperties() will return these values to application in XrSystemTrackingProperties
using the xdev assigned to head.
2020-07-13 18:03:01 +02:00
Jakob Bornecrantz
deedd10a50
xrt: Tidy xrt_instance_create argument order and add doc-comment
2020-07-08 14:41:12 +00:00
Jakob Bornecrantz
c5b930903e
st/oxr: Fix conformance failure and tidy up action set attached logic
...
This caused a action set to act as if it has been attached, one might say that
this commit fixes a overly attached action set.
Extreme programmed with Ryan Pavlik, which I also ~~stole~~ borrowed the header
comments from verbatim.
2020-07-06 20:11:35 +01:00
Jakob Bornecrantz
59b7bdeee0
st/oxr: Properly name MNDX_ball_on_a_stick_controller
2020-07-06 11:58:42 +01:00
Jakob Bornecrantz
fd8e19718c
st/oxr: Reorder extension in prefix order
2020-07-06 11:42:16 +01:00
Jakob Bornecrantz
8a1c74338c
st/oxr: Make script be up to date to what's generated
2020-07-06 11:42:16 +01:00
Jakob Bornecrantz
8ee7086ea6
xrt: Introduce xrt_swapchain_create_info
2020-07-04 11:04:07 +00:00
Jakob Bornecrantz
ad266672f4
st/gui: Add a special UI for setting log level vars
2020-07-03 19:26:45 +01:00
Jakob Bornecrantz
9848f8b4b8
u/var: Add log level tracker
2020-07-03 19:01:55 +01:00
Christoph Haag
184dd277bf
bindings: Fix Index squeeze/force binding declaration
2020-07-01 18:36:41 +02:00
Christoph Haag
c6d25a9773
st/oxr: Convert action timestamp with time_state_monotonic_to_ts_ns
...
Action timestamps were missing this conversion to XrTime with time_state_monotonic_to_ts_ns()
which caused them to be out of sync with the predicted frame times and device "pose at" timestamps.
2020-06-26 01:41:08 +02:00
Christoph Haag
b7ea0ce2b3
st/oxr: Support next-chained XrSpaceVelocity in XrSpaceLocation
2020-06-26 01:41:08 +02:00
Pete Black
bd5aa24463
xrt: Add multi client and overlay client support
2020-06-25 15:48:34 +01:00
Jakob Bornecrantz
3275f00464
st/oxr: Use a semaphore to ensure wait frame is released after begin frame has been called
2020-06-23 21:31:03 +01:00
Jakob Bornecrantz
b75f4f844b
xrt: Add frame_id to compositor frame calls
2020-06-23 21:31:00 +01:00
Ryan Pavlik
726e446421
st/oxr: Make sure to clear action state metadata in case input is not active.
...
Also addresses some review comments on earlier changes.
2020-06-17 17:27:59 -05:00
Jakob Bornecrantz
5443e3a069
st/oxr: Work around stict-aliasing warning (NFC)
2020-06-17 12:20:30 +01:00
Christoph Haag
7a1dbbe8a1
st/oxr: Ensure quaternion is normalized in xrLocateViews()
...
In rare cases the state tracker's pose transformations resulted in a quaternion
that accumulated float precision errors such that the norm of the quaternion was
not within float precision of 1.0 anymore.
Introduce a function math_quat_ensure_normalized() that can be used after multiple
operations have been performed on a quaternion.
2020-06-17 13:03:34 +02:00
Jakob Bornecrantz
17f40ecc26
st/oxr: Use the transformed boolean value
2020-06-17 11:48:43 +01:00
Ryan Pavlik
1a5d31b82b
st/oxr: New input transform implementation, fixes conformance failures.
...
Includes unit tests for oxr_input_transform, add to CI
This is a revised implementation using "variants" instead of
"inheritance" in a linked-list.
2020-06-17 10:03:32 +00:00
Ryan Pavlik
adbafad079
st/oxr: Rename the remaining oxr_source things to oxr_action
2020-06-16 16:42:38 -05:00
Jakob Bornecrantz
abf8d5b8bd
st/oxr: More correctly handle spaces for layers
2020-06-15 23:59:04 +00:00
Ryan Pavlik
1738329138
st/oxr: Give oxr_action and oxr_action_set ref-counted backing data
2020-06-15 18:11:33 -05:00
Ryan Pavlik
640fa1bbe5
st/oxr: Rename the action set and action keys to distinct names.
2020-06-15 17:09:20 -05:00
Ryan Pavlik
2f8d1a54a5
st/oxr: Reparent action set/action attachment.
...
They are no longer a linked list and a handle, but simple dynamic arrays.
2020-06-15 17:09:15 -05:00
Ryan Pavlik
894aa8d61f
st/oxr: Rename some types, functions, and variables for clarity
2020-06-15 17:08:05 -05:00
Ryan Pavlik
6fe801e766
st/oxr: Re-use a structure
2020-06-15 17:04:00 -05:00
Ryan Pavlik
6be05e2107
st/oxr: Factor out source cache teardown function
2020-06-15 17:04:00 -05:00
Ryan Pavlik
4a4bed8df4
st/oxr: Handle treadmill user path
2020-06-15 17:04:00 -05:00
Ryan Pavlik
2a2157af66
st/oxr: Clean up comments
2020-06-15 10:46:29 -05:00
Jakob Bornecrantz
cbb91904e9
st/oxr: Remove old validation that's now done in api function
2020-06-14 23:01:13 +01:00
Jakob Bornecrantz
2dcf4a819b
st/oxr: Improve xrSuggestInteractionProfileBindings validation of input
2020-06-14 23:01:13 +01:00
Jakob Bornecrantz
e4a4a5e7b2
st/oxr: Use correct enum type when converting from eye visibility NFC
2020-06-13 13:58:14 +01:00
Jakob Bornecrantz
45c977d199
xrt: Introduce xrt_sub_image and xrt_layer_projection_view_data
2020-06-09 20:32:53 +01:00
Jakob Bornecrantz
259bd52dbd
st/oxr: Convert layer bits from OpenXR to XRT
2020-06-09 19:04:48 +00:00
Jakob Bornecrantz
55e026245a
xrt: Use new xrt_layer_data in layer functions
2020-06-09 19:04:48 +00:00
Ryan Pavlik
435f6c5c89
build: Allow enabling inter-procedural optimization in CMake builds, if supported.
2020-06-09 12:03:08 -05:00
Christoph Haag
bc995e3aab
ipc: Return XR_ERROR_INSTANCE_LOST instead of SIGABRT on the client side
2020-06-05 16:06:32 +02:00
Christoph Haag
cc9b415a8f
xrt: Add xrt_result_t return type to many functions
...
Many functions returned void and were assumed to always succeed, and some functions
returned only a bool to indicate vague success/failure.
Now that these functions get piped over IPC all of them have to be able to indicate
an IPC failure like for example an unreachable service.
With the xrt_result_t return type they now have the opportunity to report various
types of failures.
2020-06-05 16:06:32 +02:00
Jakob Bornecrantz
dab96ef356
st/oxr: Validate view configuration type
2020-06-04 21:56:08 +00:00
Ryan Pavlik
c39df58763
st/oxr: Additional doxygen improvements.
2020-06-03 17:26:35 -05:00
Ryan Pavlik
bc6cc85e7d
xrt: Improve doxygen documentation.
2020-06-03 16:28:18 -05:00
Jakob Bornecrantz
9f8761bd50
st/oxr: Tiny improvement to validation message
2020-06-03 09:30:18 +01:00
Jakob Bornecrantz
3fde4a0651
st/oxr: Update copyright in files touched by this MR
2020-06-03 09:30:18 +01:00
Jakob Bornecrantz
a5d64e6565
st/oxr: Some minor spelling changes
2020-06-03 09:30:18 +01:00
Jakob Bornecrantz
a36753443a
st/oxr: Make all oxr_error calls uniform and improve output
2020-06-03 09:30:18 +01:00
Jakob Bornecrantz
f4fadc6f55
st/oxr: Validate xrSuggestInteractionProfileBindings better
2020-06-03 09:30:18 +01:00
Jakob Bornecrantz
6ff4b23a76
st/oxr: Add a lightweight function to test for XrPath validness
2020-06-03 09:30:18 +01:00
Jakob Bornecrantz
2b60f70d30
st/oxr: Validate attachmentness of action sets and actions better
2020-06-03 09:30:18 +01:00
Jakob Bornecrantz
6fc410dadd
st/oxr: Do dup checking on actions and action sets
2020-06-03 09:30:18 +01:00
Jakob Bornecrantz
e5c9636f10
st/oxr: Correct the error messages on sub action paths errors
2020-06-03 09:30:18 +01:00
Jakob Bornecrantz
6d61b9dec2
st/oxr: Correct localized name validation
2020-06-03 09:30:18 +01:00
Jakob Bornecrantz
a69cae7516
st/oxr: Improve subImage bounds checking
2020-06-03 09:30:18 +01:00
Jakob Bornecrantz
981bae8d0a
st/oxr: Return correct error on bad sub action path
2020-06-02 13:02:04 +01:00
Jakob Bornecrantz
00818881de
st/oxr: Use correct path for gamepad
2020-06-02 13:02:04 +01:00
Jakob Bornecrantz
57af7a7ce4
st/oxr: Correctly wait with emitting sync event
2020-06-02 13:02:04 +01:00
Jakob Bornecrantz
f0e160f45c
st/oxr: Improve the xrGetReferenceSpaceBoundsRect stub-ness
2020-06-02 13:02:04 +01:00
Jakob Bornecrantz
d693bc2ef9
st/oxr: Enforce static swapchain acquire semantics
2020-06-02 13:02:04 +01:00
Jakob Bornecrantz
cdfd03a762
st/oxr: Overhaul the acquire, wait, release handling
2020-06-02 13:02:04 +01:00
Jakob Bornecrantz
b3523a7259
st/oxr: Protoct event queue with a mutex
2020-06-02 13:02:04 +01:00
Jakob Bornecrantz
76e4092e30
st/oxr: Purge event queue of destroyed sessions
2020-06-02 13:02:04 +01:00
Jakob Bornecrantz
185036489c
st/oxr: Ensure get gfx requirements has been called
2020-06-02 13:02:04 +01:00
Jakob Bornecrantz
12d78144f6
st/oxr: Verify XrViewConfigurationType in xrEnumerateEnvironmentBlendModes
2020-06-02 13:02:04 +01:00
Jakob Bornecrantz
fb867b02c3
xrt: Remove array_size field on xrt_swapchain
2020-06-02 13:02:04 +01:00
Christoph Haag
f68252bfbe
st/oxr: Check quadlayer swapchain for NULL
2020-06-01 18:38:54 +02:00
Christoph Haag
6045742561
st/oxr: Translate relation_flags in oxr_space_locate()
2020-05-29 01:46:42 +02:00
Christoph Haag
7fe0f3610b
st/oxr: Fill entire xrt_space_relation in oxr_xdev_get_pose_at, not just pose
...
In particular the relation_flags indicate whether the pose is valid or a fallback pose.
2020-05-29 01:25:57 +02:00
Christoph Haag
f10b341f57
st/oxr: Don't assert on invalid pose
...
ensure_valid_position_and_orientation() inserts fallback poses when
driver reported poses are invalid.
2020-05-29 01:09:54 +02:00
Christoph Haag
c9b692903c
st/oxr: Don't indiscriminately set orientation & position to valid in oxr_space_action_relation()
2020-05-29 01:02:31 +02:00
Christoph Haag
3bdc57c4b3
st/oxr: Don't indiscriminately set orientation & position to valid in ensure_valid_position_and_orientation()
2020-05-29 00:57:35 +02: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
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
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
c42675437b
st/gui: Remove no-longer-needed timekeeping.
2020-05-27 18:40:56 -05: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
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
3624c17754
st/oxr: Fix some warnings by initializing variables.
2020-05-26 11:25:03 -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
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
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
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
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
Lubosz Sarnecki
03074cd52e
st/oxr: Unreleased swapchain must return XR_ERROR_LAYER_INVALID.
2020-05-11 20:21:58 +01:00
Christoph Haag
5b2efcbb7a
st/prober: Fix typo in error message
2020-05-09 13:12:06 +00:00
Jakob Bornecrantz
694d978e25
st/prober: Name the tracking origin and make offset editable
2020-05-09 12:43:26 +01: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
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
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
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
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
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
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
Ryan Pavlik
c191f4bc30
st/oxr: Codespell fixes
2020-04-24 15:30:46 -05:00
Jakob Bornecrantz
e37d8f4cf5
xrt: Remove timestate from xrt_device interface
2020-04-16 17:29:34 +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
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
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
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
9d009784b6
st/gui: Show name of device when no modes are found
2020-04-08 10:51:12 +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
Jakob Bornecrantz
9ff0ee2e6a
st/gui: Fix compilation issue with OpenCV
...
Closes #63
2020-03-25 19:59:16 +00:00
Jakob Bornecrantz
e3516061bb
u/var: Add expand RO values
2020-03-25 13:58:51 +00:00
Ryan Pavlik
377ae07e53
xrt: Add missing SPDX tags
2020-03-23 17:29:43 -05: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
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
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
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
b1b08a610c
st/prober: Add missing includes
2020-03-04 11:15:35 +00:00
Ryan Pavlik
d4c5b37bc0
st/oxr: Fix 32-bit warnings
2020-03-03 10:50:41 +00:00
Ryan Pavlik
163b39b7a1
st/oxr: Fix some 32-bit porting warnings.
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
Jakob Bornecrantz
0619190d2b
build: Refactor how config defines are handled
...
With loads of changes from Ryan.
2020-03-03 10:33:14 +00:00
Jakob Bornecrantz
a925af90e7
xrt: Do not pass in timestate into compositor
2020-03-02 20:18:49 +00:00
Jakob Bornecrantz
aeef692e08
xrt: Refactor out main compositor creating into own interface
2020-03-02 12:00:22 +00:00
Ryan Pavlik
c590a3f69b
st/oxr: Fix segfault in conformance
2020-01-31 10:47:52 +01:00
Jakob Bornecrantz
0df88dedca
st/gui: Add support for Leap Motion Controller
2020-01-26 19:37:37 +00:00
Jakob Bornecrantz
ca06c16eeb
st/gui: Better conversion sinks
2020-01-26 19:37:37 +00:00
Jakob Bornecrantz
16eb05e089
u/sink: Make quirk sink creation parameters into a struct.
2020-01-26 19:37:37 +00:00
Jakob Bornecrantz
21ed0facb7
st/gui: Add a bit hacky pose controls
2020-01-25 16:39:57 +00:00
Jakob Bornecrantz
b3e84f9041
xrt: Make sure that auto probers can add non-HMD devices after a HMD has been found
2020-01-23 15:51:36 +00:00
Jakob Bornecrantz
c2560ae6d2
xrt: Switch to new quirking sink
...
This is done in one commit as split out they would leave the code
in a fairly broken state.
2020-01-17 14:31:50 +00:00
Jakob Bornecrantz
67d33550cf
t/calib: Change how default arguments are applied
2020-01-17 12:09:08 +00:00
Jakob Bornecrantz
8564bbec4f
st/prober: Update GUI with new truths
2020-01-16 23:04:14 +00:00
Ryan Pavlik
5592ed28da
xrt: Make vkGetInstanceProcAddr prototype available.
2020-01-16 22:37:39 +00:00
Ryan Pavlik
0df4dc2be1
st/prober: Fix typo
2020-01-16 22:37:29 +00:00
Ryan Pavlik
fcdebc6e9d
aux/tracking: Re-organize structs related to camera calibration.
...
Removes the "raw" data structures for camera calibration, not needed.
The only thing they contained beyond the revised regular structures
was derived data that the consumer might parameterize differently.
Renames t_settings_stereo to t_stereo_camera_calibration.
The calibration info is data (that could be stored on the device, etc),
not settings.
2020-01-16 09:07:52 -06:00
Ryan Pavlik
b44f14d348
st/gui: Display the calibration status data.
2020-01-14 15:55:50 -06:00
Ryan Pavlik
9790ca7602
t/calib: Add interface for getting some status info on calib process.
2020-01-14 15:55:50 -06:00
Ryan Pavlik
dec5d8de7d
st/gui: Update camera calibration config GUI
2020-01-14 15:55:50 -06:00
Ryan Pavlik
871395d5b5
build: Adjust meson build equivalently
2020-01-14 12:28:23 -06:00
Ryan Pavlik
c68d3bfe54
build: Adjust CMake build to allow actually disabling dependencies/options
2020-01-14 11:51:12 -06:00
Ryan Pavlik
f834d20300
xrt: Move OpenXR platform defines to build system
2020-01-14 11:51:12 -06:00
Ryan Pavlik
67a561d0ea
st/oxr: Fix ifdef guards
2020-01-14 11:51:12 -06:00
Jakob Bornecrantz
c383a933ea
st/oxr: Propegate device input active status through API
2020-01-13 21:59:37 +00:00
Ryan Pavlik
4cc9380f0b
st/oxr: Fix missing include.
2020-01-09 17:36:24 -06:00
Ryan Pavlik
9e953083fc
st/oxr: Move shipped binding data into a separate header to avoid re-declaration of statics
2020-01-09 17:35:54 -06:00
Ryan Pavlik
13c099f59e
xrt: Fix for mismatched parameter names
2020-01-09 22:54:01 +00:00
Christoph Haag
bc20d84171
st/oxr: Also make sure to keep actions with outputs active
2020-01-09 02:13:08 +01:00
Christoph Haag
a3d04090c5
st/oxr: Always make actions active that have inputs
...
If an applications only syncs a subset of action sets, the actions from all
sets that are not synced get the active bit reset.
Once the application starts syncing the previously not synced sets again,
the actions have to become active again.
2020-01-09 02:12:59 +01:00
Ryan Pavlik
e49fdd8523
st/oxr: EGL extension requires OpenGL enabled
2019-12-07 18:25:37 +00:00
Ryan Pavlik
51c3240c23
st/oxr: Improve extension support header.
2019-12-07 18:25:37 +00:00
Ryan Pavlik
f25b5d7f8d
st/gui: clang-tidy
2019-12-07 18:25:37 +00:00
Ryan Pavlik
06ce6617f5
st/oxr: Port logger realloc to helper macro
2019-12-07 18:24:56 +00:00
Ryan Pavlik
b47428b451
st/p: Convert to realloc macro
2019-12-07 18:24:56 +00:00
Ryan Pavlik
f6d3aabc08
st/oxr: Convert remaining realloc in binding code
2019-12-07 18:24:56 +00:00
Ryan Pavlik
2b5fa2c57f
st/p: Fix enum types in libusb usage
2019-12-07 18:24:56 +00:00
Ryan Pavlik
447b3550e8
st/oxr: Fix enum types in shipped bindings
2019-12-07 18:24:56 +00:00
Ryan Pavlik
2751824e16
st/gui: Type safety fixes
2019-12-07 18:24:56 +00:00
Ryan Pavlik
808892742b
st/p: Fix allocation size error with realloc macro
2019-12-03 09:39:06 -06:00
Ryan Pavlik
f20a0e14e0
st/oxr: Fix oversized allocation in binding code
2019-12-03 09:39:06 -06:00
Ryan Pavlik
a602b2247f
st/oxr: Fix bug in get current interaction profile.
...
We returned the path instead of putting it in the out value.
2019-12-03 09:39:06 -06:00
Jakob Bornecrantz
9b60bd7c77
t/calib: Add support to load images
2019-11-22 14:20:56 +00:00
Jakob Bornecrantz
3f202d0d6f
t/calib: Make cooldown period separate from wait period
2019-11-22 12:36:23 +00:00
Jakob Bornecrantz
86dc9e1a6b
t/calib: Re-organize parameters and make it possible to select board type
2019-11-22 12:36:23 +00:00
Jakob Bornecrantz
9a4b55758a
st/gui: Add support for mirror RGB option
2019-11-21 22:43:04 +00:00
Jakob Bornecrantz
84f9ad962c
st/gui: Tidy UI
2019-11-20 23:50:42 +00:00
Jakob Bornecrantz
ff4b91c688
st/gui: Expose fisheye option
2019-11-20 23:50:42 +00:00
Jakob Bornecrantz
dc6da46852
st/gui: Add option to save image and add separators"
2019-11-20 23:50:42 +00:00
Jakob Bornecrantz
d6317b2a14
st/gui: Expose new parameters to calibration
2019-11-20 23:50:42 +00:00
Simon Ser
c395f85565
oxr: add XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR support
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
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
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
ee3d9d08f6
u/time: Send in a pointer to pointer to the timekeeping destroy function
2019-11-15 20:30:01 +00:00