Ryan Pavlik
475192ec73
xrt: Rename "fd" references to "handle"
...
This breaks some Android pieces, which will be fixed shortly.
2020-08-12 17:11:42 -05:00
Ryan Pavlik
146218b346
xrt: Some clang tidy fixes.
...
A few suppressions as well where clang-tidy did the wrong thing.
2020-08-12 17:11:42 -05:00
Jakob Bornecrantz
71e10fafcd
c/main: Fix warnings with asserts
2020-08-11 01:48:31 +01:00
Christoph Haag
026cc64681
comp: make nvidia display selectable with XRT_COMPOSITOR_FORCE_NVIDIA_DISPLAY
...
Allows temporarily adding a nvidia display name string to the whitelist without recompiling.
2020-08-11 00:44:31 +02:00
Christoph Haag
5ecd0a947d
comp: Move nvidia whitelist warning so it is displayed again
2020-08-10 20:48:29 +02:00
Jakob Bornecrantz
ca786df18c
xrt: Make xrt_swapchain_create_info argument const
2020-08-07 19:15:18 +01:00
Christoph Haag
e48c748a57
xrt: suggest correct GPU in xrGetVulkanGraphicsDevice()
...
As before, on the service side the GPU index the compositor runs on can be selected with
* XRT_COMPOSITOR_FORCE_GPU_INDEX=INDEX1
By default xrGetVulkanGraphicsDevice() will suggest the same GPU the compositor runs on.
It is also possible to override the GPU index suggested to applications with
* XRT_COMPOSITOR_FORCE_CLIENT_GPU_INDEX=INDEX2
The reason this is both done on the service side is that if compositor and client run
on different GPUs, the swapchains use linear tiling instead of optimal tiling.
To make chosen GPUs comparable across the compositor's and the client's vulkan instance,
VkPhysicalDeviceIDProperties.deviceUUID is used.
2020-08-07 17:01:13 +02:00
Jakob Bornecrantz
adc6ca8e8a
c/main: Fill out all of the compositor info struct
2020-08-06 15:14:49 +00:00
Jakob Bornecrantz
ee48b44087
c/main: Remove internal compositor global flip_y
2020-08-06 15:14:49 +00:00
Jakob Bornecrantz
d1d841e7c3
xrt: Use new info struct for compositor formats
2020-08-06 15:14:49 +00:00
Jakob Bornecrantz
e8ca242967
xrt: Remove flip_y argument to native compositor creation
2020-08-06 15:14:49 +00:00
Christoph Haag
a5360f2237
comp: Free comp_render_layer on layer destruction
2020-08-05 20:32:51 +00:00
Christoph Haag
1f9e5cdfb6
comp: Free layer renderer on renderer destroy
2020-08-05 20:32:51 +00:00
Jakob Bornecrantz
080fdacc70
comp: Remove some vkDeviceWaitIdle calls and document other
2020-07-24 09:12:22 +00:00
Jakob Bornecrantz
a41c1ce1c5
c/main: Implement xrt_compositor::swapchain_import
2020-07-20 13:50:01 +00:00
Jakob Bornecrantz
d5a702cd47
c/main: Use new Vulkan image allocator helper
2020-07-20 13:50:01 +00:00
Jakob Bornecrantz
b93017911e
xrt: Make xrt_compositor::create_swapchain return xrt_result_t
2020-07-20 13:50:01 +00: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
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
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
Lubosz Sarnecki
a5dc31359b
c/compositor: Set a window title.
2020-07-10 17:03:28 +02: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
8ee7086ea6
xrt: Introduce xrt_swapchain_create_info
2020-07-04 11:04:07 +00:00
Jakob Bornecrantz
0be1456b32
c/main: Add support for more linear formats and prioritize them better
2020-06-25 19:55:08 +00:00
Jakob Bornecrantz
70a6240d48
comp: Use a sRGB window swapchain
2020-06-25 19:55:08 +00:00
Jakob Bornecrantz
f13f911e8a
c/main: Implement prepare_session and poll_events
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
Lubosz Sarnecki
0dbbe423d9
c/layer_renderer: Implement eye visibility.
2020-06-18 16:03:49 +01:00
Jakob Bornecrantz
e76f698463
c/main: Respect alpha blending layer flag
2020-06-18 16:03:49 +01:00
Jakob Bornecrantz
65dcc82e3a
comp+ipc: Respect view space layer flag
2020-06-15 23:59:04 +00:00
Ryan Pavlik
26ab046fba
comp: Remove no-longer-needed comp_layer_quad struct.
...
Replaced by xrt_comp_layer_quad.
Also add some comments.
2020-06-09 16:19:39 -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
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
320c9ab3cb
ipc+comp: Use new xrt_layer_data and friends struct
2020-06-09 19:04:48 +00:00
Jakob Bornecrantz
5912964ded
ipc+comp: Even more make layers the same
2020-06-09 19:04:48 +00:00
Lubosz Sarnecki
08d81e5950
ipc+comp: Make layer structs more consistent.
...
Add missing fields.
Sort layer struct members.
ipc/protocol: Move xdev_id and name to common layer struct.
2020-06-09 19:04:48 +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
Ryan Pavlik
bc6cc85e7d
xrt: Improve doxygen documentation.
2020-06-03 16:28:18 -05:00
Lubosz Sarnecki
435d5a9b9e
c/comp: Remove internal Vulkan validation init.
...
Instead of maintaining this chunk of code and build options, the Vulkan
loader can be used to load up validation. This has the advantage that no
layer name needs to be hard coded inside Monado, which was subject of
change recently.
Instead of using our own environment variable we can easily set the one
from the loader, e.g. `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`.
2020-06-03 11:17:51 +00: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