mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
wsi/wayland: Use different queue names for different queries
We frequently create a new display, query some stuff, then throw it away. Using different queue names for the different queries is a little more expressive when debugging. Signed-off-by: Derek Foreman <derek.foreman@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29787>
This commit is contained in:
parent
9e9a38481d
commit
9f1effb03b
1 changed files with 8 additions and 8 deletions
|
|
@ -884,7 +884,8 @@ static VkResult
|
|||
wsi_wl_display_init(struct wsi_wayland *wsi_wl,
|
||||
struct wsi_wl_display *display,
|
||||
struct wl_display *wl_display,
|
||||
bool get_format_list, bool sw)
|
||||
bool get_format_list, bool sw,
|
||||
const char *queue_name)
|
||||
{
|
||||
VkResult result = VK_SUCCESS;
|
||||
memset(display, 0, sizeof(*display));
|
||||
|
|
@ -896,8 +897,7 @@ wsi_wl_display_init(struct wsi_wayland *wsi_wl,
|
|||
display->wl_display = wl_display;
|
||||
display->sw = sw;
|
||||
|
||||
display->queue = wl_display_create_queue_with_name(wl_display,
|
||||
"mesa vk display queue");
|
||||
display->queue = wl_display_create_queue_with_name(wl_display, queue_name);
|
||||
if (!display->queue) {
|
||||
result = VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
goto fail;
|
||||
|
|
@ -1013,7 +1013,7 @@ wsi_wl_display_create(struct wsi_wayland *wsi, struct wl_display *wl_display,
|
|||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
|
||||
VkResult result = wsi_wl_display_init(wsi, display, wl_display, true,
|
||||
sw);
|
||||
sw, "mesa vk display queue");
|
||||
if (result != VK_SUCCESS) {
|
||||
vk_free(wsi->alloc, display);
|
||||
return result;
|
||||
|
|
@ -1047,7 +1047,7 @@ wsi_GetPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevi
|
|||
|
||||
struct wsi_wl_display display;
|
||||
VkResult ret = wsi_wl_display_init(wsi, &display, wl_display, false,
|
||||
wsi_device->sw);
|
||||
wsi_device->sw, "mesa presentation support query");
|
||||
if (ret == VK_SUCCESS)
|
||||
wsi_wl_display_finish(&display);
|
||||
|
||||
|
|
@ -1219,7 +1219,7 @@ wsi_wl_surface_get_formats(VkIcdSurfaceBase *icd_surface,
|
|||
|
||||
struct wsi_wl_display display;
|
||||
if (wsi_wl_display_init(wsi, &display, surface->display, true,
|
||||
wsi_device->sw))
|
||||
wsi_device->sw, "mesa formats query"))
|
||||
return VK_ERROR_SURFACE_LOST_KHR;
|
||||
|
||||
VK_OUTARRAY_MAKE_TYPED(VkSurfaceFormatKHR, out,
|
||||
|
|
@ -1258,7 +1258,7 @@ wsi_wl_surface_get_formats2(VkIcdSurfaceBase *icd_surface,
|
|||
|
||||
struct wsi_wl_display display;
|
||||
if (wsi_wl_display_init(wsi, &display, surface->display, true,
|
||||
wsi_device->sw))
|
||||
wsi_device->sw, "mesa formats2 query"))
|
||||
return VK_ERROR_SURFACE_LOST_KHR;
|
||||
|
||||
VK_OUTARRAY_MAKE_TYPED(VkSurfaceFormat2KHR, out,
|
||||
|
|
@ -1296,7 +1296,7 @@ wsi_wl_surface_get_present_modes(VkIcdSurfaceBase *icd_surface,
|
|||
|
||||
struct wsi_wl_display display;
|
||||
if (wsi_wl_display_init(wsi, &display, surface->display, true,
|
||||
wsi_device->sw))
|
||||
wsi_device->sw, "mesa present modes query"))
|
||||
return VK_ERROR_SURFACE_LOST_KHR;
|
||||
|
||||
VkPresentModeKHR present_modes[3];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue