Commit graph

1410 commits

Author SHA1 Message Date
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
Ryan Pavlik 876c8bc5d7 inc/xrt: Remove now-unneeded enum. 2020-06-17 11:48:43 +01: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
Christoph Haag fb103659ef build: Support building with v4l2 installed but driver disabled 2020-06-17 11:33:13 +02: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 d778c236fe c/client: A working but non-spec conforming way to get Vulkan clients working 2020-06-16 16:33:04 +01:00
Jakob Bornecrantz 04c150a50d xrt: Add new error and types for Vulkan command buffers 2020-06-16 00:01:48 +00:00
Benjamin Saunders f81f568931 aux/vk: Add helper to translate usage bits to Vulkan bits 2020-06-16 00:01:48 +00:00
Benjamin Saunders fe734bb6e2 aux/vk: Add functions to create semaphores from FDs 2020-06-16 00:01:48 +00:00
Benjamin Saunders 3f744331e1 aux/vk: Declare consistent usage for xr swapchain images 2020-06-16 00:01:48 +00:00
Benjamin Saunders 27d2163f37 aux/vk: Delete nonsensical image usage case 2020-06-16 00:01:48 +00:00
Benjamin Saunders f45f482d5e aux/vk: Store Vulkan queue handle directly 2020-06-16 00:01:48 +00:00
Jakob Bornecrantz 65dcc82e3a comp+ipc: Respect view space layer flag 2020-06-15 23:59:04 +00:00
Jakob Bornecrantz abf8d5b8bd st/oxr: More correctly handle spaces for layers 2020-06-15 23:59:04 +00:00
Jakob Bornecrantz fbd41e0413 xrt: Add new layer flag for view space poses 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 821706e0e4 u/hashmap: Add "empty" function.
Used for cleanup assertions to start with: i.e. at some known point,
the hash map should be empty.
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
Ryan Pavlik 79b2cf6703 inc/xrt: Improve docs 2020-06-15 10:36:28 -05:00
Christoph Haag 8141a3c761 ipc: Reset waitframe semaphore when client disconnects
The semaphore was usually kept at a value of 1 after a client disconnected,
meaning the next client to connect was never blocked on it.
2020-06-15 15:47:56 +02: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
Gonzalo Aguilar Delgado cdde7cd2c2 FIX #88: Add required dependencies 2020-06-13 17:05:14 +00:00
Jakob Bornecrantz e4a4a5e7b2 st/oxr: Use correct enum type when converting from eye visibility NFC 2020-06-13 13:58:14 +01:00
Ryan Pavlik 172ff0f434 ipc: Simplify code by just copying a structure. 2020-06-09 17:13:06 -05:00
Ryan Pavlik 1881bb6357 ipc: Further de-duplication of structures 2020-06-09 17:07:22 -05:00
Ryan Pavlik b6b5052d48 ipc: Remove structs that effectively duplicate xrt_layer_data
The only non-duplicate members are the swapchain IDs,
so store those in their own array as already done elsewhere in the
codebase.
2020-06-09 17:07:22 -05:00
Ryan Pavlik f407fb9461 ipc: Doc comments 2020-06-09 17:07:22 -05:00
Ryan Pavlik eaa4c186ce ipc: Port to using xrt_sub_image where possible.
This highlighted several places where we are not considering an image rect,
but possibly should be.
2020-06-09 16:26:01 -05:00
Ryan Pavlik 26ab046fba comp: Remove no-longer-needed comp_layer_quad struct.
Replaced by xrt_comp_layer_quad.
Also add some comments.
2020-06-09 16:19:39 -05:00
Ryan Pavlik 7446dc08d5 xrt: Rename output parameter of acquire_image to out_image.
As is tradition.
2020-06-09 15:56:26 -05:00
Ryan Pavlik 03f85fcd0a inc/xrt: Doc comment improvements 2020-06-09 15:52:33 -05:00
Ryan Pavlik d7562ba65c fixup commit 2020-06-09 15:32:51 -05:00
Ryan Pavlik 8ffad1112f inc/xrt: Update docs to fix Doxygen warnings 2020-06-09 15:32:39 -05:00
Ryan Pavlik e0e5aeceda xrt: name xrt_swapchain pointers consistently "xsc" or similar.
As is tradition.
2020-06-09 15:29:46 -05: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
Jakob Bornecrantz 320c9ab3cb ipc+comp: Use new xrt_layer_data and friends struct 2020-06-09 19:04:48 +00:00
Jakob Bornecrantz 5912964ded ipc+comp: Even more make layers the same 2020-06-09 19:04:48 +00:00
Lubosz Sarnecki 08d81e5950 ipc+comp: Make layer structs more consistent.
Add missing fields.
Sort layer struct members.
ipc/protocol: Move xdev_id and name to common layer struct.
2020-06-09 19:04:48 +00:00
Jakob Bornecrantz 15be0209b9 xrt: Introduce xrt_layer_[quad|stereo_projection]_data struct 2020-06-09 19:04:48 +00:00
Lubosz Sarnecki cbb8573d35 xrt: Move layer enums to compositor header. 2020-06-09 19:04:47 +00:00
Lubosz Sarnecki b1d39e7f07 xrt: Move layer enum to xrt namespace. 2020-06-09 19:04:47 +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
Christoph Haag db5db10a19 ipc: Replace ipc_result_t with global xrt_result_t
Functions down the line should be able to fail and return a status.

They can be called either through IPC or directly depending on compile settings,
therefore we need an internal result type for various XR_ERROR_* errors, but also IPC failure.

For now functions in ipc_client_utils.c only return XRT_SUCCESS or XRT_ERROR_IPC_FAILURE.
If there is no IPC failure, the generated protocol will extract and return the called functions'
actual return value from the reply.

v2: make failure results negative
2020-06-05 16:02:38 +02:00
Jakob Bornecrantz dab96ef356 st/oxr: Validate view configuration type 2020-06-04 21:56:08 +00:00
Jakob Bornecrantz 077087bb15 xrt: Introduce xrt_comp_fd_destroy to avoid some error prone casting 2020-06-04 16:37:06 +00:00
Ryan Pavlik c39df58763 st/oxr: Additional doxygen improvements. 2020-06-03 17:26:35 -05:00
Ryan Pavlik 4ee0ad7767 comp/client: Decrease visibility of downcast helpers. 2020-06-03 16:28:36 -05:00
Ryan Pavlik d0468a7697 inc/xrt: Remove no-longer-needed fd-related downcast helpers. 2020-06-03 16:28:36 -05:00
Ryan Pavlik cc609f5fb7 comp/client: Use helper functions, comment. 2020-06-03 16:28:36 -05:00
Ryan Pavlik 0f7fe8f3fa inc/xrt: Add a specialized create_swapchain helper for xrt_compositor_fd 2020-06-03 16:28:36 -05:00
Ryan Pavlik b38a8e8c24 targets/service: Remove unneeded xrt_prober_create function. 2020-06-03 16:28:21 -05:00
Ryan Pavlik bc6cc85e7d xrt: Improve doxygen documentation. 2020-06-03 16:28:18 -05:00
Lubosz Sarnecki 435d5a9b9e c/comp: Remove internal Vulkan validation init.
Instead of maintaining this chunk of code and build options, the Vulkan
loader can be used to load up validation. This has the advantage that no
layer name needs to be hard coded inside Monado, which was subject of
change recently.

Instead of using our own environment variable we can easily set the one
from the loader, e.g. `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`.
2020-06-03 11:17:51 +00: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
Jakob Bornecrantz 09baeb91bc c/swapchain: Close and remaining open FDs 2020-06-02 13:02:04 +01:00
Jakob Bornecrantz 753b910b5a c/swapchain: Don't only give out the zero index 2020-06-02 13:02:04 +01:00
Jakob Bornecrantz 5b0085f1c1 c/client: Mark consumed FDs as invalid 2020-06-02 13:02:04 +01:00
Jakob Bornecrantz 9ec0b559d4 ipc/util: Don't follow null pointers and add alignment paranoia 2020-06-02 13:02:04 +01:00
Jakob Bornecrantz 05827abd8e ipc/server: Fix swapchain handling 2020-06-02 13:02:04 +01:00
Jakob Bornecrantz ebd5773fb8 util: Add function for u_hashset to allocate a item 2020-06-02 13:02:04 +01:00
Jakob Bornecrantz 0d2a24b9a0 util: Add a index fifo 2020-06-02 13:02:04 +01:00
Jakob Bornecrantz 371622c199 d/psvr: Normalize rotation 2020-06-02 13:02:04 +01:00
Lubosz Sarnecki 7186bddf60 c/comp+ipc: Use array indices again.
This fixes a regression introduced by the IPC and layer rendering
patchsets and passes the array_index to the correct places, so the
correct VkImageView is used instead of the one with index 0.
2020-06-02 12:42:42 +02:00
Christoph Haag f68252bfbe st/oxr: Check quadlayer swapchain for NULL 2020-06-01 18:38:54 +02:00
Jakob Bornecrantz 77c2b9cb5d c/main: Include <math.h> in comp_layer_renderer.c 2020-05-29 23:37:22 +01:00
Jakob Bornecrantz ace4d0e825 os/threading: Incude xrt_compiler.h 2020-05-29 23:36:23 +01: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
Christoph Haag 384114b821 d/survive: Don't invert valid position condition 2020-05-29 00:35:58 +02:00
Lubosz Sarnecki 1e8106c974 c/compositor: Render multiple layers without IPC.
Hook up layer rendering when XRT_FEATURE_SERVICE is not set.
2020-05-28 22:16:57 +00:00
Lubosz Sarnecki 4ad806df38 ipc/server_process: Check for swapchain NULL pointer.
Skip rendering when swapchains are invalid.
2020-05-28 22:16:57 +00:00
Jakob Bornecrantz 066009c0c5 c/layer_renderer: Enable blending. 2020-05-28 22:16:57 +00:00
Lubosz Sarnecki d0539161dc c/renderer+ipc: Use layer renderer.
Make the renderer and IPC aware of multiple projection and quad layers
using the layer renderer.

Remove redundant code related to idle images and imported buffers and
command buffer rebuild, since we now always just display the layer
renderer's frame buffer.

Get view and projection properties from xrt_device.
2020-05-28 22:16:57 +00:00
Lubosz Sarnecki aedd4d9ff8 c/layers: Implement layer renderer.
Implements a layer renderer capable of handling multiple quad
and projection layers rendered in it's own Vulkan pipeline.
2020-05-28 22:16:57 +00:00
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