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,574 +0,0 @@
From 9f91a5be15c940eee321bec6cabe89aacf2c65ab 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:29:51 +0200
Subject: vulkan: Update to spec version 1.0.30 (no VK_EXT_debug_marker support
yet).
---
dlls/vulkan-1/vulkan-1.spec | 3 +
dlls/vulkan/vulkan.spec | 3 +
dlls/vulkan/vulkan_private.h | 105 +++++++++++++++++--
dlls/vulkan/vulkan_thunks.c | 235 ++++++++++++++++++++++++++++++++++++++++---
4 files changed, 323 insertions(+), 23 deletions(-)
diff --git a/dlls/vulkan-1/vulkan-1.spec b/dlls/vulkan-1/vulkan-1.spec
index 51bcfff..7bd905f 100644
--- a/dlls/vulkan-1/vulkan-1.spec
+++ b/dlls/vulkan-1/vulkan-1.spec
@@ -25,7 +25,9 @@
@ stdcall vkCmdDraw(ptr long long long long) vulkan.vkCmdDraw
@ stdcall vkCmdDrawIndexed(ptr long long long long long) vulkan.vkCmdDrawIndexed
@ stdcall vkCmdDrawIndexedIndirect(ptr int64 int64 long long) vulkan.vkCmdDrawIndexedIndirect
+@ stdcall vkCmdDrawIndexedIndirectCountAMD(ptr int64 int64 int64 int64 long long) vulkan.vkCmdDrawIndexedIndirectCountAMD
@ stdcall vkCmdDrawIndirect(ptr int64 int64 long long) vulkan.vkCmdDrawIndirect
+@ stdcall vkCmdDrawIndirectCountAMD(ptr int64 int64 int64 int64 long long) vulkan.vkCmdDrawIndirectCountAMD
@ stdcall vkCmdEndQuery(ptr int64 long) vulkan.vkCmdEndQuery
@ stdcall vkCmdEndRenderPass(ptr) vulkan.vkCmdEndRenderPass
@ stdcall vkCmdExecuteCommands(ptr long ptr) vulkan.vkCmdExecuteCommands
@@ -126,6 +128,7 @@
@ stdcall vkGetInstanceProcAddr(ptr str) vulkan.vkGetInstanceProcAddr
@ stdcall vkGetPhysicalDeviceDisplayPlanePropertiesKHR(ptr ptr ptr) vulkan.vkGetPhysicalDeviceDisplayPlanePropertiesKHR
@ stdcall vkGetPhysicalDeviceDisplayPropertiesKHR(ptr ptr ptr) vulkan.vkGetPhysicalDeviceDisplayPropertiesKHR
+@ stdcall vkGetPhysicalDeviceExternalImageFormatPropertiesNV(ptr long long long long long long ptr) vulkan.vkGetPhysicalDeviceExternalImageFormatPropertiesNV
@ stdcall vkGetPhysicalDeviceFeatures(ptr ptr) vulkan.vkGetPhysicalDeviceFeatures
@ stdcall vkGetPhysicalDeviceFormatProperties(ptr long ptr) vulkan.vkGetPhysicalDeviceFormatProperties
@ stdcall vkGetPhysicalDeviceImageFormatProperties(ptr long long long long long ptr) vulkan.vkGetPhysicalDeviceImageFormatProperties
diff --git a/dlls/vulkan/vulkan.spec b/dlls/vulkan/vulkan.spec
index 9b689ad..2d16b19 100644
--- a/dlls/vulkan/vulkan.spec
+++ b/dlls/vulkan/vulkan.spec
@@ -25,7 +25,9 @@
@ stdcall vkCmdDraw(ptr long long long long)
@ stdcall vkCmdDrawIndexed(ptr long long long long long)
@ stdcall vkCmdDrawIndexedIndirect(ptr int64 int64 long long)
+@ stdcall vkCmdDrawIndexedIndirectCountAMD(ptr int64 int64 int64 int64 long long)
@ stdcall vkCmdDrawIndirect(ptr int64 int64 long long)
+@ stdcall vkCmdDrawIndirectCountAMD(ptr int64 int64 int64 int64 long long)
@ stdcall vkCmdEndQuery(ptr int64 long)
@ stdcall vkCmdEndRenderPass(ptr)
@ stdcall vkCmdExecuteCommands(ptr long ptr)
@@ -126,6 +128,7 @@
@ stdcall vkGetInstanceProcAddr(ptr str)
@ stdcall vkGetPhysicalDeviceDisplayPlanePropertiesKHR(ptr ptr ptr)
@ stdcall vkGetPhysicalDeviceDisplayPropertiesKHR(ptr ptr ptr)
+@ stdcall vkGetPhysicalDeviceExternalImageFormatPropertiesNV(ptr long long long long long long ptr)
@ stdcall vkGetPhysicalDeviceFeatures(ptr ptr)
@ stdcall vkGetPhysicalDeviceFormatProperties(ptr long ptr)
@ stdcall vkGetPhysicalDeviceImageFormatProperties(ptr long long long long long ptr)
diff --git a/dlls/vulkan/vulkan_private.h b/dlls/vulkan/vulkan_private.h
index 6fb3ed6..1d4f5b6 100644
--- a/dlls/vulkan/vulkan_private.h
+++ b/dlls/vulkan/vulkan_private.h
@@ -119,6 +119,8 @@ typedef uint32_t VkDisplaySurfaceCreateFlagsKHR;
typedef int VkDynamicState;
typedef uint64_t VkEvent;
typedef uint32_t VkEventCreateFlags;
+typedef uint32_t VkExternalMemoryFeatureFlagsNV;
+typedef uint32_t VkExternalMemoryHandleTypeFlagsNV;
typedef uint64_t VkFence;
typedef uint32_t VkFenceCreateFlags;
typedef int VkFilter;
@@ -1521,13 +1523,6 @@ typedef struct VkDisplayPropertiesKHR_host
VkBool32 persistentContent;
} VkDisplayPropertiesKHR_host;
-typedef struct VkFormatProperties
-{
- VkFormatFeatureFlags linearTilingFeatures;
- VkFormatFeatureFlags optimalTilingFeatures;
- VkFormatFeatureFlags bufferFeatures;
-} VkFormatProperties;
-
typedef struct VkImageFormatProperties
{
VkExtent3D maxExtent;
@@ -1546,6 +1541,29 @@ typedef struct VkImageFormatProperties_host
VkDeviceSize maxResourceSize;
} VkImageFormatProperties_host;
+typedef struct VkExternalImageFormatPropertiesNV
+{
+ VkImageFormatProperties DECLSPEC_ALIGN(8) imageFormatProperties;
+ VkExternalMemoryFeatureFlagsNV externalMemoryFeatures;
+ VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes;
+ VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes;
+} VkExternalImageFormatPropertiesNV;
+
+typedef struct VkExternalImageFormatPropertiesNV_host
+{
+ VkImageFormatProperties_host imageFormatProperties;
+ VkExternalMemoryFeatureFlagsNV externalMemoryFeatures;
+ VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes;
+ VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes;
+} VkExternalImageFormatPropertiesNV_host;
+
+typedef struct VkFormatProperties
+{
+ VkFormatFeatureFlags linearTilingFeatures;
+ VkFormatFeatureFlags optimalTilingFeatures;
+ VkFormatFeatureFlags bufferFeatures;
+} VkFormatProperties;
+
typedef struct VkMemoryType
{
VkMemoryPropertyFlags propertyFlags;
@@ -2135,8 +2153,12 @@ extern void (*p_vkCmdDrawIndexed)( VkCommandBuffer, uint32_t, uint32_t, uint32_t
uint32_t ) DECLSPEC_HIDDEN;
extern void (*p_vkCmdDrawIndexedIndirect)( VkCommandBuffer, VkBuffer, VkDeviceSize, uint32_t,
uint32_t ) DECLSPEC_HIDDEN;
+extern void (*p_vkCmdDrawIndexedIndirectCountAMD)( VkCommandBuffer, VkBuffer, VkDeviceSize,
+ VkBuffer, VkDeviceSize, uint32_t, uint32_t ) DECLSPEC_HIDDEN;
extern void (*p_vkCmdDrawIndirect)( VkCommandBuffer, VkBuffer, VkDeviceSize, uint32_t,
uint32_t ) DECLSPEC_HIDDEN;
+extern void (*p_vkCmdDrawIndirectCountAMD)( VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer,
+ VkDeviceSize, uint32_t, uint32_t ) DECLSPEC_HIDDEN;
extern void (*p_vkCmdEndQuery)( VkCommandBuffer, VkQueryPool, uint32_t ) DECLSPEC_HIDDEN;
extern void (*p_vkCmdEndRenderPass)( VkCommandBuffer ) DECLSPEC_HIDDEN;
extern void (*p_vkCmdExecuteCommands)( VkCommandBuffer, uint32_t,
@@ -2171,7 +2193,7 @@ extern void (*p_vkCmdSetStencilWriteMask)( VkCommandBuffer, VkStencilFaceFlags,
extern void (*p_vkCmdSetViewport)( VkCommandBuffer, uint32_t, uint32_t,
const VkViewport * ) DECLSPEC_HIDDEN;
extern void (*p_vkCmdUpdateBuffer)( VkCommandBuffer, VkBuffer, VkDeviceSize, VkDeviceSize,
- const uint32_t * ) DECLSPEC_HIDDEN;
+ const void * ) DECLSPEC_HIDDEN;
extern void (*p_vkCmdWaitEvents)( VkCommandBuffer, uint32_t, const VkEvent *, VkPipelineStageFlags,
VkPipelineStageFlags, uint32_t, const VkMemoryBarrier *, uint32_t,
const VkBufferMemoryBarrier *, uint32_t,
@@ -2335,6 +2357,10 @@ extern VkResult (*p_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)( VkPhysicalDev
VkDisplayPlanePropertiesKHR_host * ) DECLSPEC_HIDDEN;
extern VkResult (*p_vkGetPhysicalDeviceDisplayPropertiesKHR)( VkPhysicalDevice, uint32_t *,
VkDisplayPropertiesKHR * ) DECLSPEC_HIDDEN;
+extern VkResult (*p_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)( VkPhysicalDevice,
+ VkFormat, VkImageType, VkImageTiling, VkImageUsageFlags, VkImageCreateFlags,
+ VkExternalMemoryHandleTypeFlagsNV,
+ VkExternalImageFormatPropertiesNV_host * ) DECLSPEC_HIDDEN;
extern void (*p_vkGetPhysicalDeviceFeatures)( VkPhysicalDevice,
VkPhysicalDeviceFeatures * ) DECLSPEC_HIDDEN;
extern void (*p_vkGetPhysicalDeviceFormatProperties)( VkPhysicalDevice, VkFormat,
@@ -2877,6 +2903,69 @@ static inline void release_VkDisplayPlanePropertiesKHR_array( VkDisplayPlaneProp
#endif /* defined(USE_STRUCT_CONVERSION) */
#if defined(USE_STRUCT_CONVERSION)
+extern VkImageFormatProperties_host *convert_VkImageFormatProperties(
+ VkImageFormatProperties_host *out, const VkImageFormatProperties *in ) DECLSPEC_HIDDEN;
+extern void release_VkImageFormatProperties( VkImageFormatProperties *out,
+ VkImageFormatProperties_host *in ) DECLSPEC_HIDDEN;
+extern VkImageFormatProperties_host *convert_VkImageFormatProperties_array(
+ const VkImageFormatProperties *in, int count ) DECLSPEC_HIDDEN;
+extern void release_VkImageFormatProperties_array( VkImageFormatProperties *out,
+ VkImageFormatProperties_host *in, int count ) DECLSPEC_HIDDEN;
+#else /* defined(USE_STRUCT_CONVERSION) */
+static inline VkImageFormatProperties_host *convert_VkImageFormatProperties(
+ VkImageFormatProperties_host *out, const VkImageFormatProperties *in )
+{
+ return (VkImageFormatProperties_host *)in;
+}
+static inline void release_VkImageFormatProperties( VkImageFormatProperties *out,
+ VkImageFormatProperties_host *in )
+{
+}
+static inline VkImageFormatProperties_host *convert_VkImageFormatProperties_array(
+ const VkImageFormatProperties *in, int count )
+{
+ return (VkImageFormatProperties_host *)in;
+}
+static inline void release_VkImageFormatProperties_array( VkImageFormatProperties *out,
+ VkImageFormatProperties_host *in, int count )
+{
+}
+#endif /* defined(USE_STRUCT_CONVERSION) */
+
+#if defined(USE_STRUCT_CONVERSION)
+extern VkExternalImageFormatPropertiesNV_host *convert_VkExternalImageFormatPropertiesNV(
+ VkExternalImageFormatPropertiesNV_host *out,
+ const VkExternalImageFormatPropertiesNV *in ) DECLSPEC_HIDDEN;
+extern void release_VkExternalImageFormatPropertiesNV( VkExternalImageFormatPropertiesNV *out,
+ VkExternalImageFormatPropertiesNV_host *in ) DECLSPEC_HIDDEN;
+extern VkExternalImageFormatPropertiesNV_host *convert_VkExternalImageFormatPropertiesNV_array(
+ const VkExternalImageFormatPropertiesNV *in, int count ) DECLSPEC_HIDDEN;
+extern void release_VkExternalImageFormatPropertiesNV_array(
+ VkExternalImageFormatPropertiesNV *out, VkExternalImageFormatPropertiesNV_host *in,
+ int count ) DECLSPEC_HIDDEN;
+#else /* defined(USE_STRUCT_CONVERSION) */
+static inline VkExternalImageFormatPropertiesNV_host *convert_VkExternalImageFormatPropertiesNV(
+ VkExternalImageFormatPropertiesNV_host *out, const VkExternalImageFormatPropertiesNV *in )
+{
+ return (VkExternalImageFormatPropertiesNV_host *)in;
+}
+static inline void release_VkExternalImageFormatPropertiesNV(
+ VkExternalImageFormatPropertiesNV *out, VkExternalImageFormatPropertiesNV_host *in )
+{
+}
+static inline VkExternalImageFormatPropertiesNV_host *convert_VkExternalImageFormatPropertiesNV_array(
+ const VkExternalImageFormatPropertiesNV *in, int count )
+{
+ return (VkExternalImageFormatPropertiesNV_host *)in;
+}
+static inline void release_VkExternalImageFormatPropertiesNV_array(
+ VkExternalImageFormatPropertiesNV *out, VkExternalImageFormatPropertiesNV_host *in,
+ int count )
+{
+}
+#endif /* defined(USE_STRUCT_CONVERSION) */
+
+#if defined(USE_STRUCT_CONVERSION)
extern VkMemoryHeap_host *convert_VkMemoryHeap( VkMemoryHeap_host *out,
const VkMemoryHeap *in ) DECLSPEC_HIDDEN;
extern void release_VkMemoryHeap( VkMemoryHeap *out, VkMemoryHeap_host *in ) DECLSPEC_HIDDEN;
diff --git a/dlls/vulkan/vulkan_thunks.c b/dlls/vulkan/vulkan_thunks.c
index aea8d64..3e61248 100644
--- a/dlls/vulkan/vulkan_thunks.c
+++ b/dlls/vulkan/vulkan_thunks.c
@@ -1769,12 +1769,8 @@ VkDisplayModePropertiesKHR_host *convert_VkDisplayModePropertiesKHR(
{
TRACE( "(%p, %p)\n", out, in );
- if (!in) return NULL;
-
- out->displayMode = in->displayMode;
- out->parameters = in->parameters;
-
- return out;
+ /* return-only type, skipping conversion */
+ return in ? out : NULL;
}
void release_VkDisplayModePropertiesKHR( VkDisplayModePropertiesKHR *out,
VkDisplayModePropertiesKHR_host *in )
@@ -1825,12 +1821,8 @@ VkDisplayPlanePropertiesKHR_host *convert_VkDisplayPlanePropertiesKHR(
{
TRACE( "(%p, %p)\n", out, in );
- if (!in) return NULL;
-
- out->currentDisplay = in->currentDisplay;
- out->currentStackIndex = in->currentStackIndex;
-
- return out;
+ /* return-only type, skipping conversion */
+ return in ? out : NULL;
}
void release_VkDisplayPlanePropertiesKHR( VkDisplayPlanePropertiesKHR *out,
VkDisplayPlanePropertiesKHR_host *in )
@@ -1876,6 +1868,124 @@ void release_VkDisplayPlanePropertiesKHR_array( VkDisplayPlanePropertiesKHR *out
#endif /* defined(USE_STRUCT_CONVERSION) */
#if defined(USE_STRUCT_CONVERSION)
+VkImageFormatProperties_host *convert_VkImageFormatProperties( VkImageFormatProperties_host *out,
+ const VkImageFormatProperties *in )
+{
+ TRACE( "(%p, %p)\n", out, in );
+
+ /* return-only type, skipping conversion */
+ return in ? out : NULL;
+}
+void release_VkImageFormatProperties( VkImageFormatProperties *out,
+ VkImageFormatProperties_host *in )
+{
+ TRACE( "(%p, %p)\n", out, in );
+
+ if (!in || !out) return;
+
+ out->maxExtent = in->maxExtent;
+ out->maxMipLevels = in->maxMipLevels;
+ out->maxArrayLayers = in->maxArrayLayers;
+ out->sampleCounts = in->sampleCounts;
+ out->maxResourceSize = in->maxResourceSize;
+}
+
+VkImageFormatProperties_host *convert_VkImageFormatProperties_array(
+ const VkImageFormatProperties *in, int count )
+{
+ VkImageFormatProperties_host *out;
+ int i;
+
+ TRACE( "(%p, %d)\n", in, count );
+
+ if (!in) return NULL;
+
+ out = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*out) );
+ for (i = 0; i < count; i++)
+ convert_VkImageFormatProperties( &out[i], &in[i] );
+
+ return out;
+}
+
+void release_VkImageFormatProperties_array( VkImageFormatProperties *out,
+ VkImageFormatProperties_host *in, int count )
+{
+ int i;
+
+ TRACE( "(%p, %p, %d)\n", out, in, count );
+
+ if (!in) return;
+
+ for (i = 0; i < count; i++)
+ release_VkImageFormatProperties( out ? &out[i] : NULL, &in[i] );
+ HeapFree( GetProcessHeap(), 0, in );
+}
+#endif /* defined(USE_STRUCT_CONVERSION) */
+
+#if defined(USE_STRUCT_CONVERSION)
+VkExternalImageFormatPropertiesNV_host *convert_VkExternalImageFormatPropertiesNV(
+ VkExternalImageFormatPropertiesNV_host *out, const VkExternalImageFormatPropertiesNV *in )
+{
+ TRACE( "(%p, %p)\n", out, in );
+
+ if (!in) return NULL;
+
+ convert_VkImageFormatProperties( &out->imageFormatProperties, &in->imageFormatProperties );
+ out->externalMemoryFeatures = in->externalMemoryFeatures;
+ out->exportFromImportedHandleTypes = in->exportFromImportedHandleTypes;
+ out->compatibleHandleTypes = in->compatibleHandleTypes;
+
+ return out;
+}
+void release_VkExternalImageFormatPropertiesNV( VkExternalImageFormatPropertiesNV *out,
+ VkExternalImageFormatPropertiesNV_host *in )
+{
+ TRACE( "(%p, %p)\n", out, in );
+
+ if (!in) return;
+
+ release_VkImageFormatProperties( out ? &out->imageFormatProperties : NULL, &in->imageFormatProperties );
+
+ if (!out) return;
+
+ out->externalMemoryFeatures = in->externalMemoryFeatures;
+ out->exportFromImportedHandleTypes = in->exportFromImportedHandleTypes;
+ out->compatibleHandleTypes = in->compatibleHandleTypes;
+}
+
+VkExternalImageFormatPropertiesNV_host *convert_VkExternalImageFormatPropertiesNV_array(
+ const VkExternalImageFormatPropertiesNV *in, int count )
+{
+ VkExternalImageFormatPropertiesNV_host *out;
+ int i;
+
+ TRACE( "(%p, %d)\n", in, count );
+
+ if (!in) return NULL;
+
+ out = HeapAlloc( GetProcessHeap(), 0, count * sizeof(*out) );
+ for (i = 0; i < count; i++)
+ convert_VkExternalImageFormatPropertiesNV( &out[i], &in[i] );
+
+ return out;
+}
+
+void release_VkExternalImageFormatPropertiesNV_array( VkExternalImageFormatPropertiesNV *out,
+ VkExternalImageFormatPropertiesNV_host *in, int count )
+{
+ int i;
+
+ TRACE( "(%p, %p, %d)\n", out, in, count );
+
+ if (!in) return;
+
+ for (i = 0; i < count; i++)
+ release_VkExternalImageFormatPropertiesNV( out ? &out[i] : NULL, &in[i] );
+ HeapFree( GetProcessHeap(), 0, in );
+}
+#endif /* defined(USE_STRUCT_CONVERSION) */
+
+#if defined(USE_STRUCT_CONVERSION)
VkMemoryHeap_host *convert_VkMemoryHeap( VkMemoryHeap_host *out, const VkMemoryHeap *in )
{
TRACE( "(%p, %p)\n", out, in );
@@ -3046,6 +3156,16 @@ static void null_vkCmdDrawIndexedIndirect( VkCommandBuffer commandBuffer, VkBuff
wine_dbgstr_longlong(offset), drawCount, stride );
}
+static void null_vkCmdDrawIndexedIndirectCountAMD( VkCommandBuffer commandBuffer, VkBuffer buffer,
+ VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset,
+ uint32_t maxDrawCount, uint32_t stride )
+{
+ FIXME( "(%p, %s, %s, %s, %s, %u, %u) not supported\n", commandBuffer,
+ wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset),
+ wine_dbgstr_longlong(countBuffer), wine_dbgstr_longlong(countBufferOffset),
+ maxDrawCount, stride );
+}
+
static void null_vkCmdDrawIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer,
VkDeviceSize offset, uint32_t drawCount, uint32_t stride )
{
@@ -3053,6 +3173,16 @@ static void null_vkCmdDrawIndirect( VkCommandBuffer commandBuffer, VkBuffer buff
wine_dbgstr_longlong(offset), drawCount, stride );
}
+static void null_vkCmdDrawIndirectCountAMD( VkCommandBuffer commandBuffer, VkBuffer buffer,
+ VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset,
+ uint32_t maxDrawCount, uint32_t stride )
+{
+ FIXME( "(%p, %s, %s, %s, %s, %u, %u) not supported\n", commandBuffer,
+ wine_dbgstr_longlong(buffer), wine_dbgstr_longlong(offset),
+ wine_dbgstr_longlong(countBuffer), wine_dbgstr_longlong(countBufferOffset),
+ maxDrawCount, stride );
+}
+
static void null_vkCmdEndQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool,
uint32_t query )
{
@@ -3187,7 +3317,7 @@ static void null_vkCmdSetViewport( VkCommandBuffer commandBuffer, uint32_t first
}
static void null_vkCmdUpdateBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer,
- VkDeviceSize dstOffset, VkDeviceSize dataSize, const uint32_t *pData )
+ VkDeviceSize dstOffset, VkDeviceSize dataSize, const void *pData )
{
FIXME( "(%p, %s, %s, %s, %p) not supported\n", commandBuffer, wine_dbgstr_longlong(dstBuffer),
wine_dbgstr_longlong(dstOffset), wine_dbgstr_longlong(dataSize), pData );
@@ -3764,6 +3894,17 @@ static VkResult null_vkGetPhysicalDeviceDisplayPropertiesKHR( VkPhysicalDevice p
return VK_ERROR_INCOMPATIBLE_DRIVER;
}
+static VkResult null_vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
+ VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling,
+ VkImageUsageFlags usage, VkImageCreateFlags flags,
+ VkExternalMemoryHandleTypeFlagsNV externalHandleType,
+ VkExternalImageFormatPropertiesNV_host *pExternalImageFormatProperties )
+{
+ FIXME( "(%p, %d, %d, %d, %u, %u, %u, %p) not supported\n", physicalDevice, format, type,
+ tiling, usage, flags, externalHandleType, pExternalImageFormatProperties );
+ return VK_ERROR_INCOMPATIBLE_DRIVER;
+}
+
static void null_vkGetPhysicalDeviceFeatures( VkPhysicalDevice physicalDevice,
VkPhysicalDeviceFeatures *pFeatures )
{
@@ -4058,8 +4199,12 @@ void (*p_vkCmdDrawIndexed)( VkCommandBuffer, uint32_t, uint32_t, uint32_t, int32
null_vkCmdDrawIndexed;
void (*p_vkCmdDrawIndexedIndirect)( VkCommandBuffer, VkBuffer, VkDeviceSize, uint32_t, uint32_t ) =
null_vkCmdDrawIndexedIndirect;
+void (*p_vkCmdDrawIndexedIndirectCountAMD)( VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer,
+ VkDeviceSize, uint32_t, uint32_t ) = null_vkCmdDrawIndexedIndirectCountAMD;
void (*p_vkCmdDrawIndirect)( VkCommandBuffer, VkBuffer, VkDeviceSize, uint32_t, uint32_t ) =
null_vkCmdDrawIndirect;
+void (*p_vkCmdDrawIndirectCountAMD)( VkCommandBuffer, VkBuffer, VkDeviceSize, VkBuffer,
+ VkDeviceSize, uint32_t, uint32_t ) = null_vkCmdDrawIndirectCountAMD;
void (*p_vkCmdEndQuery)( VkCommandBuffer, VkQueryPool, uint32_t ) = null_vkCmdEndQuery;
void (*p_vkCmdEndRenderPass)( VkCommandBuffer ) = null_vkCmdEndRenderPass;
void (*p_vkCmdExecuteCommands)( VkCommandBuffer, uint32_t, const VkCommandBuffer * ) =
@@ -4094,7 +4239,7 @@ void (*p_vkCmdSetStencilWriteMask)( VkCommandBuffer, VkStencilFaceFlags, uint32_
void (*p_vkCmdSetViewport)( VkCommandBuffer, uint32_t, uint32_t, const VkViewport * ) =
null_vkCmdSetViewport;
void (*p_vkCmdUpdateBuffer)( VkCommandBuffer, VkBuffer, VkDeviceSize, VkDeviceSize,
- const uint32_t * ) = null_vkCmdUpdateBuffer;
+ const void * ) = null_vkCmdUpdateBuffer;
void (*p_vkCmdWaitEvents)( VkCommandBuffer, uint32_t, const VkEvent *, VkPipelineStageFlags,
VkPipelineStageFlags, uint32_t, const VkMemoryBarrier *, uint32_t,
const VkBufferMemoryBarrier *, uint32_t, const VkImageMemoryBarrier_host * ) =
@@ -4258,6 +4403,10 @@ VkResult (*p_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)( VkPhysicalDevice, ui
VkDisplayPlanePropertiesKHR_host * ) = null_vkGetPhysicalDeviceDisplayPlanePropertiesKHR;
VkResult (*p_vkGetPhysicalDeviceDisplayPropertiesKHR)( VkPhysicalDevice, uint32_t *,
VkDisplayPropertiesKHR * ) = null_vkGetPhysicalDeviceDisplayPropertiesKHR;
+VkResult (*p_vkGetPhysicalDeviceExternalImageFormatPropertiesNV)( VkPhysicalDevice, VkFormat,
+ VkImageType, VkImageTiling, VkImageUsageFlags, VkImageCreateFlags,
+ VkExternalMemoryHandleTypeFlagsNV, VkExternalImageFormatPropertiesNV_host * ) =
+ null_vkGetPhysicalDeviceExternalImageFormatPropertiesNV;
void (*p_vkGetPhysicalDeviceFeatures)( VkPhysicalDevice, VkPhysicalDeviceFeatures * ) =
null_vkGetPhysicalDeviceFeatures;
void (*p_vkGetPhysicalDeviceFormatProperties)( VkPhysicalDevice, VkFormat, VkFormatProperties * ) =
@@ -4648,6 +4797,20 @@ void WINAPI vkCmdDrawIndexedIndirect( VkCommandBuffer commandBuffer, VkBuffer bu
}
/***********************************************************************
+ * vkCmdDrawIndexedIndirectCountAMD (VULKAN.@)
+ */
+void WINAPI vkCmdDrawIndexedIndirectCountAMD( VkCommandBuffer commandBuffer, VkBuffer buffer,
+ VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset,
+ uint32_t maxDrawCount, uint32_t stride )
+{
+ TRACE( "(%p, %s, %s, %s, %s, %u, %u)\n", commandBuffer, wine_dbgstr_longlong(buffer),
+ wine_dbgstr_longlong(offset), wine_dbgstr_longlong(countBuffer),
+ wine_dbgstr_longlong(countBufferOffset), maxDrawCount, stride );
+ p_vkCmdDrawIndexedIndirectCountAMD( commandBuffer, buffer, offset, countBuffer,
+ countBufferOffset, maxDrawCount, stride );
+}
+
+/***********************************************************************
* vkCmdDrawIndirect (VULKAN.@)
*/
void WINAPI vkCmdDrawIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
@@ -4659,6 +4822,20 @@ void WINAPI vkCmdDrawIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, V
}
/***********************************************************************
+ * vkCmdDrawIndirectCountAMD (VULKAN.@)
+ */
+void WINAPI vkCmdDrawIndirectCountAMD( VkCommandBuffer commandBuffer, VkBuffer buffer,
+ VkDeviceSize offset, VkBuffer countBuffer, VkDeviceSize countBufferOffset,
+ uint32_t maxDrawCount, uint32_t stride )
+{
+ TRACE( "(%p, %s, %s, %s, %s, %u, %u)\n", commandBuffer, wine_dbgstr_longlong(buffer),
+ wine_dbgstr_longlong(offset), wine_dbgstr_longlong(countBuffer),
+ wine_dbgstr_longlong(countBufferOffset), maxDrawCount, stride );
+ p_vkCmdDrawIndirectCountAMD( commandBuffer, buffer, offset, countBuffer, countBufferOffset,
+ maxDrawCount, stride );
+}
+
+/***********************************************************************
* vkCmdEndQuery (VULKAN.@)
*/
void WINAPI vkCmdEndQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query )
@@ -4878,7 +5055,7 @@ void WINAPI vkCmdSetViewport( VkCommandBuffer commandBuffer, uint32_t firstViewp
* vkCmdUpdateBuffer (VULKAN.@)
*/
void WINAPI vkCmdUpdateBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer,
- VkDeviceSize dstOffset, VkDeviceSize dataSize, const uint32_t *pData )
+ VkDeviceSize dstOffset, VkDeviceSize dataSize, const void *pData )
{
TRACE( "(%p, %s, %s, %s, %p)\n", commandBuffer, wine_dbgstr_longlong(dstBuffer),
wine_dbgstr_longlong(dstOffset), wine_dbgstr_longlong(dataSize), pData );
@@ -6036,6 +6213,31 @@ VkResult WINAPI vkGetPhysicalDeviceDisplayPropertiesKHR( VkPhysicalDevice physic
}
/***********************************************************************
+ * vkGetPhysicalDeviceExternalImageFormatPropertiesNV (VULKAN.@)
+ */
+VkResult WINAPI vkGetPhysicalDeviceExternalImageFormatPropertiesNV(
+ VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling,
+ VkImageUsageFlags usage, VkImageCreateFlags flags,
+ VkExternalMemoryHandleTypeFlagsNV externalHandleType,
+ VkExternalImageFormatPropertiesNV *pExternalImageFormatProperties )
+{
+ VkExternalImageFormatPropertiesNV_host tmp_pExternalImageFormatProperties, *ptr_pExternalImageFormatProperties;
+ VkResult res;
+
+ TRACE( "(%p, %d, %d, %d, %u, %u, %u, %p)\n", physicalDevice, format, type, tiling, usage,
+ flags, externalHandleType, pExternalImageFormatProperties );
+
+ ptr_pExternalImageFormatProperties = convert_VkExternalImageFormatPropertiesNV(
+ &tmp_pExternalImageFormatProperties, pExternalImageFormatProperties );
+ res = p_vkGetPhysicalDeviceExternalImageFormatPropertiesNV( physicalDevice, format, type,
+ tiling, usage, flags, externalHandleType, ptr_pExternalImageFormatProperties );
+ release_VkExternalImageFormatPropertiesNV( pExternalImageFormatProperties,
+ ptr_pExternalImageFormatProperties );
+
+ return res;
+}
+
+/***********************************************************************
* vkGetPhysicalDeviceFeatures (VULKAN.@)
*/
void WINAPI vkGetPhysicalDeviceFeatures( VkPhysicalDevice physicalDevice,
@@ -6430,7 +6632,9 @@ static const struct function_entry function_table[] =
DEFINE_FUNCTION( vkCmdDraw )
DEFINE_FUNCTION( vkCmdDrawIndexed )
DEFINE_FUNCTION( vkCmdDrawIndexedIndirect )
+ DEFINE_FUNCTION( vkCmdDrawIndexedIndirectCountAMD )
DEFINE_FUNCTION( vkCmdDrawIndirect )
+ DEFINE_FUNCTION( vkCmdDrawIndirectCountAMD )
DEFINE_FUNCTION( vkCmdEndQuery )
DEFINE_FUNCTION( vkCmdEndRenderPass )
DEFINE_FUNCTION( vkCmdExecuteCommands )
@@ -6532,6 +6736,7 @@ static const struct function_entry function_table[] =
DEFINE_FUNCTION( vkGetInstanceProcAddr )
DEFINE_FUNCTION( vkGetPhysicalDeviceDisplayPlanePropertiesKHR )
DEFINE_FUNCTION( vkGetPhysicalDeviceDisplayPropertiesKHR )
+ DEFINE_FUNCTION( vkGetPhysicalDeviceExternalImageFormatPropertiesNV )
DEFINE_FUNCTION( vkGetPhysicalDeviceFeatures )
DEFINE_FUNCTION( vkGetPhysicalDeviceFormatProperties )
DEFINE_FUNCTION( vkGetPhysicalDeviceImageFormatProperties )
--
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.