Commit graph

213 commits

Author SHA1 Message Date
Jakob Bornecrantz 0d05eb6cae xrt: Make some fields on xrt_gl_swapchain private 2020-07-20 13:50:01 +00:00
Jakob Bornecrantz 34843c3ffe xrt: Make some fields on xrt_vk_swapchain private 2020-07-20 13:50:01 +00:00
Ryan Pavlik 6f56d91c05 xrt: Add separate build config for OpenGL ES 2020-07-17 15:17:42 -05:00
Ryan Pavlik 852c9b589d st/oxr: Handle Android better. 2020-07-17 13:53:39 -05:00
Ryan Pavlik 4a22851e4a meson: Re-arrange config header code 2020-07-17 13:53:39 -05:00
Ryan Pavlik 19efff937e inc/xrt: Sort defines in generated config header 2020-07-17 13:53:39 -05:00
Ryan Pavlik 1476d396f8 build: Enable the Android Vulkan platform when applicable. 2020-07-17 11:46:22 -05:00
Ryan Pavlik 8fdfb42d21 inc/xrt: Switch declaration order in xrt_handles to quiet Doxygen 2020-07-17 11:46:22 -05:00
Ryan Pavlik 25627e55ca inc/xrt: Add helpers for the handle types - null value, validity checker 2020-07-16 13:06:07 -05: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 c3552ed420 xrt: Rename xrt_gfx_fd.h to xrt_gfx_native.h 2020-07-15 17:19:30 -05: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
Ryan Pavlik 86d93601d7 ipc: Work on Android using AHardwareBuffer instead of FDs for graphics 2020-07-14 16:37:55 -05:00
Ryan Pavlik 030e5564ff xrt: Auto-detect Android in header 2020-07-14 16:37:55 -05:00
Ryan Pavlik 0e0f4b780e inc/xrt: Add handle typedefs, to use instead of "int" for file descriptors 2020-07-14 16:24:26 -05:00
Christoph Haag 54f01b570c build: Enable service less build with meson too 2020-07-14 02:16:06 +02: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 8ee7086ea6 xrt: Introduce xrt_swapchain_create_info 2020-07-04 11:04:07 +00:00
Jakob Bornecrantz 1b11abe6eb xrt: Tidy xrt_compositor.h 2020-07-04 11:04:07 +00:00
Lubosz Sarnecki d047ce8af4 d/vive/controller: Add Vive tracker gen 2 support. 2020-07-02 19:29:14 +02:00
Lubosz Sarnecki 6662e0caef d/vive/controller: Add Vive tracker gen 1 support. 2020-07-02 19:29:14 +02:00
Pete Black bd5aa24463 xrt: Add multi client and overlay client support 2020-06-25 15:48:34 +01:00
Jakob Bornecrantz b75f4f844b xrt: Add frame_id to compositor frame calls 2020-06-23 21:31:00 +01:00
Jakob Bornecrantz 5ac0c7a139 xrt: Make prepare_session and poll_events return xrt_result_t 2020-06-23 12:39:57 +01:00
Ryan Pavlik 876c8bc5d7 inc/xrt: Remove now-unneeded enum. 2020-06-17 11:48:43 +01:00
Christoph Haag fb103659ef build: Support building with v4l2 installed but driver disabled 2020-06-17 11:33:13 +02:00
Jakob Bornecrantz 04c150a50d xrt: Add new error and types for Vulkan command buffers 2020-06-16 00:01:48 +00:00
Jakob Bornecrantz fbd41e0413 xrt: Add new layer flag for view space poses 2020-06-15 23:59:04 +00:00
Ryan Pavlik 79b2cf6703 inc/xrt: Improve docs 2020-06-15 10:36:28 -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 55e026245a xrt: Use new xrt_layer_data in layer functions 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
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 077087bb15 xrt: Introduce xrt_comp_fd_destroy to avoid some error prone casting 2020-06-04 16:37:06 +00:00
Ryan Pavlik d0468a7697 inc/xrt: Remove no-longer-needed fd-related downcast helpers. 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 bc6cc85e7d xrt: Improve doxygen documentation. 2020-06-03 16:28:18 -05:00
Jakob Bornecrantz fb867b02c3 xrt: Remove array_size field on xrt_swapchain 2020-06-02 13:02:04 +01:00
Ryan Pavlik 8c54139f79 inc/xrt: Remove declaration of xrt_prober_create. 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
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
Ryan Pavlik 525f9c09f2 inc/xrt: Documentation improvements and cleanups. 2020-05-26 11:24:57 -05: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
Jakob Bornecrantz 84700f3209 xrt: Add layers to the compositor interface 2020-05-26 11:33:58 +01:00
Christoph Haag 07d8fdae46 build: Set XRT_HAVE_V4L2 in meson too 2020-05-25 20:50:33 +02: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 5935fad73b ipc: Add ability for service to be launched by systemd socket activation. 2020-05-07 16:54:11 -05: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 220f37a75d xrt: Add build config file for optinal components 2020-04-29 14:58:24 +01: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
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 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
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 b8b6e958f2 xrt: Fix FTBFS on ppc64, s390x 2020-04-24 20:34:53 +00:00
Jakob Bornecrantz e37d8f4cf5 xrt: Remove timestate from xrt_device interface 2020-04-16 17:29:34 +01:00
Jakob Bornecrantz ec076a0d5b xrt: Add helper functions for xrt_swapchain 2020-04-11 15:44:44 +01:00
Jakob Bornecrantz 69043bbf33 xrt: Add helper functions to xrt_device. 2020-04-11 00:55:14 +01:00
Jakob Bornecrantz 3b084b5c91 xrt: Add new xrt_instance object 2020-04-10 13:32:25 +01: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 1ccfa236db xrt: Tidy whitespace 2020-04-09 15:08:11 +01:00
Jakob Bornecrantz c99546e88f xrt: Add some docu to refcount function 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 a0be6e139a xrt: Add xrt_vec2_i32 2020-03-11 21:36:49 +00: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 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
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 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
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
Jakob Bornecrantz a7dff8284a xrt: Tidy xrt_vulkan_includes.h 2020-02-29 21:09:18 +00:00
Jakob Bornecrantz a228c3efff xrt: Slightly more correct Display typedef
Closes #49
2020-02-24 16:58:15 +00:00
Jakob Bornecrantz 576fcac5ae xrt: Add interleaved stereo format 2020-01-26 19:37:36 +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 4024bd454a xrt: Expose the name of the frameserver source 2020-01-17 14:31:45 +00:00
Ryan Pavlik 5592ed28da xrt: Make vkGetInstanceProcAddr prototype available. 2020-01-16 22:37:39 +00:00
Ryan Pavlik f834d20300 xrt: Move OpenXR platform defines to build system 2020-01-14 11:51:12 -06:00
Jakob Bornecrantz 7082a599c7 xrt: Make it possible for the device set active status on inputs 2020-01-13 21:59:37 +00:00
Ryan Pavlik 13c099f59e xrt: Fix for mismatched parameter names 2020-01-09 22:54:01 +00:00
Jakob Bornecrantz 35fcd2ae3d xrt: Add xrt_matrix_3x3 2020-01-09 15:22:14 +00:00
Ryan Pavlik 90e57a4e8a xrt: Fix types related to EGL.
Fixes #46
2019-12-03 09:30:31 -06: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
Ryan Pavlik 29c630cec8 d/psvr: Port PSVR to use timestamps 2019-11-14 12:14:58 +00:00