Commit graph

746 commits

Author SHA1 Message Date
Jakob Bornecrantz 5cd4d272a2 comp: Code style, pointer star location 2019-09-29 11:45:23 +01:00
Drew DeVault b4f0c79abd comp_compositor.c: prefer Wayland over XCB 2019-09-26 12:15:27 -04:00
Drew DeVault 9bcfa56f2f compositor: overhaul Wayland backend
This simplifies the Wayland backend, fixes the build configuration for
it, ports it to xdg-shell stable, and reworks some false assumptions
from the original port.
2019-09-26 12:15:27 -04:00
Drew DeVault 064aef3526 build: port to meson 2019-09-26 15:05:22 +00:00
Drew DeVault c6586cfd1e comp_compositor: use nanosleep instead of usleep
Improves portability
2019-09-26 15:05:22 +00:00
Jakob Bornecrantz 5de401ea58 comp: Tidy wait frame 2019-08-31 14:17:41 +01:00
Jakob Bornecrantz cfb1ca3052 comp: Ensure nominal_frame_interval_ns is a sane value 2019-08-31 14:17:41 +01:00
Christoph Haag d9736ba3b7 comp: wait for next frame in xrWaitFrame
fixes 6e396ed

It was unnecessary to move the wait to xrEndFrame.
It does not matter if the compositor renders the frame immediately because the
frame physically can not be displayed before the next HMD refresh.

On the other hand, leaving too short of a time for the compositor to render
may delay the frame past its predicted time.
2019-08-20 10:10:10 +00:00
Jakob Bornecrantz 042d30c590 comp: Fix warnings 2019-08-17 10:34:12 +01:00
Ryan Pavlik e21b495f90 comp: Comment a resource and memory leak 2019-08-16 17:25:19 -05:00
Ryan Pavlik 2aca9821fa comp: Clang-tidy 2019-08-16 17:20:01 -05:00
Ryan Pavlik dbf0bdd014 comp: Factor out some shared functionality.
Simplifies error handling as well.
2019-08-16 17:12:35 -05:00
Nova King 2d016b3385 xrt: Added support for XR Swapchain flags 2019-08-16 22:06:28 +00:00
Ryan Pavlik 1eae45212e comp: Complete initializers for Vulkan structures 2019-08-16 10:54:49 -05:00
Christoph Haag 6e396ed07e comp: Add hack waiting on xrEndFrame() until frame should be displayed.
xrWaitFrame() doesn't block at all, will only predict the time for the next frame.
Once the compositor is multithreaded, this wait should be moved to the compositor thread
and xrWaitFrame should be the function to block until the compositor finished rendering the frame.
2019-08-15 12:29:58 +00:00
Christoph Haag 8cda1b6f67 comp: fix cleanup of direct window, delete with correct type
Found by gcc address sanitizer.
2019-08-13 01:47:50 +02:00
Ryan Pavlik edfa0323a3 comp: Use U_ZERO 2019-06-18 14:14:01 -05:00
Ryan Pavlik b004f95503 comp: Adjust initialization order to match declaration. 2019-06-18 18:43:20 +00:00
Ryan Pavlik 21e324ed57 comp: Codespell fix 2019-06-18 13:09:59 -05:00
Jakob Bornecrantz 4c6de83ea9 comp: Fix uninitialised errors from Valgrind
```txt
Conditional jump or move depends on uninitialised value(s)
   at 0x6A5A7A0: vk_select_physical_device (comp_vk.c:847)
   by 0x6A5AAF9: vk_create_device (comp_vk.c:916)
   by 0x6A5CD82: compositor_check_vulkan_caps (comp_compositor.c:401)
   by 0x6A5D659: comp_compositor_create (comp_compositor.c:656)
   by 0x6A5F99B: xrt_gfx_vk_provider_create (comp_glue_vk.c:57)
   by 0x6A78197: oxr_session_populate_vk (oxr_session_vk.c:32)
   by 0x6A77E59: oxr_session_create_impl (oxr_session.c:536)
   by 0x6A77F53: oxr_session_create (oxr_session.c:567)
   by 0x6A6EA74: oxr_xrCreateSession (oxr_api_session.c:44)
   by 0x2632A8: xrCreateSession (in hello_xr)
   by 0x239F0D: (anonymous namespace)::OpenXrProgram::InitializeSession() (in hello_xr)
   by 0x22ED25: main (in hello_xr)
 Uninitialised value was created by a stack allocation
   at 0x6A5CB05: compositor_check_vulkan_caps (comp_compositor.c:349)
```
2019-06-11 15:27:31 +01:00
Jakob Bornecrantz 1f64f714f6 xrt: Add input, hmd_parts and tracking interface
This patch has been spun of the rather massive amount of work for adding input
devices into Monado. The interfaces feels somewhat stable now so could do
with another pair of eyes on them, before too much work is done on st/oxr.
2019-06-10 14:47:19 +01:00
Benjamin Saunders 74165d7e0e comp: Support sRGB swapchain under OpenGL 2019-05-04 13:25:24 -07:00
Jakob Bornecrantz 690a354bd1 comp: Code style 2019-05-02 14:07:41 +01:00
Benjamin Saunders 13cef1b8b9 comp: Support rendering individual array layers 2019-05-01 17:45:43 -07:00
Benjamin Saunders b6f2013bc5 st/oxr: Frame end uses the most recently released image 2019-05-01 17:45:43 -07:00
Benjamin Saunders f6b8cb25b8 comp: Respect swapchain array size 2019-05-01 17:45:43 -07:00
Jakob Bornecrantz 2caa08f8a8 comp: Debug print more info 2019-04-25 06:46:20 +01:00
Jakob Bornecrantz 95f24f4735 comp: Debug print Vulkan device and version 2019-04-25 06:34:34 +01:00
Jakob Bornecrantz 86d906cb4d comp: Refactor documentation 2019-04-06 13:05:35 +01:00
Jakob Bornecrantz 76c9cd4c67 comp: Filter distortion texture lineary 2019-04-03 17:54:16 +01:00
Jakob Bornecrantz 1873d3a1d2 comp: Tidy code 2019-04-03 17:24:06 +01:00
Pete Black df2b6da078 comp: Add NVIDIA direct mode code 2019-04-03 17:02:07 +01:00
Pete Black ecec5f1a1a comp: Make surface format selection more flexible 2019-04-03 17:02:07 +01:00
Jakob Bornecrantz c6b4b7916a comp: Refactor vk_get_loader_functions function 2019-04-03 17:00:43 +01:00
Lubosz Sarnecki bbf484f51e comp: Free client command pool.
As pointed out by Vulkan validation on the client intance.
2019-03-29 11:00:57 +01:00
Lubosz Sarnecki 00afe442f8 comp: Introduce XRT_COMPOSITOR_VULKAN_VALIDATION.
For enabling Vulkan validation during runtime.
Add CMake option to disable Vulkan validation at build time.
By default the DEBUG extension is enabled but the validation layers
are not when the ENV variable is not set to true.
2019-03-29 10:59:41 +01:00
Ryan Pavlik 8c37377853 comp: Keep track of nominal display interval and last time 2019-03-27 13:39:22 +00:00
Ryan Pavlik f6c97ec253 comp: Pass time state down into compositor 2019-03-27 13:39:22 +00:00
Ryan Pavlik c38026e571 comp: Fix comment typo. 2019-03-22 14:19:19 -05:00
Ryan Pavlik 5b4c3a2f94 comp: Use U_TYPED_CALLOC/U_TYPED_ARRAY_CALLOC 2019-03-22 13:50:29 -05:00
Ryan Pavlik f7d990c7e3 xrt: Use U_TYPED_CALLOC 2019-03-22 13:47:51 -05:00
Ryan Pavlik afd20250ed comp: Fix Vulkan type issues. 2019-03-22 16:54:14 +00:00
Christoph Haag b8c5ba4bc9 comp: handle acquiring direct mode failing 2019-03-22 16:41:53 +00:00
Lubosz Sarnecki 52e11ac4c5 comp: Move VIVE distortion properties to UBO. 2019-03-18 14:45:31 +01:00
Lubosz Sarnecki 6f5ef7a0cb comp: Rename ubo_data to ubo_pano. 2019-03-18 14:45:31 +01:00
Jakob Bornecrantz 15a97422ba xrt: Add all of Monado 2019-03-18 05:52:32 +00:00