Rebase against be002fd92b9d72163bf130ab8ade8aa4d9cdbad0.

This commit is contained in:
Zebediah Figura 2018-03-28 21:25:29 -05:00
parent 5876a3f782
commit 46d9678e0a
15 changed files with 28 additions and 11864 deletions

View File

@ -1,25 +0,0 @@
From 6dc1669f62dbaed088526f4afd3dc4b2e4527080 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 8 Aug 2015 17:50:32 +0200
Subject: ieframe: Return S_OK in IViewObject::Draw stub.
---
dlls/ieframe/view.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ieframe/view.c b/dlls/ieframe/view.c
index 3e44991..546e251 100644
--- a/dlls/ieframe/view.c
+++ b/dlls/ieframe/view.c
@@ -60,7 +60,7 @@ static HRESULT WINAPI ViewObject_Draw(IViewObject2 *iface, DWORD dwDrawAspect,
FIXME("(%p)->(%d %d %p %p %p %p %p %p %p %08lx)\n", This, dwDrawAspect, lindex,
pvAspect, ptd, hdcTargetDev, hdcDraw, lprcBounds, lprcWBounds, pfnContinue,
dwContinue);
- return E_NOTIMPL;
+ return S_OK;
}
static HRESULT WINAPI ViewObject_GetColorSet(IViewObject2 *iface, DWORD dwAspect,
--
2.5.0

View File

@ -1 +0,0 @@
Fixes: [30611] Fake success in IViewObject::Draw stub

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "d7430abd406d1f298acb9b2e5a397e11e448f304"
echo "be002fd92b9d72163bf130ab8ade8aa4d9cdbad0"
}
# Show version information
@ -162,7 +162,6 @@ patch_enable_all ()
enable_gdi32_Symbol_Truetype_Font="$1"
enable_gdiplus_Performance_Improvements="$1"
enable_hnetcfg_INetFwAuthorizedApplication="$1"
enable_ieframe_IViewObject_Draw="$1"
enable_imagehlp_BindImageEx="$1"
enable_imagehlp_Cleanup="$1"
enable_imagehlp_ImageLoad="$1"
@ -684,9 +683,6 @@ patch_enable ()
hnetcfg-INetFwAuthorizedApplication)
enable_hnetcfg_INetFwAuthorizedApplication="$2"
;;
ieframe-IViewObject-Draw)
enable_ieframe_IViewObject_Draw="$2"
;;
imagehlp-BindImageEx)
enable_imagehlp_BindImageEx="$2"
;;
@ -4065,21 +4061,6 @@ if test "$enable_hnetcfg_INetFwAuthorizedApplication" -eq 1; then
) >> "$patchlist"
fi
# Patchset ieframe-IViewObject-Draw
# |
# | This patchset fixes the following Wine bugs:
# | * [#30611] Fake success in IViewObject::Draw stub
# |
# | Modified files:
# | * dlls/ieframe/view.c
# |
if test "$enable_ieframe_IViewObject_Draw" -eq 1; then
patch_apply ieframe-IViewObject-Draw/0001-ieframe-Return-S_OK-in-IViewObject-Draw-stub.patch
(
printf '%s\n' '+ { "Michael Müller", "ieframe: Return S_OK in IViewObject::Draw stub.", 1 },';
) >> "$patchlist"
fi
# Patchset imagehlp-BindImageEx
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,4 +1,4 @@
From c7e306f0584aec0d9415ca2e8937d023c099d911 Mon Sep 17 00:00:00 2001
From 6ff0043587cd9885e0682787c34a65c1f7c783fd Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Mon, 19 Dec 2016 22:29:35 +0800
Subject: user32/tests: Add a message test for group of radio buttons.
@ -8,11 +8,11 @@ Subject: user32/tests: Add a message test for group of radio buttons.
1 file changed, 125 insertions(+)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 45b5222..c217550 100644
index 69841d3..643a6bf 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -6009,6 +6009,130 @@ static void test_button_messages(void)
DestroyWindow(parent);
@@ -6617,6 +6617,130 @@ static void test_button_bm_get_set_image(void)
ReleaseDC(0, hdc);
}
+#define ID_RADIO1 0x00e1
@ -142,14 +142,14 @@ index 45b5222..c217550 100644
/****************** static message test *************************/
static const struct message WmSetFontStaticSeq2[] =
{
@@ -16075,6 +16199,7 @@ START_TEST(msg)
invisible_parent_tests();
@@ -16837,6 +16961,7 @@ START_TEST(msg)
test_mdi_messages();
test_button_messages();
test_button_bm_get_set_image();
+ test_autoradio_messages();
test_static_messages();
test_listbox_messages();
test_combobox_messages();
--
2.9.0
2.7.4

View File

@ -1,4 +1,4 @@
From 65acbf528d5686523eff349221d49e4ee0d08fd7 Mon Sep 17 00:00:00 2001
From 66b4cda44a077b7e540462b5b98ebad0a58920b8 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 10 Jan 2017 15:58:14 +0800
Subject: user32/tests: Simplify the test for BM_CLICK on autoradio button by
@ -10,10 +10,10 @@ Subject: user32/tests: Simplify the test for BM_CLICK on autoradio button by
2 files changed, 59 insertions(+), 30 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 30328156f7a..5ed36df1a82 100644
index 643a6bf..daa8210 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -123,6 +123,8 @@ static DWORD cbt_hook_thread_id;
@@ -107,6 +107,8 @@ static DWORD cbt_hook_thread_id;
static const WCHAR testWindowClassW[] =
{ 'T','e','s','t','W','i','n','d','o','w','C','l','a','s','s','W',0 };
@ -22,7 +22,7 @@ index 30328156f7a..5ed36df1a82 100644
/*
FIXME: add tests for these
Window Edge Styles (Win31/Win95/98 look), in order of precedence:
@@ -5744,7 +5746,24 @@ static LRESULT CALLBACK button_hook_proc(HWND hwnd, UINT message, WPARAM wParam,
@@ -6135,7 +6137,24 @@ static LRESULT CALLBACK button_hook_proc(HWND hwnd, UINT message, WPARAM wParam,
case BM_SETSTATE:
if (GetCapture())
ok(GetCapture() == hwnd, "GetCapture() = %p\n", GetCapture());
@ -47,8 +47,8 @@ index 30328156f7a..5ed36df1a82 100644
default:
msg.hwnd = hwnd;
msg.message = message;
@@ -6064,32 +6083,34 @@ static void test_button_messages(void)
DestroyWindow(parent);
@@ -6617,32 +6636,34 @@ static void test_button_bm_get_set_image(void)
ReleaseDC(0, hdc);
}
-#define ID_RADIO1 0x00e1
@ -94,7 +94,7 @@ index 30328156f7a..5ed36df1a82 100644
{ EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0 },
{ WM_CAPTURECHANGED, sent|wparam|lparam|defwinproc, 0, 0 },
{ WM_COMMAND, sent|wparam|parent, MAKEWPARAM(ID_RADIO2, BN_CLICKED) },
@@ -6099,30 +6120,27 @@ static const struct message auto_radio_button_WM_CLICK[] =
@@ -6652,30 +6673,27 @@ static const struct message auto_radio_button_WM_CLICK[] =
{ 0 }
};
@ -138,7 +138,7 @@ index 30328156f7a..5ed36df1a82 100644
/* this avoids focus messages in the generated sequence */
SetFocus(radio2);
@@ -6174,7 +6192,7 @@ static void test_autoradio_messages(void)
@@ -6727,7 +6745,7 @@ static void test_autoradio_messages(void)
SendMessageA(radio2, BM_CLICK, 0, 0);
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
@ -147,17 +147,17 @@ index 30328156f7a..5ed36df1a82 100644
log_all_parent_messages--;
@@ -16281,7 +16299,7 @@ START_TEST(msg)
invisible_parent_tests();
@@ -16961,7 +16979,7 @@ START_TEST(msg)
test_mdi_messages();
test_button_messages();
test_button_bm_get_set_image();
- test_autoradio_messages();
+ test_autoradio_BM_CLICK();
test_static_messages();
test_listbox_messages();
test_combobox_messages();
diff --git a/dlls/user32/tests/resource.rc b/dlls/user32/tests/resource.rc
index a9e45e90ce1..1557291c145 100644
index 756e38f..90d687d 100644
--- a/dlls/user32/tests/resource.rc
+++ b/dlls/user32/tests/resource.rc
@@ -75,6 +75,17 @@ FONT 8, "MS Shell Dlg"
@ -179,5 +179,5 @@ index a9e45e90ce1..1557291c145 100644
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "CreateDialogParams Test"
--
2.11.0
2.7.4

View File

@ -1,4 +1,4 @@
From a1ce594db785f9266c522755919000df7fc16f71 Mon Sep 17 00:00:00 2001
From b2ea2a89745d96b906d45cea6494b04d01085c52 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 10 Jan 2017 16:02:36 +0800
Subject: user32/tests: Add a test for navigating a group of buttons using
@ -10,10 +10,10 @@ Subject: user32/tests: Add a test for navigating a group of buttons using
2 files changed, 327 insertions(+)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index 5ed36df1a82..ba7320d9c41 100644
index daa8210..e57f49b 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -6120,6 +6120,132 @@ static const struct message auto_radio_button_BM_CLICK[] =
@@ -6673,6 +6673,132 @@ static const struct message auto_radio_button_BM_CLICK[] =
{ 0 }
};
@ -146,7 +146,7 @@ index 5ed36df1a82..ba7320d9c41 100644
static INT_PTR WINAPI radio_test_dlg_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
{
ParentMsgCheckProcA(hwnd, msg, wp, lp);
@@ -6206,6 +6332,195 @@ static void test_autoradio_BM_CLICK(void)
@@ -6759,6 +6885,195 @@ static void test_autoradio_BM_CLICK(void)
DestroyWindow(parent);
}
@ -342,16 +342,16 @@ index 5ed36df1a82..ba7320d9c41 100644
/****************** static message test *************************/
static const struct message WmSetFontStaticSeq2[] =
{
@@ -16300,6 +16615,7 @@ START_TEST(msg)
test_mdi_messages();
@@ -16980,6 +17295,7 @@ START_TEST(msg)
test_button_messages();
test_button_bm_get_set_image();
test_autoradio_BM_CLICK();
+ test_autoradio_kbd_move();
test_static_messages();
test_listbox_messages();
test_combobox_messages();
diff --git a/dlls/user32/tests/resource.rc b/dlls/user32/tests/resource.rc
index 1557291c145..3823ed39e42 100644
index 90d687d..fdd1ce7 100644
--- a/dlls/user32/tests/resource.rc
+++ b/dlls/user32/tests/resource.rc
@@ -86,6 +86,17 @@ FONT 8, "MS Shell Dlg"
@ -373,5 +373,5 @@ index 1557291c145..3823ed39e42 100644
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "CreateDialogParams Test"
--
2.11.0
2.7.4

View File

@ -1,183 +0,0 @@
From 91bbda9b333a0c0962193cb7a6837ef5340a2768 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 20 Mar 2016 06:47:56 +0100
Subject: vulkan: Implement vkGetPhysicalDeviceWin32PresentationSupportKHR.
---
dlls/vulkan/vulkan_main.c | 55 +++++++++++++++++++++++++++++++++++++++++---
dlls/vulkan/vulkan_private.h | 10 ++++++++
dlls/vulkan/vulkan_thunks.c | 23 ++++++++++++++++++
3 files changed, 85 insertions(+), 3 deletions(-)
diff --git a/dlls/vulkan/vulkan_main.c b/dlls/vulkan/vulkan_main.c
index b060dc2..1ede8c8 100644
--- a/dlls/vulkan/vulkan_main.c
+++ b/dlls/vulkan/vulkan_main.c
@@ -44,6 +44,9 @@ static Display *display;
WINE_DECLARE_DEBUG_CHANNEL(winediag);
static void *libx11_xcb_handle;
+static typeof(xcb_get_setup) *pxcb_get_setup;
+static typeof(xcb_screen_next) *pxcb_screen_next;
+static typeof(xcb_setup_roots_iterator) *pxcb_setup_roots_iterator;
static typeof(XGetXCBConnection) *pXGetXCBConnection;
static BOOL init_x11_xcb( void )
@@ -54,7 +57,11 @@ static BOOL init_x11_xcb( void )
return FALSE;
}
- pXGetXCBConnection = wine_dlsym( libx11_xcb_handle, "XGetXCBConnection", NULL, 0 );
+ pxcb_get_setup = wine_dlsym( libx11_xcb_handle, "xcb_get_setup", NULL, 0 );
+ pxcb_screen_next = wine_dlsym( libx11_xcb_handle, "xcb_screen_next", NULL, 0 );
+ pxcb_setup_roots_iterator = wine_dlsym( libx11_xcb_handle, "xcb_setup_roots_iterator", NULL, 0 );
+ pXGetXCBConnection = wine_dlsym( libx11_xcb_handle, "XGetXCBConnection", NULL, 0 );
+
return TRUE;
}
@@ -242,14 +249,56 @@ VkResult WINAPI vkCreateWin32SurfaceKHR( VkInstance instance,
return res;
}
+#if defined(HAVE_X11_XLIB_H) && defined(SONAME_LIBX11_XCB)
+static xcb_screen_t *get_xcb_screen( xcb_connection_t *connection, int screen )
+{
+ xcb_screen_iterator_t iter = pxcb_setup_roots_iterator( pxcb_get_setup(connection) );
+ for (; iter.rem; screen--)
+ {
+ if (!screen) return iter.data;
+ pxcb_screen_next( &iter );
+ }
+ return NULL;
+}
+#endif
+
/***********************************************************************
* vkGetPhysicalDeviceWin32PresentationSupportKHR (VULKAN.@)
*/
VkBool32 WINAPI vkGetPhysicalDeviceWin32PresentationSupportKHR( VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex )
{
- FIXME( "(%p, %u): stub\n", physicalDevice, queueFamilyIndex );
- return VK_FALSE;
+ VkResult res = VK_ERROR_INCOMPATIBLE_DRIVER;
+
+ TRACE( "(%p, %u)\n", physicalDevice, queueFamilyIndex );
+
+#if defined(HAVE_X11_XLIB_H) && defined(SONAME_LIBX11_XCB)
+ if (pxcb_get_setup && pxcb_screen_next && pxcb_setup_roots_iterator &&
+ pXGetXCBConnection && res == VK_ERROR_INCOMPATIBLE_DRIVER)
+ {
+ xcb_connection_t *connection = pXGetXCBConnection( display );
+ xcb_screen_t *screen = get_xcb_screen( connection, XDefaultScreen(display) );
+ if (screen)
+ {
+ res = p_vkGetPhysicalDeviceXcbPresentationSupportKHR( physicalDevice, queueFamilyIndex,
+ connection, screen->root_visual );
+ }
+ else
+ ERR( "failed to find default screen\n" );
+ }
+#endif
+
+#if defined(HAVE_X11_XLIB_H)
+ if (res == VK_ERROR_INCOMPATIBLE_DRIVER)
+ {
+ Visual *visual = XDefaultVisual( display, XDefaultScreen(display) );
+ VisualID visual_id = XVisualIDFromVisual( visual );
+ res = p_vkGetPhysicalDeviceXlibPresentationSupportKHR( physicalDevice, queueFamilyIndex,
+ display, visual_id );
+ }
+#endif
+
+ return res;
}
/***********************************************************************
diff --git a/dlls/vulkan/vulkan_private.h b/dlls/vulkan/vulkan_private.h
index 0f85854..1d5767a 100644
--- a/dlls/vulkan/vulkan_private.h
+++ b/dlls/vulkan/vulkan_private.h
@@ -63,6 +63,9 @@ typedef void *PFN_vkVoidFunction;
typedef void *PFN_vkVoidFunction_host;
typedef void *VK_DEFINE_HANDLE;
typedef uint64_t VK_DEFINE_NON_DISPATCHABLE_HANDLE;
+#if !defined(HAVE_X11_XLIB_H)
+typedef uint32_t VisualID;
+#endif
typedef uint32_t VkAccessFlags;
typedef uint32_t VkAttachmentDescriptionFlags;
typedef int VkAttachmentLoadOp;
@@ -211,6 +214,9 @@ typedef unsigned long int Window;
typedef struct xcb_connection_t xcb_connection_t;
#endif
#if !defined(HAVE_X11_XLIB_XCB_H)
+typedef uint32_t xcb_visualid_t;
+#endif
+#if !defined(HAVE_X11_XLIB_XCB_H)
typedef uint32_t xcb_window_t;
#endif
@@ -2352,6 +2358,10 @@ extern VkResult (*p_vkGetPhysicalDeviceSurfacePresentModesKHR)( VkPhysicalDevice
uint32_t *, VkPresentModeKHR * ) DECLSPEC_HIDDEN;
extern VkResult (*p_vkGetPhysicalDeviceSurfaceSupportKHR)( VkPhysicalDevice, uint32_t,
VkSurfaceKHR, VkBool32 * ) DECLSPEC_HIDDEN;
+extern VkBool32 (*p_vkGetPhysicalDeviceXcbPresentationSupportKHR)( VkPhysicalDevice, uint32_t,
+ xcb_connection_t *, xcb_visualid_t ) DECLSPEC_HIDDEN;
+extern VkBool32 (*p_vkGetPhysicalDeviceXlibPresentationSupportKHR)( VkPhysicalDevice, uint32_t,
+ Display *, VisualID ) DECLSPEC_HIDDEN;
extern VkResult (*p_vkGetPipelineCacheData)( VkDevice, VkPipelineCache, size_t *,
void * ) DECLSPEC_HIDDEN;
extern VkResult (*p_vkGetQueryPoolResults)( VkDevice, VkQueryPool, uint32_t, uint32_t, size_t,
diff --git a/dlls/vulkan/vulkan_thunks.c b/dlls/vulkan/vulkan_thunks.c
index 8af28e7c..8333cb7 100644
--- a/dlls/vulkan/vulkan_thunks.c
+++ b/dlls/vulkan/vulkan_thunks.c
@@ -3844,6 +3844,23 @@ static VkResult null_vkGetPhysicalDeviceSurfaceSupportKHR( VkPhysicalDevice phys
return VK_ERROR_INCOMPATIBLE_DRIVER;
}
+static VkBool32 null_vkGetPhysicalDeviceXcbPresentationSupportKHR( VkPhysicalDevice physicalDevice,
+ uint32_t queueFamilyIndex, xcb_connection_t *connection, xcb_visualid_t visual_id )
+{
+ FIXME( "(%p, %u, %p, %u) not supported\n", physicalDevice, queueFamilyIndex, connection,
+ visual_id );
+ return VK_FALSE;
+}
+
+static VkBool32 null_vkGetPhysicalDeviceXlibPresentationSupportKHR(
+ VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display *dpy,
+ VisualID visualID )
+{
+ FIXME( "(%p, %u, %p, %u) not supported\n", physicalDevice, queueFamilyIndex, dpy,
+ (uint32_t)visualID );
+ return VK_FALSE;
+}
+
static VkResult null_vkGetPipelineCacheData( VkDevice device, VkPipelineCache pipelineCache,
size_t *pDataSize, void *pData )
{
@@ -4265,6 +4282,10 @@ VkResult (*p_vkGetPhysicalDeviceSurfacePresentModesKHR)( VkPhysicalDevice, VkSur
uint32_t *, VkPresentModeKHR * ) = null_vkGetPhysicalDeviceSurfacePresentModesKHR;
VkResult (*p_vkGetPhysicalDeviceSurfaceSupportKHR)( VkPhysicalDevice, uint32_t, VkSurfaceKHR,
VkBool32 * ) = null_vkGetPhysicalDeviceSurfaceSupportKHR;
+VkBool32 (*p_vkGetPhysicalDeviceXcbPresentationSupportKHR)( VkPhysicalDevice, uint32_t,
+ xcb_connection_t *, xcb_visualid_t ) = null_vkGetPhysicalDeviceXcbPresentationSupportKHR;
+VkBool32 (*p_vkGetPhysicalDeviceXlibPresentationSupportKHR)( VkPhysicalDevice, uint32_t, Display *,
+ VisualID ) = null_vkGetPhysicalDeviceXlibPresentationSupportKHR;
VkResult (*p_vkGetPipelineCacheData)( VkDevice, VkPipelineCache, size_t *, void * ) =
null_vkGetPipelineCacheData;
VkResult (*p_vkGetQueryPoolResults)( VkDevice, VkQueryPool, uint32_t, uint32_t, size_t, void *,
@@ -6520,6 +6541,8 @@ function_table[] =
DEFINE_FUNCTION( vkGetPhysicalDeviceSurfaceFormatsKHR )
DEFINE_FUNCTION( vkGetPhysicalDeviceSurfacePresentModesKHR )
DEFINE_FUNCTION( vkGetPhysicalDeviceSurfaceSupportKHR )
+ DEFINE_FUNCTION( vkGetPhysicalDeviceXcbPresentationSupportKHR )
+ DEFINE_FUNCTION( vkGetPhysicalDeviceXlibPresentationSupportKHR )
DEFINE_FUNCTION( vkGetPipelineCacheData )
DEFINE_FUNCTION( vkGetQueryPoolResults )
DEFINE_FUNCTION( vkGetRenderAreaGranularity )
--
2.7.1

View File

@ -1,65 +0,0 @@
From ceb7879ae9cd98600f0d1f4005559c1d2dca50a1 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 23 Mar 2016 01:11:58 +0100
Subject: vulkan: Use binary search to lookup function in is_null_func.
---
dlls/vulkan/vulkan_thunks.c | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/dlls/vulkan/vulkan_thunks.c b/dlls/vulkan/vulkan_thunks.c
index 8333cb7..4ddb352 100644
--- a/dlls/vulkan/vulkan_thunks.c
+++ b/dlls/vulkan/vulkan_thunks.c
@@ -6392,15 +6392,17 @@ VkResult WINAPI vkWaitForFences( VkDevice device, uint32_t fenceCount, const VkF
return p_vkWaitForFences( device, fenceCount, pFences, waitAll, timeout );
}
-static const struct
+struct function_entry
{
const char *name;
void **host_func;
void *null_func;
-}
-function_table[] =
+};
+
+static const struct function_entry function_table[] =
{
#define DEFINE_FUNCTION( f ) { #f, (void **)&p_##f, null_##f },
+ /* functions must be sorted alphabetically */
DEFINE_FUNCTION( vkAcquireNextImageKHR )
DEFINE_FUNCTION( vkAllocateCommandBuffers )
DEFINE_FUNCTION( vkAllocateDescriptorSets )
@@ -6594,17 +6596,20 @@ BOOL init_vulkan( void )
return TRUE;
}
+static int compare_function_entry( const void *a, const void *b )
+{
+ return strcmp( ((struct function_entry *)a)->name, ((struct function_entry *)b)->name );
+}
+
BOOL is_null_func( const char *name )
{
- int i;
+ struct function_entry search = { name, NULL, NULL };
+ struct function_entry *found;
- for (i = 0; i < ARRAY_SIZE(function_table); i++)
- {
- if (strcmp( function_table[i].name, name )) continue;
- return (*function_table[i].host_func == function_table[i].null_func);
- }
+ found = bsearch( &search, function_table, ARRAY_SIZE(function_table),
+ sizeof(function_table[0]), compare_function_entry );
- return FALSE;
+ return found ? (*found->host_func == found->null_func) : FALSE;
}
void free_vulkan( void )
--
2.7.1

View File

@ -1,42 +0,0 @@
From e2f13a81be20013376928c02d5405c831452cddb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 1 Apr 2016 23:58:28 +0200
Subject: vulkan: Try to load libvulkan.so.1.
---
dlls/vulkan/vulkan_thunks.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/vulkan/vulkan_thunks.c b/dlls/vulkan/vulkan_thunks.c
index acced5e..aea8d64 100644
--- a/dlls/vulkan/vulkan_thunks.c
+++ b/dlls/vulkan/vulkan_thunks.c
@@ -6572,13 +6572,24 @@ static void *libvulkan_handle;
BOOL init_vulkan( void )
{
+ static const char *libname[] =
+ {
+ "libvulkan.so.1",
+ "libvulkan.so",
+ };
void *ptr;
int i;
if (!(function_heap = HeapCreate( HEAP_CREATE_ENABLE_EXECUTE, 0, 0 )))
return FALSE;
- if (!(libvulkan_handle = wine_dlopen( "libvulkan.so", RTLD_NOW, NULL, 0 )))
+ for (i = 0; i < ARRAY_SIZE(libname); i++)
+ {
+ libvulkan_handle = wine_dlopen( libname[i], RTLD_NOW, NULL, 0 );
+ if (libvulkan_handle) break;
+ }
+
+ if (!libvulkan_handle)
{
ERR_(winediag)( "failed to load libvulkan.so, no support for vulkan\n" );
HeapDestroy( function_heap );
--
2.7.1

View File

@ -1,101 +0,0 @@
From 99d6f01e7887519a6567e36a87e0dac936ee199a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 9 Oct 2016 21:11:57 +0200
Subject: vulkan: Enumerate VK_KHR_win32_surface only one time in
vkEnumerateInstanceExtensionProperties.
---
dlls/vulkan/vulkan_main.c | 56 +++++++++++++++++++++++++++++++++++---------
dlls/vulkan/vulkan_private.h | 1 +
2 files changed, 46 insertions(+), 11 deletions(-)
diff --git a/dlls/vulkan/vulkan_main.c b/dlls/vulkan/vulkan_main.c
index 1ede8c8..55361a4 100644
--- a/dlls/vulkan/vulkan_main.c
+++ b/dlls/vulkan/vulkan_main.c
@@ -353,25 +353,59 @@ VkResult WINAPI vkCreateInstance( const VkInstanceCreateInfo *pCreateInfo,
VkResult WINAPI vkEnumerateInstanceExtensionProperties( const char *pLayerName,
uint32_t *pPropertyCount, VkExtensionProperties *pProperties )
{
+ VkExtensionProperties *native_props;
+ uint32_t native_prop_count;
+ BOOL found = FALSE;
VkResult res;
- int i;
+ int i, j;
TRACE( "(%p, %p, %p)\n", pLayerName, pPropertyCount, pProperties );
- res = p_vkEnumerateInstanceExtensionProperties( pLayerName, pPropertyCount, pProperties );
- if ((res == VK_SUCCESS || res == VK_INCOMPLETE) && pProperties)
+ res = p_vkEnumerateInstanceExtensionProperties( pLayerName, &native_prop_count, NULL );
+ if (res != VK_SUCCESS)
+ return res;
+
+ native_props = HeapAlloc( GetProcessHeap(), 0, sizeof(*native_props) * native_prop_count );
+ if (!native_props)
+ return VK_ERROR_OUT_OF_HOST_MEMORY;
+
+ res = p_vkEnumerateInstanceExtensionProperties( pLayerName, &native_prop_count, native_props );
+ if (res != VK_SUCCESS)
+ {
+ HeapFree( GetProcessHeap(), 0, native_props );
+ return res;
+ }
+
+ for (i = 0, j = 0; i < native_prop_count; i++)
{
- for (i = 0; i < *pPropertyCount; i++)
+ if (!strcmp( native_props[i].extensionName, "VK_KHR_xcb_surface" ) ||
+ !strcmp( native_props[i].extensionName, "VK_KHR_xlib_surface" ))
{
- if (!strcmp( pProperties[i].extensionName, "VK_KHR_xcb_surface" ) ||
- !strcmp( pProperties[i].extensionName, "VK_KHR_xlib_surface" ))
- {
- TRACE( "replacing %s -> VK_KHR_win32_surface\n", debugstr_a(pProperties[i].extensionName) );
- strcpy( pProperties[i].extensionName, "VK_KHR_win32_surface" );
- pProperties[i].specVersion = 6;
- }
+ TRACE( "found %s for VK_KHR_win32_surface support\n", debugstr_a(native_props[i].extensionName) );
+
+ if (found)
+ continue;
+
+ strcpy( native_props[i].extensionName, "VK_KHR_win32_surface" );
+ native_props[i].specVersion = 6;
+ found = TRUE;
+ }
+
+ if (!pProperties)
+ {
+ j++;
+ continue;
+ }
+
+ if (j >= *pPropertyCount)
+ {
+ res = VK_INCOMPLETE;
+ break;
}
+ pProperties[j++] = native_props[i];
}
+ *pPropertyCount = j;
+ HeapFree( GetProcessHeap(), 0, native_props );
return res;
}
diff --git a/dlls/vulkan/vulkan_private.h b/dlls/vulkan/vulkan_private.h
index 1d5767a..6fb3ed6 100644
--- a/dlls/vulkan/vulkan_private.h
+++ b/dlls/vulkan/vulkan_private.h
@@ -38,6 +38,7 @@
#define VK_SUCCESS 0
#define VK_INCOMPLETE 5
+#define VK_ERROR_OUT_OF_HOST_MEMORY (-1)
#define VK_ERROR_EXTENSION_NOT_PRESENT (-7)
#define VK_ERROR_INCOMPATIBLE_DRIVER (-9)
#define VK_FALSE 0
--
2.9.0

View File

@ -1,62 +0,0 @@
From 133657f27695ca083e6abed70e8aef0e759b9559 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 9 Oct 2016 23:06:34 +0200
Subject: vulkan: Improve vkGetPhysicalDeviceWin32PresentationSupportKHR and
vkCreateWin32SurfaceKHR.
---
dlls/vulkan/vulkan_main.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/vulkan/vulkan_main.c b/dlls/vulkan/vulkan_main.c
index 55361a4..7700f02 100644
--- a/dlls/vulkan/vulkan_main.c
+++ b/dlls/vulkan/vulkan_main.c
@@ -208,7 +208,8 @@ VkResult WINAPI vkCreateWin32SurfaceKHR( VkInstance instance,
TRACE( "(%p, %p, %p, %p)\n", instance, pCreateInfo, pAllocator, pSurface );
#if defined(HAVE_X11_XLIB_H) && defined(SONAME_LIBX11_XCB)
- if (pXGetXCBConnection && res == VK_ERROR_INCOMPATIBLE_DRIVER)
+ if (pXGetXCBConnection && (res == VK_ERROR_INCOMPATIBLE_DRIVER ||
+ res == VK_ERROR_EXTENSION_NOT_PRESENT))
{
VkAllocationCallbacks_host tmp_pAllocator, *ptr_pAllocator;
VkXcbSurfaceCreateInfoKHR_host tmp_pCreateInfo;
@@ -226,7 +227,8 @@ VkResult WINAPI vkCreateWin32SurfaceKHR( VkInstance instance,
#endif
#if defined(HAVE_X11_XLIB_H)
- if (res == VK_ERROR_INCOMPATIBLE_DRIVER)
+ if (res == VK_ERROR_INCOMPATIBLE_DRIVER ||
+ res == VK_ERROR_EXTENSION_NOT_PRESENT)
{
VkAllocationCallbacks_host tmp_pAllocator, *ptr_pAllocator;
VkXlibSurfaceCreateInfoKHR_host tmp_pCreateInfo;
@@ -268,13 +270,13 @@ static xcb_screen_t *get_xcb_screen( xcb_connection_t *connection, int screen )
VkBool32 WINAPI vkGetPhysicalDeviceWin32PresentationSupportKHR( VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex )
{
- VkResult res = VK_ERROR_INCOMPATIBLE_DRIVER;
+ VkBool32 res = VK_FALSE;
TRACE( "(%p, %u)\n", physicalDevice, queueFamilyIndex );
#if defined(HAVE_X11_XLIB_H) && defined(SONAME_LIBX11_XCB)
if (pxcb_get_setup && pxcb_screen_next && pxcb_setup_roots_iterator &&
- pXGetXCBConnection && res == VK_ERROR_INCOMPATIBLE_DRIVER)
+ pXGetXCBConnection && !res)
{
xcb_connection_t *connection = pXGetXCBConnection( display );
xcb_screen_t *screen = get_xcb_screen( connection, XDefaultScreen(display) );
@@ -289,7 +291,7 @@ VkBool32 WINAPI vkGetPhysicalDeviceWin32PresentationSupportKHR( VkPhysicalDevice
#endif
#if defined(HAVE_X11_XLIB_H)
- if (res == VK_ERROR_INCOMPATIBLE_DRIVER)
+ if (!res)
{
Visual *visual = XDefaultVisual( display, XDefaultScreen(display) );
VisualID visual_id = XVisualIDFromVisual( visual );
--
2.9.0

View File

@ -1,92 +0,0 @@
From 7e74fd6dcb57447cc0ae2054291bc3ea30ac3c3d Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 18 Jan 2017 20:29:33 +0100
Subject: vulkan: Only convert VkDescriptor{Image,Buffer}Info when type is
valid.
---
dlls/vulkan/vulkan_private.h | 41 +++++++++++++++++++++++++++++++++++++++++
dlls/vulkan/vulkan_thunks.c | 8 ++++++--
2 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/dlls/vulkan/vulkan_private.h b/dlls/vulkan/vulkan_private.h
index 1d4f5b6b833..22696e2d400 100644
--- a/dlls/vulkan/vulkan_private.h
+++ b/dlls/vulkan/vulkan_private.h
@@ -45,6 +45,18 @@
#define VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR 1000004000
#define VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR 1000005000
+#define VK_DESCRIPTOR_TYPE_SAMPLER 0
+#define VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER 1
+#define VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE 2
+#define VK_DESCRIPTOR_TYPE_STORAGE_IMAGE 3
+#define VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER 4
+#define VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER 5
+#define VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER 6
+#define VK_DESCRIPTOR_TYPE_STORAGE_BUFFER 7
+#define VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC 8
+#define VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC 9
+#define VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT 10
+
#if !defined(HAVE_X11_XLIB_H)
typedef struct _XDisplay Display;
#endif
@@ -3389,6 +3401,35 @@ static inline void release_VkCopyDescriptorSet_array( VkCopyDescriptorSet *out,
#endif /* defined(USE_STRUCT_CONVERSION) */
+static inline BOOL valid_pImageInfo( VkDescriptorType descriptorType )
+{
+ switch (descriptorType)
+ {
+ case VK_DESCRIPTOR_TYPE_SAMPLER:
+ case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER:
+ case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE:
+ case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE:
+ case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT:
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
+
+static inline BOOL valid_pBufferInfo( VkDescriptorType descriptorType )
+{
+ switch (descriptorType)
+ {
+ case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER:
+ case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER:
+ case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC:
+ case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC:
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
+
extern BOOL init_vulkan( void ) DECLSPEC_HIDDEN;
extern BOOL is_null_func( const char *name ); DECLSPEC_HIDDEN
extern void free_vulkan( void ) DECLSPEC_HIDDEN;
diff --git a/dlls/vulkan/vulkan_thunks.c b/dlls/vulkan/vulkan_thunks.c
index 3e612483a3c..0475c70e62a 100644
--- a/dlls/vulkan/vulkan_thunks.c
+++ b/dlls/vulkan/vulkan_thunks.c
@@ -2822,8 +2822,12 @@ VkWriteDescriptorSet_host *convert_VkWriteDescriptorSet( VkWriteDescriptorSet_ho
out->dstArrayElement = in->dstArrayElement;
out->descriptorCount = in->descriptorCount;
out->descriptorType = in->descriptorType;
- out->pImageInfo = convert_VkDescriptorImageInfo_array( in->pImageInfo, in->descriptorCount );
- out->pBufferInfo = convert_VkDescriptorBufferInfo_array( in->pBufferInfo, in->descriptorCount );
+ out->pImageInfo = valid_pImageInfo( in->descriptorType ) ?
+ convert_VkDescriptorImageInfo_array( in->pImageInfo, in->descriptorCount ) :
+ (void *)0xbadc0ded; /* should be ignored */
+ out->pBufferInfo = valid_pBufferInfo( in->descriptorType ) ?
+ convert_VkDescriptorBufferInfo_array( in->pBufferInfo, in->descriptorCount ) :
+ (void *)0xbadc0ded; /* should be ignored */
out->pTexelBufferView = in->pTexelBufferView; /* length is descriptorCount */
return out;
--
2.11.0

View File

@ -1,3 +0,0 @@
Fixes: [40164] Implement support for Vulkan
Disabled: true
# Disabled since this area is currently (27 February) seeing active development.