Module: wine Branch: master Commit: e5c232eb4c459eefcb6ad3ae87554a83a98b0455 URL: https://gitlab.winehq.org/wine/wine/-/commit/e5c232eb4c459eefcb6ad3ae87554a8...
Author: Giovanni Mascellani gmascellani@codeweavers.com Date: Thu Jun 22 12:59:13 2023 +0200
dxgi: Consider vk_format a frontend field.
This is an oversight in eec9c3a2f63555604dd6e357bb3280e82e14ff5b: vk_format specifies the format used for the frontend resources. The backend images could use a different format, depending on what the swapchain supports.
Also, introduce the terms "frontend" and "backend" for the two sides of the swapchain, which are probably easier to understand.
---
dlls/dxgi/swapchain.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index 3409effaf21..eb5b750a546 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -1024,21 +1024,22 @@ struct d3d12_swapchain VkDevice vk_device; VkPhysicalDevice vk_physical_device;
- /* D3D12 side of the swapchain: these objects are visible to the - * IDXGISwapChain client, so they must never be recreated, except - * when ResizeBuffers*() is called. */ + /* D3D12 side of the swapchain (frontend): these objects are + * visible to the IDXGISwapChain client, so they must never be + * recreated, except when ResizeBuffers*() is called. */ unsigned int buffer_count; VkDeviceMemory vk_memory; VkImage vk_images[DXGI_MAX_SWAP_CHAIN_BUFFERS]; ID3D12Resource *buffers[DXGI_MAX_SWAP_CHAIN_BUFFERS]; unsigned int current_buffer_index; + VkFormat vk_format;
- /* Vulkan side of the swapchain: these objects are also destroyed - * and recreated when the Vulkan swapchain becomes out of date or - * when the synchronization interval is changed; this operation - * should be transparent to the IDXGISwapChain client (except for - * timings: recreating the Vulkan swapchain creates a noticeable - * delay, unfortunately). */ + /* Vulkan side of the swapchain (backend): these objects are also + * destroyed and recreated when the Vulkan swapchain becomes out + * of date or when the synchronization interval is changed; this + * operation should be transparent to the IDXGISwapChain client + * (except for timings: recreating the Vulkan swapchain creates a + * noticeable delay, unfortunately). */ VkSwapchainKHR vk_swapchain; VkCommandPool vk_cmd_pool; VkImage vk_swapchain_images[DXGI_MAX_SWAP_CHAIN_BUFFERS]; @@ -1047,7 +1048,6 @@ struct d3d12_swapchain unsigned int vk_swapchain_width; unsigned int vk_swapchain_height; VkPresentModeKHR present_mode; - VkFormat vk_format;
uint32_t vk_image_index;