Commit graph

30 commits

Author SHA1 Message Date
Lubosz Sarnecki 94bc4cba28 c/direct: Split NVIDIA and RandR backends.
Rename functions and structs.

Define unused function overrides separatelty.

c/window: Define new backend init methods.
2020-04-09 16:15:17 +00:00
Pete Black 80d1d29cb5 comp: Tidy and spell check 2020-04-09 14:50:35 +01:00
Lubosz Sarnecki 1b7b8c163f comp: Further remove unused struct field initializers. 2020-04-01 12:50:10 +00:00
Lubosz Sarnecki b6d8d4b458 comp: Don't initialize unused fields in Vulkan structs.
In order to save redundancy with initializing empty fields with NULL / 0
values and improve readability of the Vulkan code.

This patch also uses struct initializers where possible.

This essentially reverts 1eae45212e.
2020-04-01 12:50:10 +00:00
Christoph Haag e8ccb07db7 st/gui: Add compositor frame timing graph to debug ui 2020-03-09 12:59:12 +01:00
Jakob Bornecrantz a925af90e7 xrt: Do not pass in timestate into compositor 2020-03-02 20:18:49 +00:00
Jakob Bornecrantz 8c06787d93 comp: Refactor documentation 2020-03-02 12:00:22 +00:00
Jakob Bornecrantz aeef692e08 xrt: Refactor out main compositor creating into own interface 2020-03-02 12:00:22 +00:00
Ryan Pavlik 682f41a37c comp: Fix build when VK_USE_PLATFORM_XLIB_XRANDR_EXT is not defined 2020-01-14 11:51:12 -06:00
Christoph Haag 7d9ef2f371 comp: Add setting to force a vulkan gpu index 2019-10-25 21:05:06 +02:00
Ryan Pavlik e90ea99aa8 comp: Adjust frame waiting logic to behave correctly.
Some sub-calculations are still slightly hacky,
but now the overall structure is correct.
2019-10-23 17:18:46 +02: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 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
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
Ryan Pavlik 2aca9821fa comp: Clang-tidy 2019-08-16 17:20:01 -05: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
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
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
Pete Black df2b6da078 comp: Add NVIDIA direct mode code 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 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 f7d990c7e3 xrt: Use U_TYPED_CALLOC 2019-03-22 13:47:51 -05:00
Christoph Haag b8c5ba4bc9 comp: handle acquiring direct mode failing 2019-03-22 16:41:53 +00:00
Jakob Bornecrantz 15a97422ba xrt: Add all of Monado 2019-03-18 05:52:32 +00:00