mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
vulkan/wsi/wayland: More descriptive name for swapchain queue
We can have multiple swapchains, and we can also have retired swap chains that can continue to deliver events briefly after being replaced. It's helpful to have both a surface id and a per surface swapchain id. Signed-off-by: Derek Foreman <derek.foreman@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27852>
This commit is contained in:
parent
73c1fbfc79
commit
7f72eb9e6c
1 changed files with 10 additions and 1 deletions
|
|
@ -148,6 +148,8 @@ enum wsi_wl_buffer_type {
|
|||
struct wsi_wl_surface {
|
||||
VkIcdSurfaceWayland base;
|
||||
|
||||
unsigned int chain_count;
|
||||
|
||||
struct wsi_wl_swapchain *chain;
|
||||
struct wl_surface *surface;
|
||||
struct wsi_wl_display *display;
|
||||
|
|
@ -2396,9 +2398,16 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
|
|||
pthread_mutex_init(&chain->present_ids.lock, NULL);
|
||||
|
||||
wl_list_init(&chain->present_ids.outstanding_list);
|
||||
|
||||
char *queue_name = vk_asprintf(pAllocator,
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT,
|
||||
"mesa vk surface %d swapchain %d queue",
|
||||
wl_proxy_get_id((struct wl_proxy *) wsi_wl_surface->surface),
|
||||
wsi_wl_surface->chain_count++);
|
||||
chain->present_ids.queue =
|
||||
wl_display_create_queue_with_name(chain->wsi_wl_surface->display->wl_display,
|
||||
"mesa vk swapchain queue");
|
||||
queue_name);
|
||||
vk_free(pAllocator, queue_name);
|
||||
|
||||
if (chain->wsi_wl_surface->display->wp_presentation_notwrapped) {
|
||||
chain->present_ids.wp_presentation =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue