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