Commit graph

746 commits

Author SHA1 Message Date
Jakob Bornecrantz b56142942d c/client: Tidy and reorg flow in egl create function 2022-06-13 18:22:31 +01:00
Jakob Bornecrantz 40a62329d8 c/client: Add some sanity checking and debug print OpenGL information 2022-06-13 18:22:31 +01:00
Jakob Bornecrantz ef93c43b21 c/client: Restore context on unsupported API and better debug printing 2022-06-13 18:22:31 +01:00
Jakob Bornecrantz 1d4bf5dcd5 c/client: Log if a format conversion isn't supported 2022-06-13 18:22:31 +01:00
Jakob Bornecrantz 0cbb850462 c/util: Improve debug printing when importing swapchain 2022-06-13 18:22:31 +01:00
Jakob Bornecrantz dfa24a7829 c/main: On Android prefer RGBA over BGRA VkSwapchains
BGRA is only supported on 0.1% of devices according to GPUinfo.
2022-06-13 18:22:31 +01:00
Jakob Bornecrantz 0984cfe9e1 c/main: Print swapchain formats on debug 2022-06-12 11:09:36 +01:00
Jakob Bornecrantz ee23b6244c c/main: Use trace instead of debug for per frame message 2022-06-12 11:09:36 +01:00
Jakob Bornecrantz 53a936a720 c/main: Ask for VK_KHR_image_format_list optionally 2022-06-12 11:09:36 +01:00
Jakob Bornecrantz 0682407ec6 c/null: Ask for VK_KHR_image_format_list optionally 2022-06-12 11:09:36 +01:00
Moses Turner 633439e439 c/main: Fix rounding math and ensure even image sizes for readback 2022-06-12 00:50:28 +01:00
Moses Turner 3e87f9831d comp/main: Prettify nvidia allowlist and add Odyssey+ 2022-06-09 01:09:06 +01:00
zhibinw 9616606a2b c/client: Add protected content flag when create EGL images 2022-06-08 19:31:36 +08:00
Jakob Bornecrantz 2300e4fa57 c/main: Document cond var loop 2022-05-31 13:38:56 +00:00
Jakob Bornecrantz c976c54008 c/null: Add null compositor
Based on sample compositor code.

Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
Co-authored-by: Ryan Pavlik <ryan.pavlik@collabora.com>
2022-05-28 17:30:19 +00:00
Jakob Bornecrantz fc769347a8 c/client: Better error logging when failing to make current context 2022-05-27 15:14:59 +00:00
Simon Zeni c8b4f7c64c c/client: implement EGL context begin and end 2022-05-27 15:08:40 +00:00
bjorn d3a0f10acb c/client: rm client swapchain layout transition;
This was only there to satisfy a validation layer bug, which appears
to have since been fixed.  It doesn't make sense to transition an XR
swapchain image to PRESENT_SRC, and the client transitions from
UNDEFINED anyway when acquiring the image.

This also fixes a case where monado violates the OpenXR specification:

> The list of OpenXR functions where the OpenXR runtime may access the
> VkQueue are:
> - xrBeginFrame
> - xrEndFrame
> - xrAcquireSwapchainImage
> - xrReleaseSwapchainImage
> The runtime must not access the VkQueue in any OpenXR function that is
> not listed above or in an extension definition.
2022-05-26 17:39:02 +00:00
bjorn 2d954d84af c/render: Fix invalid synchronization when uploading images;
`queue_upload_for_first_level_and_layer` uploads pixels to an image.

It performs a layout transition, does the copy, and does another layout
transition.  There is an execution dependency between the the copy and
the second layout transition, but the memory dependency was missing.

Caught/tested via enabling synchronization validation.
2022-05-26 17:27:15 +00:00
Jakob Bornecrantz 9c44bc98fa c/multi: Document why unsetting waiting so late 2022-05-26 14:06:18 +00:00
Jakob Bornecrantz 1b7631bd54 c/multi: Also check if a semaphore or fence has been pushed in layer_begin
Closes #171
2022-05-26 14:06:18 +00:00
Jakob Bornecrantz f404cc4c50 c/multi: Document flattened out producer/consumer construct 2022-05-25 21:42:58 +01:00
Jakob Bornecrantz 2afdb79895 c/multi: Document spurious wakeups 2022-05-25 21:42:58 +01:00
Jakob Bornecrantz 72dbed3ab5 c/multi: Make sure that wait thread has started in creation
Co-authored-by: Ryan Pavlik <ryan.pavlik@collabora.com>
Co-authored-by: Jakob Bornecrantz <jakob@collabora.com>
2022-05-25 21:42:58 +01:00
Jakob Bornecrantz 3e9a5da3c6 c/multi: Ensure that only one thread waits for wait thread 2022-05-25 21:42:58 +01:00
Ryan Pavlik fd3a0a1435 c/multi: Fix condition var waiting for wait thread.
Spurious wakeups happen, have to actually have a condition
to check in a loop with the cond var wait.
2022-05-25 20:41:10 +00:00
Ryan Pavlik 596d15a50c a/d3d: Further namespace the d3d11-specific functions 2022-05-25 18:12:22 +00:00
Ryan Pavlik 4a91eb3d84 c/client: Sync/waiting in D3D11
Co-Authored-By: Jakob Bornecrantz <jakob@collabora.com>
2022-05-24 16:55:45 -05:00
Jakob Bornecrantz 037872e2b8 c/client: Include u_time.h in D3D11 compositor 2022-05-23 09:12:54 -05:00
Jakob Bornecrantz b8b42a4bcb c/client: Tidy D3D11 flip comments 2022-05-23 14:11:43 +00:00
Jakob Bornecrantz d91d6e2aa3 c/client: Do not flip projection layers in D3D11 2022-05-23 14:11:43 +00:00
Mateo de Mayo dd802f7fef c/main: Init vblank.even_thread 2022-05-21 23:50:19 -03:00
Mateo de Mayo 7a0a142dba misc: Fix some uninitialized mutexes 2022-05-21 23:31:18 -03:00
Ryan Pavlik e54d336844 c/util: Clarify that wait_image timeout is nanoseconds 2022-05-20 23:31:59 +01:00
Ryan Pavlik 1b01eb808c c/mock: Clarify that wait_image timeout is nanoseconds 2022-05-20 23:31:59 +01:00
Ryan Pavlik 1cd435f321 c/client: Clarify that wait_image timeout is nanoseconds 2022-05-20 23:31:59 +01:00
Ryan Pavlik fcc18cf839 comp: Add a basic "mock" native compositor for testing purposes 2022-05-20 22:37:15 +01:00
Ryan Pavlik 945603a8be comp/client: Initial D3D11 client compositor
Still missing image synchronization/waiting for completion.
2022-05-20 22:37:15 +01:00
Ryan Pavlik c7580c5242 c/main: Fix a condition var wait in windows win 2022-05-20 21:30:41 +00:00
Ryan Pavlik 5a81d1412a c/main: Fix Windows window backend to handle being shut down and started up again. 2022-05-20 21:30:41 +00:00
Ryan Pavlik 1fe1e8847e c/main: Get more data on our errors 2022-05-20 21:30:41 +00:00
Ryan Pavlik 795db8712b c/main: Be sure to clean up window class when done. 2022-05-20 21:30:41 +00:00
Jakob Bornecrantz 875815b55b c/main: Init comp_base as early as possible 2022-05-20 19:06:14 +01:00
Ryan Pavlik ea4c14c3aa a/os: Rename os_thread_helper_stop to os_thread_helper_stop_and_wait 2022-05-20 18:46:37 +01:00
Ryan Pavlik 4d9c3650cc c/multi: Unlock when multi system loop exits 2022-05-20 18:40:14 +01:00
Jakob Bornecrantz fee6809bc2 c/multi: Destroy threads instead of only stopping them 2022-05-20 18:40:11 +01:00
Ryan Pavlik ba42730af3 compositor: Improve word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 25cb2e1790 c/render: Improve word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 973b8f3b7f c/main: Improve word choice/clarity 2022-05-17 17:40:58 -05:00
Ryan Pavlik 0730f08f2d c/client: Improve word choice/clarity 2022-05-17 17:40:58 -05:00