wsi/win32: Don't require buffer blits for software drivers

Lavapipe can directly render to a linear CPU image and then BitBlit
straight from there.

Fixes: 2f462105 ("vulkan/wsi: Hook-up DXGI swapchains and DComp")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8085
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21049>
This commit is contained in:
Jesse Natalie 2023-02-01 12:48:24 -08:00 committed by Marge Bot
parent c8994256a6
commit 192e7e0cef

View file

@ -494,7 +494,7 @@ wsi_win32_image_init(VkDevice device_h,
chain->chain_dc = GetDC(chain->wnd);
image->chain = chain;
if (chain->base.blit.type != WSI_SWAPCHAIN_BUFFER_BLIT)
if (chain->dxgi)
return VK_SUCCESS;
image->sw.dc = CreateCompatibleDC(chain->chain_dc);
@ -663,8 +663,6 @@ wsi_win32_queue_present(struct wsi_swapchain *drv_chain,
if (chain->dxgi)
return wsi_win32_queue_present_dxgi(chain, image, damage);
assert(chain->base.blit.type == WSI_SWAPCHAIN_BUFFER_BLIT);
char *ptr = (char *)image->base.cpu_map;
char *dptr = (char *)image->sw.ppvBits;