vulkan/wsi/wayland: Only memcpy if the swapchain is actually software
Otherwise, we'll segfault. :-(
Fixes: aca545d616
("vulkan/wsi/wayland: Use host pointer import when available")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17434>
This commit is contained in:
parent
e0e2294f47
commit
a084ee7209
|
@ -1044,7 +1044,7 @@ wsi_wl_swapchain_queue_present(struct wsi_swapchain *wsi_chain,
|
|||
{
|
||||
struct wsi_wl_swapchain *chain = (struct wsi_wl_swapchain *)wsi_chain;
|
||||
|
||||
if (!chain->base.wsi->has_import_memory_host) {
|
||||
if (chain->display->sw && !chain->base.wsi->has_import_memory_host) {
|
||||
struct wsi_wl_image *image = &chain->images[image_index];
|
||||
memcpy(image->shm_ptr, image->base.cpu_map,
|
||||
image->base.row_pitches[0] * chain->extent.height);
|
||||
|
|
Loading…
Reference in New Issue