Ryan Pavlik
910a3aae75
external: Update GLAD and add missing header
2020-07-17 13:53:39 -05:00
Ryan Pavlik
ebf1b01d48
comp: Improve OpenGL extension checking
2020-07-17 13:53:39 -05:00
Ryan Pavlik
2cce94799d
d/psvr: Fix hidapi include
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
Ryan Pavlik
8b954e12c1
build: Add missing jpeg include dir
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
cb69223532
aux: Move responsibility for clearing image FD to the helper.
2020-07-17 11:46:22 -05:00
Christoph Haag
4ec6f46717
comp/gl: hack: glFlush() before committing a layer
...
This works around corruption in layers on several drivers caused by
writes to the OpenGL textures not having finished when used by the
compositor.
This should be properly fixed with external semaphores later.
2020-07-17 17:11:35 +02: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
82395b23bb
ipc: Use generic shmem functions now.
2020-07-16 13:06:07 -05:00
Ryan Pavlik
20c65e74e3
ipc: Define shmem utilities for Linux and Android
2020-07-16 13:06:07 -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
Lubosz Sarnecki
db3a721946
comp/shaders: Remove has_sub option.
...
As we have subimage rects for all layers now.
2020-07-16 19:34:33 +02:00
Lubosz Sarnecki
7e35fcb8aa
comp/renderer: Provide subrect properties for projection layers.
2020-07-16 19:32:53 +02:00
Lubosz Sarnecki
984056674e
comp/shaders: Sample quad layers with texture().
2020-07-16 19:08:10 +02:00
Lubosz Sarnecki
2472deb95a
comp/layers: Remove layer type from constructor.
...
The value was not used anyway as it is not set at creation time, but
every frame. This avoids some confusion.
2020-07-16 19:08:10 +02:00
Lubosz Sarnecki
6222de38c9
comp/shaders: Rename quad shaders to layer.
...
As the shader is used for all layers we have, the generic name fits
better.
2020-07-16 19:08:10 +02:00
Lubosz Sarnecki
a27164ab43
comp/renderer: Render subimage properties in layer shader.
...
This patch passes the offset and extent properties to the layer shader
by extending the uniform. The fragment shader stage now also receives
the transformation uniform, which contains a has_sub boolean to
distinguish if the properties are set, so between projection and quad layers.
To avoid color bleeding the subimage sampling happens on a global pixel
coordinates basis as ivec2 using the GLSL texelFetch function.
Projection layers will be sampled as before.
2020-07-16 19:08:10 +02:00
Christoph Haag
a56fa20b50
build: Install tools with meson
2020-07-16 16:04:51 +02:00
Ryan Pavlik
ebc7a11e70
ipc: Support client->server "in_handles"
2020-07-16 11:51:16 +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
c3552ed420
xrt: Rename xrt_gfx_fd.h to xrt_gfx_native.h
2020-07-15 17:19:30 -05:00
Christoph Haag
ba17d35f7f
comp: Create second pipeline for premultiplied alpha blending
...
Fixes "Source Alpha Blending" conformance test.
2020-07-15 19:21:13 +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
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
44fe0e7709
build: Handle Android NDK better.
2020-07-14 16:37:55 -05:00
Ryan Pavlik
60cf946dd7
ipc: Normalize parameter names
2020-07-14 16:37:12 -05:00
Ryan Pavlik
abc580d2b1
ipc: Replace "out_fds" with more generic "out_handles"
...
Also, finish porting client code to use factored-out utils.
2020-07-14 16:37:12 -05:00
Ryan Pavlik
040c82cb24
ipc: Port server side to use new factored-out utils
2020-07-14 16:24:26 -05:00
Ryan Pavlik
166c041421
ipc: Start providing handle marshalling util functions
2020-07-14 16:24:26 -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
Ryan Pavlik
1a692f5de6
ipc: Use factored-out utils on client side.
2020-07-14 16:24:26 -05:00
Ryan Pavlik
36f66ea630
ipc: Add factored-out basic message send/receive
2020-07-14 16:24:26 -05:00
Ryan Pavlik
a5bde51c81
ipc: Change return type of some server functions from int to xrt_result_t
2020-07-14 16:24:26 -05:00
Ryan Pavlik
c2e922b0f5
ipc: Formatting cleanup
2020-07-14 16:24:26 -05:00
Ryan Pavlik
87dbad9865
ipc: Have server utils return xrt_result_t
2020-07-14 16:24:26 -05:00
Ryan Pavlik
687beddcca
ipc: Replace ipc_connection_t usage with struct ipc_connection
2020-07-14 16:24:23 -05:00
Ryan Pavlik
cf68e11b97
ipc: Be more strict in type parsing
2020-07-14 16:18:17 -05:00
Ryan Pavlik
1b88c7e089
ipc: Move data structure out of generation script
2020-07-14 16:18:17 -05:00
Benjamin Saunders
1c78dd0246
c/client: Slightly improve barriers, taken from !360
...
Transplanted by Jakob, all the hard spec reading done by Ben.
2020-07-14 17:25:28 +01: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
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
Christoph Haag
6429496439
build: respect meson install-active-runtime option
2020-07-13 14:15:13 +02:00
Christoph Haag
605e4e2027
build: Fix installing active_runtime.json on meson without DESTDIR
...
The -u setting for bash reported an error if DESTDIR is not set.
The syntax ${A-foo} returns the content of A if set, or the default "foo" if not,
"foo" being the empty string in this case.
2020-07-13 14:08:34 +02:00
Ryan Pavlik
d2cd0f4bb9
build: Fix destdir repetition when installing systemd units.
...
Found during packaging.
2020-07-10 18:11:37 -05:00
Lubosz Sarnecki
261facd9f1
u/json: Fix a -Wmaybe-uninitialized on GCC 10.1.0.
2020-07-10 17:18:41 +02:00
Lubosz Sarnecki
a5dc31359b
c/compositor: Set a window title.
2020-07-10 17:03:28 +02:00
Lubosz Sarnecki
499751e4fa
d/vive: Use VIVE_ERROR when vive_device is available.
2020-07-09 14:11:35 +02:00
Lubosz Sarnecki
8e682fdd1b
u_logging: Format logging output.
...
To be in line with other log prints, put the log level first.
For better readability, put the function in [braces].
Remove ":" as separator between level and function.
2020-07-09 13:38:07 +02:00
Lubosz Sarnecki
4d412edaa1
d/vive/protocol: Port to u_logging.
2020-07-09 13:38:07 +02:00
Lubosz Sarnecki
dce8da5130
d/vive/controller: Port to u_logging.
2020-07-09 13:38:07 +02:00
Lubosz Sarnecki
5dff60a93d
d/vive: Create common header for controller and hmd.
2020-07-09 13:38:07 +02:00
Lubosz Sarnecki
dfcff5e806
d/vive/device: Use VIVE_WARN and VIVE_INFO.
2020-07-09 13:38:07 +02:00
Lubosz Sarnecki
7121c260ae
d/vive/device: Replace old debug macros with new ones.
2020-07-09 13:38:07 +02:00
Lubosz Sarnecki
7be5efbe82
d/vive/prober: Prettify logging. rename methods.
2020-07-09 13:38:07 +02:00
Lubosz Sarnecki
eaea6888a7
d/vive: Port logging to u_logging.
2020-07-09 13:37:58 +02:00
Jakob Bornecrantz
deedd10a50
xrt: Tidy xrt_instance_create argument order and add doc-comment
2020-07-08 14:41:12 +00:00
Ryan Pavlik
323d794df3
ipc: Add a json schema for the IPC description
2020-07-08 09:15:51 -05:00
Ryan Pavlik
042fd54361
t/service: Make the socket RemoveOnStop.
2020-07-08 09:15:51 -05:00
Ryan Pavlik
b2b2b0f4af
u_logging: Fix comments/doxygen
2020-07-08 09:15:51 -05:00
Christoph Haag
763b122c3e
comp: Print info about AllowHMD when direct mode fails on nvidia
2020-07-08 15:43:05 +02: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
1b11abe6eb
xrt: Tidy xrt_compositor.h
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
20501b8e58
d/psmv: Use new log level var tracker
2020-07-03 19:01:55 +01:00
Jakob Bornecrantz
c4741cc49f
d/psmv: Use new logging level helper
2020-07-03 19:01:55 +01:00
Jakob Bornecrantz
9848f8b4b8
u/var: Add log level tracker
2020-07-03 19:01:55 +01:00
Jakob Bornecrantz
be0430a38c
u/debug: Add function to get logging level
2020-07-03 18:58:34 +01:00
Jakob Bornecrantz
ffcc06e099
d/psmv: Use new logging functions
2020-07-03 14:55:44 +01:00
Jakob Bornecrantz
b26c8135ae
u/*: Use new logging functions
2020-07-03 14:55:44 +01:00
Jakob Bornecrantz
38685eba38
u/log: Add logging helpers
2020-07-03 14:33:54 +01:00
Lubosz Sarnecki
fdffbfc68a
d/vive/controller: Print spew when receiving lighthouse data.
2020-07-02 19:29:14 +02:00
Lubosz Sarnecki
1071d7a50b
d/vive/controller: Uncomment and improve spew prints.
2020-07-02 19:29:14 +02: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
Lubosz Sarnecki
2fd6fe2f16
d/vive/prober: Print error before device init.
2020-07-02 19:29:14 +02:00
Lubosz Sarnecki
260cfd8d26
d/vive/controller: Use u_json and move config to vive_config.
...
To be consistent with the headset implementation, move all config
related code to vive_config and use u_json consistently with static
string sizes.
2020-07-02 18:42:42 +02:00
Lubosz Sarnecki
53619fa64e
d/vive/controller: Move prober interface to vive_prober.
...
Create propper initializer for the controller and move the proper
interface to vive_prober to be more consistent with the device. This
will also allow to share more code like the config parsing in a later
patch.
2020-07-02 18:42:42 +02:00
Lubosz Sarnecki
f33c6356d7
d/vive: Rename vive_controller files.
...
To be more consistent with the rest of the driver, rename the controller
files to match the others style.
2020-07-02 18:42:42 +02:00
Lubosz Sarnecki
eb51b89e9c
d/vive_config: Move config and json related code to vive_config.
...
Isolate JSON config related code in vive_config.
2020-07-02 18:42:42 +02:00
Lubosz Sarnecki
2580958e2c
d/vive: Use functions from u_json.
...
Uses the old and newly moved u_json functions.
Creates defines to keep short syntax.
Strings are now stored with static sizes in favor of being allocated
dynamically and not freed.
2020-07-02 18:42:42 +02:00
Lubosz Sarnecki
bb52a673eb
d/vive/controller: Parse vec3 correctly as arrays.
...
The u_json_get_vec3 function only works for json vec3 objects with x, y,
z members. The function unnoticedly returned false before.
2020-07-02 18:42:42 +02:00
Lubosz Sarnecki
166346ad6e
u/json: Add u_json_get_matrix_3x3.
...
As seen in Vive driver.
2020-07-02 18:42:37 +02:00
Lubosz Sarnecki
a9db6fbd40
u/json: Add fprintf error messages.
2020-07-02 18:42:37 +02:00
Lubosz Sarnecki
0bdd1133e4
u/json: Add u_json_get_vec3_array.
...
As seen in Vive driver.
2020-07-02 18:42:30 +02:00
Lubosz Sarnecki
efd351f5c1
d/vive/controller: Initialize debug and spew before it's used.
2020-07-02 18:36:21 +02:00
Lubosz Sarnecki
f9d92890ce
d/vive: Fix crash on Vive Pro as it's missing a json key.
...
The key "lens_separation" is not available in my Vive Pro config.
2020-07-02 18:35:18 +02:00
Christoph Haag
08c6fe9744
d/vive_controller: Fix imu timestamp calculation
...
Philipp Zabel looked into it and it turns out the timestamp from the
imu sample should be the third byte, not the fourth.
2020-07-02 11:33:58 +02:00
Christoph Haag
acdda780b6
d/vive_controller: implement remaining "gen2" input events
...
v2: document and clarify imu sample timestamp
2020-07-01 18:36:41 +02:00
Christoph Haag
d8de19d4ae
d/vive_controller: Add and set Index "Gen2" input names
2020-07-01 18:36:41 +02:00
Christoph Haag
184dd277bf
bindings: Fix Index squeeze/force binding declaration
2020-07-01 18:36:41 +02:00