parent
8631a7489b
commit
ab38f0c79a
@ -1,3 +1,3 @@
|
|||||||
/wine-6.7.tar.xz
|
/wine-6.8.tar.xz
|
||||||
/wine-6.7.tar.xz.sign
|
/wine-6.8.tar.xz.sign
|
||||||
/wine-staging-6.7.tar.gz
|
/wine-staging-6.8.tar.gz
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
SHA512 (wine-6.7.tar.xz) = 42920921eaff5a483859fba2b9e866c6afad25427d030f971efe2136f9619b675d5eb1ddfffd54bba8caa172c3e91eb347d673cb16f45560f0ab40a184a34758
|
SHA512 (wine-6.8.tar.xz) = 784863e3aa11f692cee2ab3b3d99cc896c1eb41cfab8cc6b52b5a31671d82fc7f6783bae72c65d8806a8c4096000401cbd0a1a7f1a88fd980685fae67fa9bd91
|
||||||
SHA512 (wine-6.7.tar.xz.sign) = 8993ec90439d15bc1ca500b847c1c832ec1334a267b2694d200a92c7dc7812c04dfd5fc28831b7bb5878d07c7c74a27c67565ebe8c13bc5b09182564045262cd
|
SHA512 (wine-6.8.tar.xz.sign) = bb82528de58fc69768e6d647ceee2f21c37cac5281f30754666f5ecd13fea15b605e005dc47105cf49fa7d1e3b0ac8e807eda319c378de09eeb122960665a8f7
|
||||||
SHA512 (wine-staging-6.7.tar.gz) = 74805846e2e6e5d751c25f4b98ac671f8507d3a9b13d572e166b1885e397a6bb74bd3ea4b456d46298306d632499a4b88f97eb6d53ff049c2495cf055347611d
|
SHA512 (wine-staging-6.8.tar.gz) = a2dfe74b07b687af147b61f235ea2843ff38a563f37ed2ed68dce1cc0ff3d50dbd7c9596836c6e236e368e7a55cbe1ba881dac11bb0966e61a76a7376f92bdcc
|
||||||
|
@ -1,146 +0,0 @@
|
|||||||
From 4cc738f609faff68bf4c67d5618174fa87ab3cdb Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Felix=20H=C3=A4dicke?= <felixhaedicke@web.de>
|
|
||||||
Date: Wed, 10 Jul 2019 22:19:31 +0200
|
|
||||||
Subject: [PATCH] winex11.drv: Support child window rendering for Vulkan via
|
|
||||||
XComposite
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45277
|
|
||||||
Signed-off-by: Felix Hädicke <felixhaedicke@web.de>
|
|
||||||
---
|
|
||||||
dlls/winex11.drv/vulkan.c | 56 ++++++++++++++++++++++++++++++++-------
|
|
||||||
1 file changed, 47 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c
|
|
||||||
index 28ae1a9e0e8..3b0bf58c107 100644
|
|
||||||
--- a/dlls/winex11.drv/vulkan.c
|
|
||||||
+++ b/dlls/winex11.drv/vulkan.c
|
|
||||||
@@ -33,6 +33,7 @@
|
|
||||||
#include "wine/debug.h"
|
|
||||||
#include "wine/heap.h"
|
|
||||||
#include "x11drv.h"
|
|
||||||
+#include "xcomposite.h"
|
|
||||||
|
|
||||||
#define VK_NO_PROTOTYPES
|
|
||||||
#define WINE_VK_HOST
|
|
||||||
@@ -55,6 +56,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
|
|
||||||
static CRITICAL_SECTION context_section = { &critsect_debug, -1, 0, 0, 0, 0 };
|
|
||||||
|
|
||||||
static XContext vulkan_hwnd_context;
|
|
||||||
+static XContext vulkan_swapchain_surface_context;
|
|
||||||
|
|
||||||
#define VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR 1000004000
|
|
||||||
|
|
||||||
@@ -62,6 +64,7 @@ struct wine_vk_surface
|
|
||||||
{
|
|
||||||
LONG ref;
|
|
||||||
Window window;
|
|
||||||
+ HDC child_window_dc;
|
|
||||||
VkSurfaceKHR surface; /* native surface */
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -135,6 +138,7 @@ static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context)
|
|
||||||
#undef LOAD_OPTIONAL_FUNCPTR
|
|
||||||
|
|
||||||
vulkan_hwnd_context = XUniqueContext();
|
|
||||||
+ vulkan_swapchain_surface_context = XUniqueContext();
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
@@ -252,16 +256,24 @@ static VkResult X11DRV_vkCreateSwapchainKHR(VkDevice device,
|
|
||||||
const VkSwapchainCreateInfoKHR *create_info,
|
|
||||||
const VkAllocationCallbacks *allocator, VkSwapchainKHR *swapchain)
|
|
||||||
{
|
|
||||||
+ VkResult res;
|
|
||||||
VkSwapchainCreateInfoKHR create_info_host;
|
|
||||||
+ struct wine_vk_surface *x11_surface = surface_from_handle(create_info->surface);
|
|
||||||
+
|
|
||||||
TRACE("%p %p %p %p\n", device, create_info, allocator, swapchain);
|
|
||||||
|
|
||||||
if (allocator)
|
|
||||||
FIXME("Support for allocation callbacks not implemented yet\n");
|
|
||||||
|
|
||||||
create_info_host = *create_info;
|
|
||||||
- create_info_host.surface = surface_from_handle(create_info->surface)->surface;
|
|
||||||
+ create_info_host.surface = x11_surface->surface;
|
|
||||||
|
|
||||||
- return pvkCreateSwapchainKHR(device, &create_info_host, NULL /* allocator */, swapchain);
|
|
||||||
+ res = pvkCreateSwapchainKHR(device, &create_info_host, NULL /* allocator */, swapchain);
|
|
||||||
+ if (res == VK_SUCCESS)
|
|
||||||
+ {
|
|
||||||
+ XSaveContext(gdi_display, (XID)(*swapchain), vulkan_swapchain_surface_context, (char *)x11_surface);
|
|
||||||
+ }
|
|
||||||
+ return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static VkResult X11DRV_vkCreateWin32SurfaceKHR(VkInstance instance,
|
|
||||||
@@ -277,13 +289,6 @@ static VkResult X11DRV_vkCreateWin32SurfaceKHR(VkInstance instance,
|
|
||||||
if (allocator)
|
|
||||||
FIXME("Support for allocation callbacks not implemented yet\n");
|
|
||||||
|
|
||||||
- /* TODO: support child window rendering. */
|
|
||||||
- if (GetAncestor(create_info->hwnd, GA_PARENT) != GetDesktopWindow())
|
|
||||||
- {
|
|
||||||
- FIXME("Application requires child window rendering, which is not implemented yet!\n");
|
|
||||||
- return VK_ERROR_INCOMPATIBLE_DRIVER;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
x11_surface = heap_alloc_zero(sizeof(*x11_surface));
|
|
||||||
if (!x11_surface)
|
|
||||||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
|
||||||
@@ -300,6 +305,23 @@ static VkResult X11DRV_vkCreateWin32SurfaceKHR(VkInstance instance,
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ /* child window rendering. */
|
|
||||||
+ if (GetAncestor(create_info->hwnd, GA_PARENT) != GetDesktopWindow())
|
|
||||||
+ {
|
|
||||||
+#ifdef SONAME_LIBXCOMPOSITE
|
|
||||||
+ if (usexcomposite)
|
|
||||||
+ {
|
|
||||||
+ pXCompositeRedirectWindow(gdi_display, x11_surface->window, CompositeRedirectManual);
|
|
||||||
+ x11_surface->child_window_dc = GetDC(create_info->hwnd);
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+#endif
|
|
||||||
+ {
|
|
||||||
+ FIXME("Child window rendering is not supported without X Composite Extension!\n");
|
|
||||||
+ return VK_ERROR_INCOMPATIBLE_DRIVER;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
create_info_host.sType = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR;
|
|
||||||
create_info_host.pNext = NULL;
|
|
||||||
create_info_host.flags = 0; /* reserved */
|
|
||||||
@@ -369,6 +391,7 @@ static void X11DRV_vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapcha
|
|
||||||
FIXME("Support for allocation callbacks not implemented yet\n");
|
|
||||||
|
|
||||||
pvkDestroySwapchainKHR(device, swapchain, NULL /* allocator */);
|
|
||||||
+ XDeleteContext(gdi_display, (XID)swapchain, vulkan_swapchain_surface_context);
|
|
||||||
}
|
|
||||||
|
|
||||||
static VkResult X11DRV_vkEnumerateInstanceExtensionProperties(const char *layer_name,
|
|
||||||
@@ -541,6 +564,21 @@ static VkResult X11DRV_vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+ for (uint32_t i = 0 ; i < present_info->swapchainCount; ++i)
|
|
||||||
+ {
|
|
||||||
+ struct wine_vk_surface *x11_surface;
|
|
||||||
+ if (!XFindContext(gdi_display, (XID)present_info->pSwapchains[i],
|
|
||||||
+ vulkan_swapchain_surface_context, (char **)&x11_surface) &&
|
|
||||||
+ x11_surface->child_window_dc)
|
|
||||||
+ {
|
|
||||||
+ struct x11drv_escape_flush_gl_drawable escape;
|
|
||||||
+ escape.code = X11DRV_FLUSH_GL_DRAWABLE;
|
|
||||||
+ escape.gl_drawable = x11_surface->window;
|
|
||||||
+ escape.flush = TRUE;
|
|
||||||
+ ExtEscape(x11_surface->child_window_dc, X11DRV_ESCAPE, sizeof(escape), (LPSTR)&escape, 0, NULL);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in new issue