Mike Blumenkrantz
1c29200a15
vk/wsi: add error logging for syncfile import/export failures
...
these are otherwise pretty obscure
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23835 >
2023-07-06 14:17:02 +00:00
Mike Blumenkrantz
a69a4f393b
vk/wsi: unify dmabuf exporting
...
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23835 >
2023-07-06 14:17:02 +00:00
Mike Blumenkrantz
2b885b233f
vk/wsi/x11: stop roundtripping on presentation
...
there's no requirement to return SUBOPTIMAL based on processed events
at present time, nor is SURFACE_LOST required here vs as a result of
acquire, so allow both of these conditions to be reported there instead
improves presentation perf by ~60%
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23835 >
2023-07-06 14:17:02 +00:00
Mike Blumenkrantz
36d5b58317
vk/wsi/x11: handle geometry updating more asynchronously
...
this uses geometry updates from events when possible in order to avoid
roundtripping during vkGetPhysicalDeviceSurfaceCapabilitiesKHR, which
significantly improves wsi performance in severely bottlenecked scenarios
now that roundtripping is completely eliminated from acquires in most scenarios,
this improves acquire perf by 10%+
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23835 >
2023-07-06 14:17:02 +00:00
Mike Blumenkrantz
fb9f697fbb
vk/wsi/x11: move surface alpha check from get_caps to creation
...
this makes get_caps a bit less heavy
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23835 >
2023-07-06 14:17:02 +00:00
Kiskae
e67337bebf
vulkan/wsi: check for dri3 buffer initialization failure
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8427
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Lina Versace <linyaa@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23081 >
2023-06-28 14:45:01 +00:00
Yonggang Luo
05b840521a
treewide: Replace the usage of TRUE/FALSE with true/false
...
this is a separate patch as it's won't affect the code style
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: David Heidelberg <david.heidelberg@collabora.com >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23577 >
2023-06-27 18:18:28 +08:00
Konstantin Seurer
291fa05545
vulkan/wsi/x11: Capture traces using a hotkey
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20573 >
2023-06-27 06:25:56 +00:00
Konstantin Seurer
70489edce4
vulkan: Common trace capturing infrastructure
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20573 >
2023-06-27 06:25:56 +00:00
Yonggang Luo
785ca13323
wsi: Fixes passing argument 1 of ‘mtx_unlock’ from incompatible pointer type
...
../../src/vulkan/wsi/wsi_common_display.c:2908:15: error: passing argument 1 of ‘mtx_unlock’ from incompatible pointer type [-Werror=incompatible-pointer-types]
2908 | mtx_unlock(&wsi->wait_mutex);
| ^~~~~~~~~~~~~~~~
| |
| pthread_mutex_t *
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Acked-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23733 >
2023-06-20 00:05:48 +00:00
Vinson Lee
a62a22c922
vulkan/wsi: Remove duplicate NULL check
...
Fix defect reported by Coverity Scan.
Logically dead code (DEADCODE)
dead_error_line: Execution cannot reach this statement: return NULL;.
Fixes: eadc64ab24 ("vulkan/wsi/display: do not dereference a NULL pointer")
Signed-off-by: Vinson Lee <vlee@freedesktop.org >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23415 >
2023-06-07 11:41:29 +00:00
Iván Briano
39e057028c
vulkan/wsi: fix double free on error condition
...
On error during wsi_wl_surface_create_swapchain(),
wsi_wl_swapchain_chain_free() is called, followed by vk_free() of the
recently freed chain.
Move the vk_free() to wsi_wl_swapchain_destroy() to avoid the double
free.
Fixes dEQP-VK.wsi.wayland.swapchain.simulate_oom.*
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23383 >
2023-06-02 15:12:19 -07:00
Eric Engestrom
d240a630e7
wsi/display: drop unused parameters from local functions
...
These are all local functions, so it's trivial to add back any parameter
should they become useful.
Signed-off-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20566 >
2023-05-26 14:34:17 +00:00
Jesse Natalie
e965b5d291
wsi/win32: Handle acquiring an image while one is already acquired
...
In the case where the app is attempting to acquire both (since the
min/max num images is 2) swapchain images, we need to wait on the
fence for the next image in the chain.
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23222 >
2023-05-25 20:43:32 +00:00
Mike Blumenkrantz
1effbccc5c
vulkan/wsi: add feedback loop usage to swapchain caps if supported
...
this is needed by some apps
cc: mesa-stable
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22959 >
2023-05-17 11:16:00 +00:00
Simon Ser
c140a456b7
vulkan/wsi/wayland: add 16-bit formats
...
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20234 >
2023-05-10 11:58:19 +00:00
Dave Airlie
fa938dd975
vulkan: write beta extensions into generator scripts.
...
Updated by: Hyunjun Ko <zzoon@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21806 >
2023-05-04 02:40:06 +00:00
Hans-Kristian Arntzen
11a853e912
wsi/wayland: Do not assert that all present IDs have been waited on.
...
EXT_swapchain_maintenance1 allows destruction when the swapchain fence
is complete. That may signal before we have dispatched all present
waits. Just discard those presentation feedbacks.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22682 >
2023-05-03 16:09:10 +00:00
Hans-Kristian Arntzen
577b3c7bb2
wsi/wayland: Simplify wait logic for present wait.
...
CLOCK_REALTIME is generally problematic due to NTP.
Use normal MONOTONIC waits for condition variable,
and remove the timedlock. The lock is never held in a blocking fashion,
so there is little need for a timed lock here.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22682 >
2023-05-03 16:09:10 +00:00
Daniel Stone
43f868d175
wsi/wayland: Support VK_KHR_present_wait
...
Use the wp_presentation extension to detect when a given presentation
has taken effect.
Since this protocol is not guaranteed to be supported,
it must be enabled through driconf (vk_khr_present_wait=true) for the time being.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Co-authored-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22682 >
2023-05-03 16:09:10 +00:00
Simon Ser
47cd010931
wayland: generalize wayland-protocols code generation
...
Make it easy to add a new protocol to the list without duplicating
logic.
Signed-off-by: Simon Ser <contact@emersion.fr >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22682 >
2023-05-03 16:09:09 +00:00
Hans-Kristian Arntzen
32f7ff2c20
wsi/x11: Fix present ID signal when IDLE comes before COMPLETE.
...
It appears to be possible that IDLE is observed before COMPLETE.
In this case, an application may access present_id in subsequent
QueuePresentKHR and race against the fence worker reading present_id.
Solve this by adding a separate signal_present_id that is used when
completing to avoid the race.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22633 >
2023-04-21 19:15:06 +00:00
Michel Zou
d5871d21a5
vulkan/wsi: fix -Wnarrowing warning
...
else I get this output:
[11/600] Compiling C++ object src/vulkan/wsi/libvulkan_wsi.a.p/wsi_common_win32.cpp.obj
../src/vulkan/wsi/wsi_common_win32.cpp: In function 'VkResult wsi_win32_surface_create_swapchain_dxgi(wsi_win32_surface*, VkDevice, wsi_win32*, const VkSwapchainCreateInfoKHR*, wsi_win32_swapchain*)':
../src/vulkan/wsi/wsi_common_win32.cpp:757:65: warning: narrowing conversion of '((((int)chain->wsi_win32_swapchain::base.wsi_swapchain::present_mode) == ((int)VK_PRESENT_MODE_IMMEDIATE_KHR)) ? ((int)DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING) : 0)' from 'int' to 'UINT' {aka 'unsigned int'} [-Wnarrowing]
757 | chain->base.present_mode == VK_PRESENT_MODE_IMMEDIATE_KHR ?
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
758 | DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING : 0
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fixes: d7730fcf22
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22475 >
2023-04-20 03:33:51 +00:00
Oleksii Bozhenko
8976d8280f
wsi: remove get_sorted_vk_formats duplication
...
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/commit/37a8b2d12ea97775b725172d1f89c1bd59fc98cf
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8727
Signed-off-by: Oleksii Bozhenko oleksii.bozhenko@globallogic.com
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22337 >
2023-04-12 22:07:32 +00:00
Oleksii Bozhenko
53106c3a4f
wsi: add rgb_component_bits_are_equal
...
Signed-off-by: Oleksii Bozhenko oleksii.bozhenko@globallogic.com
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22337 >
2023-04-12 22:07:32 +00:00
Iago Toral Quiroga
1bbbdbe666
vulkan/wsi/display: set pDisplay to NULL on error
...
the spec for vkGetDrmDisplayEXT says:
"If there is no VkDisplayKHR corresponding to the connectorId on the
physicalDevice, the returning display must be set to VK_NULL_HANDLE.
The provided drmFd must correspond to the one owned by the physicalDevice.
If not, the error code VK_ERROR_UNKNOWN must be returned. (...)
The given connectorId must be a resource owned by the provided drmFd.
If not, the error code VK_ERROR_UNKNOWN must be returned"
We were only setting the display pointer to VK_NULL_HANDLE if the provided
drmFd was valid, however, there are CTS tests checking that it is also set
to NULL when it is not.
Fixes the following test on all drivers exposing EXT_acquire_drm_display
(tested with Intel and V3DV):
dEQP-VK.wsi.acquire_drm_display.acquire_drm_display_invalid_fd
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22283 >
2023-04-05 06:21:26 +00:00
Iván Briano
eadc64ab24
vulkan/wsi/display: do not dereference a NULL pointer
...
Fixes dEQP-VK.wsi.direct_drm.swapchain.simulate_oom.*
Cc: mesa-stable
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19025 >
2023-04-03 20:21:17 +00:00
Danylo Piliaiev
1600b310bc
vk/util: Generate defines to help casting structs with vk_find_struct
...
C++ doesn't like implicit casts from void *.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Danylo Piliaiev
4d79703b91
vk/wsi: C++-proof wsi_common_drm.h
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931 >
2023-03-24 15:49:25 +00:00
Jesse Natalie
5c4c9fd454
vulkan/wsi: Fix Windows build
...
The headless path doesn't build for Windows (yet, anyway).
Fixes: d4a2c0fc ("vulkan/wsi: add a headless swapchain implementation/option")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21932 >
2023-03-16 16:07:14 +00:00
Lionel Landwerlin
d4a2c0fcaa
vulkan/wsi: add a headless swapchain implementation/option
...
I wanted to find slow pieces of code in our Anv driver using our
drm-shim stub.
The last bit of code still talking to the compositor was the WSI
swapchain code and failing because none of the submissions are taking
place (because of the stub).
This change introduces a new variable MESA_VK_WSI_HEADLESS_SWAPCHAIN
which when set turns every swapchain creation into a headless
swapchain. This swapchain does not present anything, allowing the
application to spin as many frames as possible. Thus helping to
identify slow spots in command buffer building path.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6156 >
2023-03-14 14:03:31 +00:00
Mike Blumenkrantz
bf1b4ed54e
vulkan/wsi: fix crash in failed swapchain creation for wayland
...
this otherwise calls wsi_wl_swapchain_chain_free() before the wsi
pointer has been set
ref #6578
cc: mesa-stable
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21563 >
2023-03-08 17:33:00 +00:00
Samuel Pitoiset
0ed28d2715
wsi: move an assertion in wsi_xxx_surface_get_capabilities2()
...
Hit this with vulkaninfo on X11, probably a vulkaninfo bug. Though
moving the assertion doesn't hurt.
Fixes: be0dcbdfa2 ("wsi/x11: Implement EXT_swapchain_maintenance1.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21722 >
2023-03-06 14:40:02 +00:00
Yogesh Mohan Marimuthu
af953616a1
wsi/display: check alloc failure in wsi_display_alloc_connector()
...
vulkancts test dEQP-VK.wsi.direct_drm.surface.create_simulate_oom is failing
because in wsi_display_alloc_connector() function memory allocation for
connector is not checked for return NULL. create_simulate_oom test simulates
out of memory, hence memory allocation fails for connector and later when
tried to dereference connector program will segfault.
This patch fixes the dEQP-VK.wsi.direct_drm.surface.create_simulate_oom test
segfault issue by checking if connector is NULL afer memory allocation.
Cc: mesa-stable
Reviewed-by: Eric Engestrom <eric@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21701 >
2023-03-04 21:20:54 +00:00
Hans-Kristian Arntzen
3d0258c679
wsi/win32: Implement VK_EXT_swapchain_maintenance1.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Jesse Natalie <jenatalie@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235 >
2023-03-03 03:59:13 +00:00
Hans-Kristian Arntzen
1b047ceac2
wsi/display: Implement EXT_swapchain_maintenance1.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235 >
2023-03-03 03:59:13 +00:00
Hans-Kristian Arntzen
07ac177c3f
wsi/wayland: Implement EXT_swapchain_maintenance1.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235 >
2023-03-03 03:59:13 +00:00
Hans-Kristian Arntzen
ad71d584cf
wsi/common: Add function to modify present mode.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235 >
2023-03-03 03:59:13 +00:00
Hans-Kristian Arntzen
d79fa8a03a
wsi/common: Add comment about DEFERRED_ALLOCATION_BIT_EXT.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235 >
2023-03-03 03:59:13 +00:00
Hans-Kristian Arntzen
ae920c8420
wsi/common: Implement swapchain present fence.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235 >
2023-03-03 03:59:13 +00:00
Hans-Kristian Arntzen
be0dcbdfa2
wsi/x11: Implement EXT_swapchain_maintenance1.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235 >
2023-03-03 03:59:13 +00:00
Hans-Kristian Arntzen
8ece1ade5b
wsi/common: Add common implementation of vkReleaseSwapchainImagesEXT.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Joshua Ashton <joshua@froggi.es >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20235 >
2023-03-03 03:59:13 +00:00
Alexandros Frantzis
689ce66a43
vulkan/wsi/wayland: Fix destruction of event queue with proxies still attached.
...
Destroy the surface dmabuf feedback proxy before destroying the event
queue that the proxy is attached to.
This silences a warning that libwayland 1.22 emits for programs that use
Vulkan/Wayland:
warning: queue 0x557a4efbcf70 destroyed while proxies still attached:
zwp_linux_dmabuf_feedback_v1@18 still attached
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21647 >
2023-03-02 19:09:29 +00:00
Mike Blumenkrantz
c1a62476ac
vulkan/wsi/x11: make 4 image minimum for xwayland driver-specific
...
this avoids adding extra frames of latency to drivers that don't need
it
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21447 >
2023-02-27 13:21:21 +00:00
Mike Blumenkrantz
7c8a5f6e37
vulkan/wsi: switch to using an options struct for last param
...
this makes adding values easier since the drivers won't need to be updated
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21447 >
2023-02-27 13:21:21 +00:00
Eric Engestrom
fbd644c59d
meson: replace vk_wsi_args with dependencies to let meson take care of transitivity
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19497 >
2023-02-23 09:42:46 +00:00
Gert Wollny
04d654a5d0
vulkan/wsi: Take Xwayland into account for x11_min_image_count
...
For wayland we report a minimum of four swapchain images, so for
Xwayland we should report the same.
v2: Fix typo (Eric)
v3: Make that four images on Xwayland (Daniel)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21136 >
2023-02-21 08:43:30 +00:00
Mike Blumenkrantz
819cbf329a
vulkan/wsi: avoid deadlocking dri3 when polling deleted windows for events
...
upcoming xserver releases will emit PresentConfigureNotify with this
flag set when a window is destroyed, ensuring drivers
don't poll infinitely and deadlock
fixes #6685
cc: mesa-stable
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Acked-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21339 >
2023-02-16 15:55:47 +00:00
Erik Faye-Lund
29ffc79410
meson: don't pass vk wsi args where they don't belong
...
Only code that cares about Vulkan WSI should get the corresponding
arguments passed. Otherwise, the Vulkan headers might end up including
other headers that we don't have the correct dependencies passed for.
So let's give those a dedicated variable, and only pass that where it's
actually needed.
Fixes: b39958a3a1 ("anv,nir: Move the ANV YCbCr lowering pass to common code")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8193
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21185 >
2023-02-15 18:35:14 +00:00
Philipp Zabel
f29f656530
vulkan/wsi/wayland: fix acquire_next_image to report timeouts properly
...
The Vulkan Specification states about possible return values from
vkAcquireNextImageKHR:
* VK_NOT_READY is returned if timeout is zero and no image was
available.
* VK_TIMEOUT is returned if timeout is greater than zero and less than
UINT64_MAX, and no image beae available within the time allowed.
That is, if info->timeout is larger than zero, the function must return
VK_TIMEOUT instead of VK_NOT_READY if no image became available before
the timeout elapsed.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21190 >
2023-02-10 11:32:54 +00:00