Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
69b049d1
Commit
69b049d1
authored
Feb 24, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 28, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Remove now unnecessary vkDestroyInstance driver entry.
parent
a875c185
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
13 additions
and
49 deletions
+13
-49
d3dkmt.c
dlls/win32u/d3dkmt.c
+3
-1
vulkan.c
dlls/win32u/vulkan.c
+0
-1
vulkan.c
dlls/winemac.drv/vulkan.c
+0
-13
make_vulkan
dlls/winevulkan/make_vulkan
+0
-2
vulkan.c
dlls/winevulkan/vulkan.c
+2
-2
vulkan_thunks.h
dlls/winevulkan/vulkan_thunks.h
+2
-0
vulkan.c
dlls/winewayland.drv/vulkan.c
+0
-14
vulkan.c
dlls/winex11.drv/vulkan.c
+0
-13
xrandr.c
dlls/winex11.drv/xrandr.c
+5
-1
vulkan_driver.h
include/wine/vulkan_driver.h
+1
-2
No files found.
dlls/win32u/d3dkmt.c
View file @
69b049d1
...
...
@@ -78,6 +78,7 @@ static void d3dkmt_init_vulkan(void)
.
enabledExtensionCount
=
ARRAY_SIZE
(
extensions
),
.
ppEnabledExtensionNames
=
extensions
,
};
PFN_vkDestroyInstance
p_vkDestroyInstance
;
PFN_vkCreateInstance
p_vkCreateInstance
;
VkResult
vr
;
...
...
@@ -95,11 +96,12 @@ static void d3dkmt_init_vulkan(void)
return
;
}
p_vkDestroyInstance
=
vulkan_funcs
->
p_vkGetInstanceProcAddr
(
d3dkmt_vk_instance
,
"vkDestroyInstance"
);
#define LOAD_VK_FUNC( f ) \
if (!(p##f = (void *)vulkan_funcs->p_vkGetInstanceProcAddr( d3dkmt_vk_instance, #f ))) \
{ \
WARN( "Failed to load " #f ".\n" ); \
vulkan_funcs->p_vkDestroyInstance( d3dkmt_vk_instance, NULL );
\
p_vkDestroyInstance( d3dkmt_vk_instance, NULL );
\
vulkan_funcs = NULL; \
return; \
}
...
...
dlls/win32u/vulkan.c
View file @
69b049d1
...
...
@@ -66,7 +66,6 @@ static void *win32u_vkGetInstanceProcAddr( VkInstance instance, const char *name
if
(
!
instance
)
return
p_vkGetInstanceProcAddr
(
instance
,
name
);
if
(
!
strcmp
(
name
,
"vkCreateWin32SurfaceKHR"
))
return
vulkan_funcs
.
p_vkCreateWin32SurfaceKHR
;
if
(
!
strcmp
(
name
,
"vkDestroyInstance"
))
return
vulkan_funcs
.
p_vkDestroyInstance
;
if
(
!
strcmp
(
name
,
"vkDestroySurfaceKHR"
))
return
vulkan_funcs
.
p_vkDestroySurfaceKHR
;
if
(
!
strcmp
(
name
,
"vkGetInstanceProcAddr"
))
return
win32u_vkGetInstanceProcAddr
;
if
(
!
strcmp
(
name
,
"vkGetPhysicalDeviceWin32PresentationSupportKHR"
))
return
vulkan_funcs
.
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
;
...
...
dlls/winemac.drv/vulkan.c
View file @
69b049d1
...
...
@@ -80,7 +80,6 @@ typedef struct VkMetalSurfaceCreateInfoEXT
static
VkResult
(
*
pvkCreateSwapchainKHR
)(
VkDevice
,
const
VkSwapchainCreateInfoKHR
*
,
const
VkAllocationCallbacks
*
,
VkSwapchainKHR
*
);
static
VkResult
(
*
pvkCreateMacOSSurfaceMVK
)(
VkInstance
,
const
VkMacOSSurfaceCreateInfoMVK
*
,
const
VkAllocationCallbacks
*
,
VkSurfaceKHR
*
);
static
VkResult
(
*
pvkCreateMetalSurfaceEXT
)(
VkInstance
,
const
VkMetalSurfaceCreateInfoEXT
*
,
const
VkAllocationCallbacks
*
,
VkSurfaceKHR
*
);
static
void
(
*
pvkDestroyInstance
)(
VkInstance
,
const
VkAllocationCallbacks
*
);
static
void
(
*
pvkDestroySurfaceKHR
)(
VkInstance
,
VkSurfaceKHR
,
const
VkAllocationCallbacks
*
);
static
void
(
*
pvkDestroySwapchainKHR
)(
VkDevice
,
VkSwapchainKHR
,
const
VkAllocationCallbacks
*
);
static
VkResult
(
*
pvkGetPhysicalDeviceSurfaceCapabilities2KHR
)(
VkPhysicalDevice
,
const
VkPhysicalDeviceSurfaceInfo2KHR
*
,
VkSurfaceCapabilities2KHR
*
);
...
...
@@ -207,16 +206,6 @@ err:
return
res
;
}
static
void
macdrv_vkDestroyInstance
(
VkInstance
instance
,
const
VkAllocationCallbacks
*
allocator
)
{
TRACE
(
"%p %p
\n
"
,
instance
,
allocator
);
if
(
allocator
)
FIXME
(
"Support for allocation callbacks not implemented yet
\n
"
);
pvkDestroyInstance
(
instance
,
NULL
/* allocator */
);
}
static
void
macdrv_vkDestroySurfaceKHR
(
VkInstance
instance
,
VkSurfaceKHR
surface
,
const
VkAllocationCallbacks
*
allocator
)
{
...
...
@@ -303,7 +292,6 @@ static const struct vulkan_funcs vulkan_funcs =
{
macdrv_vkCreateSwapchainKHR
,
macdrv_vkCreateWin32SurfaceKHR
,
macdrv_vkDestroyInstance
,
macdrv_vkDestroySurfaceKHR
,
macdrv_vkDestroySwapchainKHR
,
NULL
,
...
...
@@ -328,7 +316,6 @@ UINT macdrv_VulkanInit(UINT version, void *vulkan_handle, struct vulkan_funcs *d
LOAD_FUNCPTR
(
vkCreateSwapchainKHR
)
LOAD_FUNCPTR
(
vkCreateMacOSSurfaceMVK
)
LOAD_FUNCPTR
(
vkCreateMetalSurfaceEXT
)
LOAD_FUNCPTR
(
vkDestroyInstance
)
LOAD_FUNCPTR
(
vkDestroySurfaceKHR
)
LOAD_FUNCPTR
(
vkDestroySwapchainKHR
)
LOAD_FUNCPTR
(
vkGetSwapchainImagesKHR
)
...
...
dlls/winevulkan/make_vulkan
View file @
69b049d1
...
...
@@ -175,7 +175,6 @@ FUNCTION_OVERRIDES = {
# Instance functions
"vkCreateDevice"
:
{
"extra_param"
:
"client_ptr"
},
"vkDestroyInstance"
:
{
"dispatch"
:
False
},
"vkGetPhysicalDeviceExternalBufferProperties"
:
{
"dispatch"
:
False
},
"vkGetPhysicalDeviceExternalFenceProperties"
:
{
"dispatch"
:
False
},
"vkGetPhysicalDeviceExternalSemaphoreProperties"
:
{
"dispatch"
:
False
},
...
...
@@ -198,7 +197,6 @@ FUNCTION_OVERRIDES = {
USER_DRIVER_FUNCS
=
{
"vkCreateSwapchainKHR"
,
"vkCreateWin32SurfaceKHR"
,
"vkDestroyInstance"
,
"vkDestroySurfaceKHR"
,
"vkDestroySwapchainKHR"
,
"vkGetDeviceProcAddr"
,
...
...
dlls/winevulkan/vulkan.c
View file @
69b049d1
...
...
@@ -912,7 +912,7 @@ VkResult wine_vkCreateInstance(const VkInstanceCreateInfo *create_info,
if
(
res
!=
VK_SUCCESS
)
{
ERR
(
"Failed to load physical devices, res=%d
\n
"
,
res
);
vk_funcs
->
p_vkDestroyInstance
(
object
->
host_instance
,
NULL
/* allocator */
);
object
->
funcs
.
p_vkDestroyInstance
(
object
->
host_instance
,
NULL
/* allocator */
);
free
(
object
->
utils_messengers
);
free
(
object
);
return
res
;
...
...
@@ -976,7 +976,7 @@ void wine_vkDestroyInstance(VkInstance handle, const VkAllocationCallbacks *allo
if
(
!
instance
)
return
;
vk_funcs
->
p_vkDestroyInstance
(
instance
->
host_instance
,
NULL
/* allocator */
);
instance
->
funcs
.
p_vkDestroyInstance
(
instance
->
host_instance
,
NULL
/* allocator */
);
for
(
i
=
0
;
i
<
instance
->
phys_dev_count
;
i
++
)
{
remove_handle_mapping
(
instance
,
&
instance
->
phys_devs
[
i
].
wrapper_entry
);
...
...
dlls/winevulkan/vulkan_thunks.h
View file @
69b049d1
...
...
@@ -591,6 +591,7 @@ struct vulkan_instance_funcs
void
(
*
p_vkDebugReportMessageEXT
)(
VkInstance
,
VkDebugReportFlagsEXT
,
VkDebugReportObjectTypeEXT
,
uint64_t
,
size_t
,
int32_t
,
const
char
*
,
const
char
*
);
void
(
*
p_vkDestroyDebugReportCallbackEXT
)(
VkInstance
,
VkDebugReportCallbackEXT
,
const
VkAllocationCallbacks
*
);
void
(
*
p_vkDestroyDebugUtilsMessengerEXT
)(
VkInstance
,
VkDebugUtilsMessengerEXT
,
const
VkAllocationCallbacks
*
);
void
(
*
p_vkDestroyInstance
)(
VkInstance
,
const
VkAllocationCallbacks
*
);
void
(
*
p_vkDestroySurfaceKHR
)(
VkInstance
,
VkSurfaceKHR
,
const
VkAllocationCallbacks
*
);
VkResult
(
*
p_vkEnumeratePhysicalDeviceGroups
)(
VkInstance
,
uint32_t
*
,
VkPhysicalDeviceGroupProperties
*
);
VkResult
(
*
p_vkEnumeratePhysicalDeviceGroupsKHR
)(
VkInstance
,
uint32_t
*
,
VkPhysicalDeviceGroupProperties
*
);
...
...
@@ -1161,6 +1162,7 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkDebugReportMessageEXT) \
USE_VK_FUNC(vkDestroyDebugReportCallbackEXT) \
USE_VK_FUNC(vkDestroyDebugUtilsMessengerEXT) \
USE_VK_FUNC(vkDestroyInstance) \
USE_VK_FUNC(vkDestroySurfaceKHR) \
USE_VK_FUNC(vkEnumeratePhysicalDeviceGroups) \
USE_VK_FUNC(vkEnumeratePhysicalDeviceGroupsKHR) \
...
...
dlls/winewayland.drv/vulkan.c
View file @
69b049d1
...
...
@@ -55,7 +55,6 @@ typedef struct VkWaylandSurfaceCreateInfoKHR
static
VkResult
(
*
pvkCreateSwapchainKHR
)(
VkDevice
,
const
VkSwapchainCreateInfoKHR
*
,
const
VkAllocationCallbacks
*
,
VkSwapchainKHR
*
);
static
VkResult
(
*
pvkCreateWaylandSurfaceKHR
)(
VkInstance
,
const
VkWaylandSurfaceCreateInfoKHR
*
,
const
VkAllocationCallbacks
*
,
VkSurfaceKHR
*
);
static
void
(
*
pvkDestroyInstance
)(
VkInstance
,
const
VkAllocationCallbacks
*
);
static
void
(
*
pvkDestroySurfaceKHR
)(
VkInstance
,
VkSurfaceKHR
,
const
VkAllocationCallbacks
*
);
static
void
(
*
pvkDestroySwapchainKHR
)(
VkDevice
,
VkSwapchainKHR
,
const
VkAllocationCallbacks
*
);
static
VkBool32
(
*
pvkGetPhysicalDeviceWaylandPresentationSupportKHR
)(
VkPhysicalDevice
,
uint32_t
,
struct
wl_display
*
);
...
...
@@ -322,17 +321,6 @@ err:
return
res
;
}
static
void
wayland_vkDestroyInstance
(
VkInstance
instance
,
const
VkAllocationCallbacks
*
allocator
)
{
TRACE
(
"%p %p
\n
"
,
instance
,
allocator
);
if
(
allocator
)
FIXME
(
"Support for allocation callbacks not implemented yet
\n
"
);
pvkDestroyInstance
(
instance
,
NULL
/* allocator */
);
}
static
void
wayland_vkDestroySurfaceKHR
(
VkInstance
instance
,
VkSurfaceKHR
surface
,
const
VkAllocationCallbacks
*
allocator
)
{
...
...
@@ -411,7 +399,6 @@ static const struct vulkan_funcs vulkan_funcs =
{
.
p_vkCreateSwapchainKHR
=
wayland_vkCreateSwapchainKHR
,
.
p_vkCreateWin32SurfaceKHR
=
wayland_vkCreateWin32SurfaceKHR
,
.
p_vkDestroyInstance
=
wayland_vkDestroyInstance
,
.
p_vkDestroySurfaceKHR
=
wayland_vkDestroySurfaceKHR
,
.
p_vkDestroySwapchainKHR
=
wayland_vkDestroySwapchainKHR
,
.
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
=
wayland_vkGetPhysicalDeviceWin32PresentationSupportKHR
,
...
...
@@ -435,7 +422,6 @@ UINT WAYLAND_VulkanInit(UINT version, void *vulkan_handle, struct vulkan_funcs *
#define LOAD_FUNCPTR(f) if (!(p##f = dlsym(vulkan_handle, #f))) return STATUS_PROCEDURE_NOT_FOUND;
LOAD_FUNCPTR
(
vkCreateSwapchainKHR
);
LOAD_FUNCPTR
(
vkCreateWaylandSurfaceKHR
);
LOAD_FUNCPTR
(
vkDestroyInstance
);
LOAD_FUNCPTR
(
vkDestroySurfaceKHR
);
LOAD_FUNCPTR
(
vkDestroySwapchainKHR
);
LOAD_FUNCPTR
(
vkGetPhysicalDeviceWaylandPresentationSupportKHR
);
...
...
dlls/winex11.drv/vulkan.c
View file @
69b049d1
...
...
@@ -78,7 +78,6 @@ typedef struct VkXlibSurfaceCreateInfoKHR
static
VkResult
(
*
pvkCreateSwapchainKHR
)(
VkDevice
,
const
VkSwapchainCreateInfoKHR
*
,
const
VkAllocationCallbacks
*
,
VkSwapchainKHR
*
);
static
VkResult
(
*
pvkCreateXlibSurfaceKHR
)(
VkInstance
,
const
VkXlibSurfaceCreateInfoKHR
*
,
const
VkAllocationCallbacks
*
,
VkSurfaceKHR
*
);
static
void
(
*
pvkDestroyInstance
)(
VkInstance
,
const
VkAllocationCallbacks
*
);
static
void
(
*
pvkDestroySurfaceKHR
)(
VkInstance
,
VkSurfaceKHR
,
const
VkAllocationCallbacks
*
);
static
void
(
*
pvkDestroySwapchainKHR
)(
VkDevice
,
VkSwapchainKHR
,
const
VkAllocationCallbacks
*
);
static
VkBool32
(
*
pvkGetPhysicalDeviceXlibPresentationSupportKHR
)(
VkPhysicalDevice
,
uint32_t
,
Display
*
,
VisualID
);
...
...
@@ -237,16 +236,6 @@ err:
return
res
;
}
static
void
X11DRV_vkDestroyInstance
(
VkInstance
instance
,
const
VkAllocationCallbacks
*
allocator
)
{
TRACE
(
"%p %p
\n
"
,
instance
,
allocator
);
if
(
allocator
)
FIXME
(
"Support for allocation callbacks not implemented yet
\n
"
);
pvkDestroyInstance
(
instance
,
NULL
/* allocator */
);
}
static
void
X11DRV_vkDestroySurfaceKHR
(
VkInstance
instance
,
VkSurfaceKHR
surface
,
const
VkAllocationCallbacks
*
allocator
)
{
...
...
@@ -338,7 +327,6 @@ static const struct vulkan_funcs vulkan_funcs =
{
X11DRV_vkCreateSwapchainKHR
,
X11DRV_vkCreateWin32SurfaceKHR
,
X11DRV_vkDestroyInstance
,
X11DRV_vkDestroySurfaceKHR
,
X11DRV_vkDestroySwapchainKHR
,
NULL
,
...
...
@@ -364,7 +352,6 @@ UINT X11DRV_VulkanInit( UINT version, void *vulkan_handle, struct vulkan_funcs *
#define LOAD_FUNCPTR( f ) if (!(p##f = dlsym( vulkan_handle, #f ))) return STATUS_PROCEDURE_NOT_FOUND;
LOAD_FUNCPTR
(
vkCreateSwapchainKHR
);
LOAD_FUNCPTR
(
vkCreateXlibSurfaceKHR
);
LOAD_FUNCPTR
(
vkDestroyInstance
);
LOAD_FUNCPTR
(
vkDestroySurfaceKHR
);
LOAD_FUNCPTR
(
vkDestroySwapchainKHR
);
LOAD_FUNCPTR
(
vkGetPhysicalDeviceXlibPresentationSupportKHR
);
...
...
dlls/winex11.drv/xrandr.c
View file @
69b049d1
...
...
@@ -758,7 +758,11 @@ static BOOL get_gpu_properties_from_vulkan( struct gdi_gpu *gpu, const XRRProvid
done
:
free
(
vk_physical_devices
);
if
(
vk_instance
)
vulkan_funcs
->
p_vkDestroyInstance
(
vk_instance
,
NULL
);
{
PFN_vkDestroyInstance
p_vkDestroyInstance
;
p_vkDestroyInstance
=
vulkan_funcs
->
p_vkGetInstanceProcAddr
(
vk_instance
,
"vkDestroyInstance"
);
p_vkDestroyInstance
(
vk_instance
,
NULL
);
}
return
ret
;
}
...
...
include/wine/vulkan_driver.h
View file @
69b049d1
...
...
@@ -21,7 +21,7 @@
#define __WINE_VULKAN_DRIVER_H
/* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */
#define WINE_VULKAN_DRIVER_VERSION 2
1
#define WINE_VULKAN_DRIVER_VERSION 2
2
struct
vulkan_funcs
{
...
...
@@ -31,7 +31,6 @@ struct vulkan_funcs
*/
VkResult
(
*
p_vkCreateSwapchainKHR
)(
VkDevice
,
const
VkSwapchainCreateInfoKHR
*
,
const
VkAllocationCallbacks
*
,
VkSwapchainKHR
*
);
VkResult
(
*
p_vkCreateWin32SurfaceKHR
)(
VkInstance
,
const
VkWin32SurfaceCreateInfoKHR
*
,
const
VkAllocationCallbacks
*
,
VkSurfaceKHR
*
);
void
(
*
p_vkDestroyInstance
)(
VkInstance
,
const
VkAllocationCallbacks
*
);
void
(
*
p_vkDestroySurfaceKHR
)(
VkInstance
,
VkSurfaceKHR
,
const
VkAllocationCallbacks
*
);
void
(
*
p_vkDestroySwapchainKHR
)(
VkDevice
,
VkSwapchainKHR
,
const
VkAllocationCallbacks
*
);
void
*
(
*
p_vkGetDeviceProcAddr
)(
VkDevice
,
const
char
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment