mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2026-05-08 10:18:03 +02:00
Move memory handle type setting into allocate_wsialloc
This keeps it closer to where the rest of the external_memory parameters are set. Change-Id: Ibc46e90cebc6d715003772cc78294e164085cfa6 Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
This commit is contained in:
parent
5b973740b0
commit
5befc4cb7d
1 changed files with 2 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2019, 2021-2022 Arm Limited.
|
||||
* Copyright (c) 2017-2019, 2021-2023 Arm Limited.
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
|
@ -291,6 +291,7 @@ VkResult swapchain::allocate_wsialloc(VkImageCreateInfo &image_create_info, wayl
|
|||
external_memory.set_strides(strides);
|
||||
external_memory.set_buffer_fds(buffer_fds);
|
||||
external_memory.set_offsets(offsets);
|
||||
external_memory.set_memory_handle_type(VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT);
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
@ -403,8 +404,6 @@ VkResult swapchain::create_and_bind_swapchain_image(VkImageCreateInfo image_crea
|
|||
|
||||
TRY_LOG(create_wl_buffer(image_create_info, image, image_data), "Failed to create wl_buffer");
|
||||
|
||||
image_data->external_mem.set_memory_handle_type(VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT);
|
||||
|
||||
TRY_LOG(image_data->external_mem.import_memory_and_bind_swapchain_image(image.image),
|
||||
"Failed to import memory and bind swapchain image");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue