Commit graph

81 commits

Author SHA1 Message Date
Daniel Willmott b710127fad xrt/device: Add force feedback role 2022-09-19 22:08:28 +00:00
Jarvis Huang 5063e76d16 ipc: Update active client id while activate session changed 2022-08-11 11:57:07 +08:00
Christoph Haag c24e482e5e st/oxr: Make OpenXR timestamps relative to service startup
This solves a problem where OpenXR timestamps could become invalid
(negative) in certain circumstances:

The timestamps that the OpenXR state tracker returned were offset such
that they appeared to start at OpenXR application startup time.

However monado-service is a long running service using system timestamps.
Because of this, if monado-service started work using a system timestamp
acquired before an OpenXR application started, then this system timestamp
could not be converted into an OpenXR without becoming invalid.

With this change, the OpenXR timestamps for OpenXR applications are offset
such that they appear to start at monado-service startup time instead.

As a side effect, all OpenXR applications connected to the same
monado-service instance will receive timestamps from the same domain.
2022-08-08 15:52:18 +00:00
bjorn 919936991c ipc: make all IPC input aggregates const; 2022-07-14 20:31:38 +00:00
Ryan Pavlik ea35e79ec7 ipc: Clarify that wait_image timeout is nanoseconds 2022-05-20 23:31:59 +01:00
Ryan Pavlik 7f600569e7 ipc: Word choice/clarity 2022-05-17 17:40:58 -05:00
Jakob Bornecrantz 61323c32d2 xrt: Use error messages in various instance and prober functions 2022-05-17 20:10:40 +01:00
Moses Turner d6f62633e9 st/gui: Use xrt_system_devices struct and xrt_instance_create_system call
Includes fixes from Christoph Haag:

```
st/gui: Fix segfault when starting monado-gui without arguments
```

```
st/gui: Run gui_prober_select only in the modules that need a prober

This also speeds up starting up the monado-gui main menu.
```

Co-authored-by: Moses Turner <moses@collabora.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
2022-05-11 10:49:15 +01:00
Jakob Bornecrantz 634d495301 ipc: Use and support xrt_instance_create_system 2022-05-11 10:18:35 +01:00
Jakob Bornecrantz 759162ebeb ipc: Return correct status if we fail to create a semaphore 2022-05-09 14:01:20 +00:00
Christoph Haag f76b31795f ipc: zero initialize message buffer 2022-05-09 15:53:00 +02:00
Jakob Bornecrantz 6805b40ac2 ipc: Add support for xrt_swapchain_create_properties 2022-05-04 15:50:54 +01:00
Ryan Pavlik 3e6ec47296 monado: Apply clang-tidy fixes to most of the codebase.
All at least visually inspected, some revised from the auto-fixit
2022-04-13 09:34:54 -05:00
Christoph Haag 22c7fea639 ipc: Amend swapchain create error for unsupported swapchains 2022-04-01 18:10:22 +01:00
Jakob Bornecrantz ef373662f2 ipc: Impelement xrt_compositor_semaphore interfaces 2022-03-14 19:53:05 +00:00
Jakob Bornecrantz ab5e863116 ipc: Do not copy fov in distortion information
No other distortion info is passed along
2022-02-19 13:22:25 +00:00
Christoph Haag 996a5d3e9a xrt: Move fov from xrt_view to xrt_hmd_parts::distortion 2022-02-19 13:04:32 +00:00
Jakob Bornecrantz 9b656cde77 xrt: Remove xrt_device::get_view_pose
Co-authored-by: Christoph Haag <christoph.haag@collabora.com>
2022-02-16 23:15:24 +00:00
Jakob Bornecrantz be4f4969c0 ipc: Add support for xrt_device::get_view_poses 2022-02-16 23:15:06 +00:00
Christoph Haag dd81085a04 ipc/server: print monado version in info log on startup 2022-02-14 00:26:09 +01:00
Jakob Bornecrantz 3f98ea5595 xrt: Tidy s/ll/log_level/g
Also make sure all variable logging uses the right type for logging variables.
2021-11-22 14:29:10 -06:00
Ryan Pavlik 33c0287f8b xrt: Rename all "num" parameters and fields to "count" (or "capacity" as appropriate)
This matches the OpenXR usage: the array is the plural of the element type,
and the count is the singular element type plus "count" (usually CountOutput
because of the two-call idiom)

Includes fixes to other code to match API changes.
2021-11-13 12:04:38 +00:00
Mateo de Mayo 87a1198b0a misc: Address compilation warnings and fix u_json_get_bool 2021-11-12 15:33:06 -03:00
Jakob Bornecrantz c8ee075b8d ipc/server: Add error messages for init failures 2021-10-28 22:58:44 +00:00
Moses Turner 1a4dd31b5e ipc: Switch to new get_hand_tracking signature 2021-10-02 23:06:29 +01:00
Christoph Haag 08c136b712 ipc: Fix warning and paranoia check 2021-08-27 12:34:08 +00:00
Moses Turner 9febede5c6 ipc/server: Clean up the hack if we exit early 2021-08-20 12:28:26 +01:00
Jakob Bornecrantz 77a67387b4 ipc/server: Paranoia 2021-08-11 18:09:52 +01:00
Christoph Haag 1b179306dc comp: Only use dedicated allocation when supported/preferred
Fixes OpenGL depth formats on Tegra
2021-08-09 15:17:25 +02:00
Jakob Bornecrantz e554f9ee02 ipc: Fix NULL check stopping main app visibility events from working 2021-06-18 20:13:46 +01:00
Christoph Haag f49d3ae404 ipc: Check that service and client are the same git revision 2021-05-26 22:21:08 +02:00
Jakob Bornecrantz 8a191daa29 ipc: Add session_destroy to handle session destruction 2021-04-27 22:47:11 +00:00
Jakob Bornecrantz 8277df418d xrt: Make eye_relation argument to xrt_device_get_view_pose const (NFC) 2021-04-27 01:44:13 +01:00
Jakob Bornecrantz 741dcbdf40 ipc: Return XRT_ERROR_IPC_SESSION_NOT_CREATED if so is the case 2021-04-21 18:03:10 +00:00
Jakob Bornecrantz 5627849135 ipc: More trace_marker functions 2021-04-21 18:03:10 +00:00
Christoph Haag fd6bd0f592 ipc: Use xdg runtime directory for socket
u_file_get_runtime_dir falls back to /tmp if $XDG_RUNTIME_DIR is not set.

ipc: %t/monado_comp_ipc socket for systemd socket activation
2021-04-15 21:42:06 +00:00
Christoph Haag 4ea68b89a4 xrt: Add u_process, backed by libbsd's pidfile
Delete stale ipc files in ipc server when not already running.

If built without libbsd, fall back to previous behavior of complaining about existing ipc files and exit.
2021-04-15 21:42:06 +00:00
Jakob Bornecrantz 654043ede5 ipc: Remove stale todo 2021-04-13 23:21:14 +01:00
Moses Turner c53eba34d0 ipc: switch blend mode to array 2021-04-11 04:08:49 -05:00
Jakob Bornecrantz 8215af5e5c u/rt: Refactor render timing 2021-04-07 01:04:20 +01:00
Jakob Bornecrantz bcf9b62fc0 ipc: Adopt to new multi client interface 2021-04-07 00:50:10 +01:00
Jakob Bornecrantz efdba1602f xrt: Pass along display_time_ns to layer begin 2021-04-07 00:50:10 +01:00
Ryan Pavlik aefd8c0697 ipc/android: Be sure to init the mutexes. 2021-03-30 20:46:00 +00:00
Mateo de Mayo 12d52193da d/qwerty: Connect the debug UI to the Qwerty driver
It was necessary to add a list of xdevs to oxr_sdl2_hack_start and to
populate such list from its callees.
That includes sdl2_program.gui_program->xdevs which was not being filled
for the monado-service target.
2021-03-29 15:41:25 -03:00
Ryan Pavlik 20468070fa ipc: De-duplicate member for simplicity and to avoid Doxygen warning 2021-03-26 17:10:47 -05:00
Christoph Haag de6d2a888a ipc: Change server exiting error->info 2021-03-24 18:45:00 +00:00
Jakob Bornecrantz 63f5c86257 xrt: Make xrt_swapchain be reference counted 2021-03-24 17:50:08 +00:00
Christoph Haag 7b95330bb5 ipc: Print information to delete socket file 2021-03-10 02:02:44 +01:00
Jakob Bornecrantz b4f9d07abf ipc: Trace markers 2021-03-08 11:20:52 +00:00
zhibinw 57b42cad9a ipc/android: Start client listener thread when get new fd from client. 2021-03-02 14:02:54 +08:00