mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-16 23:30:35 +01:00
dozen: adopt wsi_common_get_memory
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35875>
This commit is contained in:
parent
825c05a7e8
commit
7ef0566e26
2 changed files with 7 additions and 12 deletions
|
|
@ -804,21 +804,17 @@ dzn_BindImageMemory2(VkDevice dev,
|
|||
VK_FROM_HANDLE(dzn_image, image, bind_info->image);
|
||||
|
||||
#ifdef DZN_USE_WSI_PLATFORM
|
||||
const VkBindImageMemorySwapchainInfoKHR *swapchain_info =
|
||||
vk_find_struct_const(pBindInfos[i].pNext, BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR);
|
||||
|
||||
if (swapchain_info && swapchain_info->swapchain != VK_NULL_HANDLE) {
|
||||
struct dzn_image *swapchain_img =
|
||||
dzn_image_from_handle(wsi_common_get_image(swapchain_info->swapchain, swapchain_info->imageIndex));
|
||||
|
||||
mem = swapchain_img->mem;
|
||||
if (!mem) {
|
||||
const VkBindImageMemorySwapchainInfoKHR *swapchain_info =
|
||||
vk_find_struct_const(pBindInfos[i].pNext, BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR);
|
||||
assert(swapchain_info && swapchain_info->swapchain != VK_NULL_HANDLE);
|
||||
mem = dzn_device_memory_from_handle(
|
||||
wsi_common_get_memory(swapchain_info->swapchain, swapchain_info->imageIndex));
|
||||
}
|
||||
#endif
|
||||
|
||||
image->mem = mem;
|
||||
|
||||
HRESULT hres = S_OK;
|
||||
|
||||
assert(mem);
|
||||
if (mem->dedicated_res) {
|
||||
assert(pBindInfos[i].memoryOffset == 0);
|
||||
image->res = mem->dedicated_res;
|
||||
|
|
|
|||
|
|
@ -1066,7 +1066,6 @@ struct dzn_image {
|
|||
} linear;
|
||||
D3D12_RESOURCE_DESC desc;
|
||||
ID3D12Resource *res;
|
||||
struct dzn_device_memory *mem;
|
||||
uint32_t castable_format_count;
|
||||
const DXGI_FORMAT *castable_formats;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue