Commit graph

183 commits

Author SHA1 Message Date
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
Ryan Pavlik 194938c405 d/psmv: Port positional tracking to use t_imu_fusion with timestamps 2019-11-14 12:14:58 +00:00
Drew DeVault e5a9cbb2f9
Implement XR_MND_egl_enable
This extension introduces a more robust way of creating an XrSession for
OpenGL. It also lays the groundwork for future OpenGL ES support.

https://github.com/KhronosGroup/OpenXR-Docs/pull/40

Signed-off-by: Simon Ser <contact@emersion.fr>
Signed-off-by: Drew DeVault <sir@cmpwn.com>
2019-11-06 10:07:21 +01:00
Jakob Bornecrantz 7c73a1b6bd xrt: Tidy xrt_compiler.h and silence some doxygen warnings 2019-11-02 22:54:23 +00:00
Jakob Bornecrantz 1abdae5b64 xrt: Add helper functions for xrt_compositor 2019-10-28 20:56:33 +00:00
Jakob Bornecrantz 9d238d7313 xrt: Refactor mesh distortion fields 2019-10-25 13:05:54 +00:00
Jakob Bornecrantz aa52da072f xrt: Remove relation input type 2019-10-24 21:51:07 +01:00
Ryan Pavlik 0ebf754996 xrt: Add XRT_GET_INPUT_TYPE, document XRT_INPUT_NAME 2019-10-24 21:43:18 +01:00
Ryan Pavlik 166bee167e xrt: Comment the input types 2019-10-24 21:43:14 +01:00
Jakob Bornecrantz ccd139ab68 xrt: Add xrt_atomic_cmpxchg 2019-10-23 23:39:22 +01:00
Lubosz Sarnecki 6eb1086578 st/prober: Add string functions.
Functions for printing and matching xrt_proper_string.
2019-10-22 19:18:47 +02:00
Jakob Bornecrantz cd5153dead xrt: Spelling 2019-10-22 12:10:20 +01:00
Lubosz Sarnecki 783a36fbcc st/prober: Add libusb error strings and can open function.
The prober will now output libusb errors as string. This patch also adds
a `can_open` function to the prober, that opens and closes device with
libusb to ensure devices can be opened.

This makes it possible to ensure early that permissions on the device
are correct.
2019-10-11 15:56:30 +01:00
Lubosz Sarnecki 6ec8721899 xrt: Add num_devices to prober found interface.
In order to access multiple devices the prober found interface needs to
pass the length of the device list. This patch updates the found
interface in all drivers.
2019-10-11 15:56:20 +01:00
Jakob Bornecrantz fece0458b6 t/psmv: Make it possible to get the tracked ball pose 2019-10-11 15:40:42 +01:00
pblack 898c1b4a9f comp: Add mesh distortion shader 2019-10-10 13:28:01 +01:00
Jakob Bornecrantz b37eb0f55b xrt: Add xrt_size struct 2019-09-29 15:43:54 +01:00
Jakob Bornecrantz 42f4784d14 xrt: Code style, pointer star location 2019-09-29 11:45:19 +01:00
Jakob Bornecrantz 387bc123f8 xrt: Expand tracking interface 2019-09-21 18:22:06 +01:00
Jakob Bornecrantz 51dafe7b05 xrt: Add usb_dev_class to xrt_prober_device 2019-09-18 13:03:01 +01:00
Jakob Bornecrantz 46389cd6ae xrt: Send in real prober to auto probers 2019-09-15 23:24:58 +01:00
Jakob Bornecrantz c021199b98 xrt: Add interface to prober to open video devices 2019-09-07 14:34:20 +01:00
Jakob Bornecrantz 3b1abffa2d xrt: Refactor frameserver start stream arguments 2019-09-07 14:34:20 +01:00
Jakob Bornecrantz 5e3d5295b7 xrt: Add xrt_vec3_i32 2019-09-06 18:12:15 +01:00
Jakob Bornecrantz 29b1713be9 xrt: Add enum xrt_device_name so that state trackers can reason about device 2019-09-04 12:47:18 +01:00
Jakob Bornecrantz a0f2793457 xrt: It's a cross not a x 2019-09-03 15:26:10 +01:00
Jakob Bornecrantz f5a93699cb xrt: Add XRT_NO_INLINE define 2019-08-27 08:34:40 +01:00
Jakob Bornecrantz 1e93ba2461 xrt: Refactor frame interface 2019-08-27 08:17:21 +01:00
Jakob Bornecrantz b9c3ac797e xrt: Add colour structs 2019-08-27 08:17:21 +01:00
Jakob Bornecrantz 7f3651775b xrt: Add xrt_reference struct 2019-08-27 08:17:21 +01:00
Jakob Bornecrantz 6774a7e1b3 xrt: Add atomics and container_of helpers 2019-08-27 08:17:21 +01:00