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
334a100a
Commit
334a100a
authored
Apr 24, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 25, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Rename vulkan surface creation/destroy driver callbacks.
parent
50584bcc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
56 deletions
+30
-56
vulkan.c
dlls/win32u/vulkan.c
+6
-7
vulkan.c
dlls/winemac.drv/vulkan.c
+7
-15
vulkan.c
dlls/winewayland.drv/vulkan.c
+8
-16
vulkan.c
dlls/winex11.drv/vulkan.c
+6
-15
vulkan_driver.h
include/wine/vulkan_driver.h
+3
-3
No files found.
dlls/win32u/vulkan.c
View file @
334a100a
...
...
@@ -75,7 +75,7 @@ static VkResult win32u_vkCreateWin32SurfaceKHR( VkInstance instance, const VkWin
if
(
allocator
)
FIXME
(
"Support for allocation callbacks not implemented yet
\n
"
);
if
(
!
(
surface
=
calloc
(
1
,
sizeof
(
*
surface
)
)))
return
VK_ERROR_OUT_OF_HOST_MEMORY
;
if
((
res
=
driver_funcs
->
p_v
kCreateWin32SurfaceKHR
(
instance
,
info
,
NULL
/* allocator */
,
&
surface
->
driver_surface
)))
if
((
res
=
driver_funcs
->
p_v
ulkan_surface_create
(
instance
,
info
,
&
surface
->
driver_surface
)))
{
free
(
surface
);
return
res
;
...
...
@@ -94,7 +94,7 @@ static void win32u_vkDestroySurfaceKHR( VkInstance instance, VkSurfaceKHR handle
TRACE
(
"instance %p, handle 0x%s, allocator %p
\n
"
,
instance
,
wine_dbgstr_longlong
(
handle
),
allocator
);
if
(
allocator
)
FIXME
(
"Support for allocation callbacks not implemented yet
\n
"
);
driver_funcs
->
p_v
kDestroySurfaceKHR
(
instance
,
surface
->
driver_surface
,
NULL
/* allocator */
);
driver_funcs
->
p_v
ulkan_surface_destroy
(
instance
,
surface
->
driver_surface
);
free
(
surface
);
}
...
...
@@ -162,14 +162,13 @@ static struct vulkan_funcs vulkan_funcs =
.
p_wine_get_host_surface
=
win32u_wine_get_host_surface
,
};
static
VkResult
nulldrv_vkCreateWin32SurfaceKHR
(
VkInstance
instance
,
const
VkWin32SurfaceCreateInfoKHR
*
info
,
const
VkAllocationCallbacks
*
allocator
,
VkSurfaceKHR
*
surface
)
static
VkResult
nulldrv_vulkan_surface_create
(
VkInstance
instance
,
const
VkWin32SurfaceCreateInfoKHR
*
info
,
VkSurfaceKHR
*
surface
)
{
FIXME
(
"stub!
\n
"
);
return
VK_ERROR_INCOMPATIBLE_DRIVER
;
}
static
void
nulldrv_v
kDestroySurfaceKHR
(
VkInstance
instance
,
VkSurfaceKHR
surface
,
const
VkAllocationCallbacks
*
allocator
)
static
void
nulldrv_v
ulkan_surface_destroy
(
VkInstance
instance
,
VkSurfaceKHR
surface
)
{
}
...
...
@@ -194,8 +193,8 @@ static VkSurfaceKHR nulldrv_wine_get_host_surface( VkSurfaceKHR surface )
static
const
struct
vulkan_driver_funcs
nulldrv_funcs
=
{
.
p_v
kCreateWin32SurfaceKHR
=
nulldrv_vkCreateWin32SurfaceKHR
,
.
p_v
kDestroySurfaceKHR
=
nulldrv_vkDestroySurfaceKHR
,
.
p_v
ulkan_surface_create
=
nulldrv_vulkan_surface_create
,
.
p_v
ulkan_surface_destroy
=
nulldrv_vulkan_surface_destroy
,
.
p_vulkan_surface_presented
=
nulldrv_vulkan_surface_presented
,
.
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
=
nulldrv_vkGetPhysicalDeviceWin32PresentationSupportKHR
,
.
p_get_host_surface_extension
=
nulldrv_get_host_surface_extension
,
...
...
dlls/winemac.drv/vulkan.c
View file @
334a100a
...
...
@@ -100,18 +100,14 @@ static void wine_vk_surface_destroy(VkInstance instance, struct wine_vk_surface
free
(
surface
);
}
static
VkResult
macdrv_vkCreateWin32SurfaceKHR
(
VkInstance
instance
,
const
VkWin32SurfaceCreateInfoKHR
*
create_info
,
const
VkAllocationCallbacks
*
allocator
,
VkSurfaceKHR
*
surface
)
static
VkResult
macdrv_vulkan_surface_create
(
VkInstance
instance
,
const
VkWin32SurfaceCreateInfoKHR
*
create_info
,
VkSurfaceKHR
*
surface
)
{
VkResult
res
;
struct
wine_vk_surface
*
mac_surface
;
struct
macdrv_win_data
*
data
;
TRACE
(
"%p %p %p %p
\n
"
,
instance
,
create_info
,
allocator
,
surface
);
if
(
allocator
)
FIXME
(
"Support for allocation callbacks not implemented yet
\n
"
);
TRACE
(
"%p %p %p
\n
"
,
instance
,
create_info
,
surface
);
if
(
!
(
data
=
get_win_data
(
create_info
->
hwnd
)))
{
...
...
@@ -183,15 +179,11 @@ err:
return
res
;
}
static
void
macdrv_vkDestroySurfaceKHR
(
VkInstance
instance
,
VkSurfaceKHR
surface
,
const
VkAllocationCallbacks
*
allocator
)
static
void
macdrv_vulkan_surface_destroy
(
VkInstance
instance
,
VkSurfaceKHR
surface
)
{
struct
wine_vk_surface
*
mac_surface
=
surface_from_handle
(
surface
);
TRACE
(
"%p 0x%s %p
\n
"
,
instance
,
wine_dbgstr_longlong
(
surface
),
allocator
);
if
(
allocator
)
FIXME
(
"Support for allocation callbacks not implemented yet
\n
"
);
TRACE
(
"%p 0x%s
\n
"
,
instance
,
wine_dbgstr_longlong
(
surface
));
wine_vk_surface_destroy
(
instance
,
mac_surface
);
}
...
...
@@ -224,8 +216,8 @@ static VkSurfaceKHR macdrv_wine_get_host_surface(VkSurfaceKHR surface)
static
const
struct
vulkan_driver_funcs
macdrv_vulkan_driver_funcs
=
{
.
p_v
kCreateWin32SurfaceKHR
=
macdrv_vkCreateWin32SurfaceKHR
,
.
p_v
kDestroySurfaceKHR
=
macdrv_vkDestroySurfaceKHR
,
.
p_v
ulkan_surface_create
=
macdrv_vulkan_surface_create
,
.
p_v
ulkan_surface_destroy
=
macdrv_vulkan_surface_destroy
,
.
p_vulkan_surface_presented
=
macdrv_vulkan_surface_presented
,
.
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
=
macdrv_vkGetPhysicalDeviceWin32PresentationSupportKHR
,
...
...
dlls/winewayland.drv/vulkan.c
View file @
334a100a
...
...
@@ -94,20 +94,16 @@ static void wine_vk_surface_destroy(struct wine_vk_surface *wine_vk_surface)
free
(
wine_vk_surface
);
}
static
VkResult
wayland_vkCreateWin32SurfaceKHR
(
VkInstance
instance
,
const
VkWin32SurfaceCreateInfoKHR
*
create_info
,
const
VkAllocationCallbacks
*
allocator
,
VkSurfaceKHR
*
vk_surface
)
static
VkResult
wayland_vulkan_surface_create
(
VkInstance
instance
,
const
VkWin32SurfaceCreateInfoKHR
*
create_info
,
VkSurfaceKHR
*
vk_surface
)
{
VkResult
res
;
VkWaylandSurfaceCreateInfoKHR
create_info_host
;
struct
wine_vk_surface
*
wine_vk_surface
;
struct
wayland_surface
*
wayland_surface
;
TRACE
(
"%p %p %p %p
\n
"
,
instance
,
create_info
,
allocator
,
vk_surface
);
if
(
allocator
)
FIXME
(
"Support for allocation callbacks not implemented yet
\n
"
);
TRACE
(
"%p %p %p
\n
"
,
instance
,
create_info
,
vk_surface
);
wine_vk_surface
=
calloc
(
1
,
sizeof
(
*
wine_vk_surface
));
if
(
!
wine_vk_surface
)
...
...
@@ -162,15 +158,11 @@ err:
return
res
;
}
static
void
wayland_vkDestroySurfaceKHR
(
VkInstance
instance
,
VkSurfaceKHR
surface
,
const
VkAllocationCallbacks
*
allocator
)
static
void
wayland_vulkan_surface_destroy
(
VkInstance
instance
,
VkSurfaceKHR
surface
)
{
struct
wine_vk_surface
*
wine_vk_surface
=
wine_vk_surface_from_handle
(
surface
);
TRACE
(
"%p 0x%s %p
\n
"
,
instance
,
wine_dbgstr_longlong
(
surface
),
allocator
);
if
(
allocator
)
FIXME
(
"Support for allocation callbacks not implemented yet
\n
"
);
TRACE
(
"%p 0x%s
\n
"
,
instance
,
wine_dbgstr_longlong
(
surface
));
pvkDestroySurfaceKHR
(
instance
,
wine_vk_surface
->
host_surface
,
NULL
/* allocator */
);
wine_vk_surface_destroy
(
wine_vk_surface
);
...
...
@@ -218,8 +210,8 @@ static VkSurfaceKHR wayland_wine_get_host_surface(VkSurfaceKHR surface)
static
const
struct
vulkan_driver_funcs
wayland_vulkan_driver_funcs
=
{
.
p_v
kCreateWin32SurfaceKHR
=
wayland_vkCreateWin32SurfaceKHR
,
.
p_v
kDestroySurfaceKHR
=
wayland_vkDestroySurfaceKHR
,
.
p_v
ulkan_surface_create
=
wayland_vulkan_surface_create
,
.
p_v
ulkan_surface_destroy
=
wayland_vulkan_surface_destroy
,
.
p_vulkan_surface_presented
=
wayland_vulkan_surface_presented
,
.
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
=
wayland_vkGetPhysicalDeviceWin32PresentationSupportKHR
,
...
...
dlls/winex11.drv/vulkan.c
View file @
334a100a
...
...
@@ -132,18 +132,13 @@ void vulkan_thread_detach(void)
pthread_mutex_unlock
(
&
vulkan_mutex
);
}
static
VkResult
X11DRV_vkCreateWin32SurfaceKHR
(
VkInstance
instance
,
const
VkWin32SurfaceCreateInfoKHR
*
create_info
,
const
VkAllocationCallbacks
*
allocator
,
VkSurfaceKHR
*
surface
)
static
VkResult
X11DRV_vulkan_surface_create
(
VkInstance
instance
,
const
VkWin32SurfaceCreateInfoKHR
*
create_info
,
VkSurfaceKHR
*
surface
)
{
VkResult
res
;
VkXlibSurfaceCreateInfoKHR
create_info_host
;
struct
wine_vk_surface
*
x11_surface
;
TRACE
(
"%p %p %p %p
\n
"
,
instance
,
create_info
,
allocator
,
surface
);
if
(
allocator
)
FIXME
(
"Support for allocation callbacks not implemented yet
\n
"
);
TRACE
(
"%p %p %p
\n
"
,
instance
,
create_info
,
surface
);
/* TODO: support child window rendering. */
if
(
NtUserGetAncestor
(
create_info
->
hwnd
,
GA_PARENT
)
!=
NtUserGetDesktopWindow
())
...
...
@@ -195,15 +190,11 @@ static VkResult X11DRV_vkCreateWin32SurfaceKHR(VkInstance instance,
return
VK_SUCCESS
;
}
static
void
X11DRV_vkDestroySurfaceKHR
(
VkInstance
instance
,
VkSurfaceKHR
surface
,
const
VkAllocationCallbacks
*
allocator
)
static
void
X11DRV_vulkan_surface_destroy
(
VkInstance
instance
,
VkSurfaceKHR
surface
)
{
struct
wine_vk_surface
*
x11_surface
=
surface_from_handle
(
surface
);
TRACE
(
"%p 0x%s %p
\n
"
,
instance
,
wine_dbgstr_longlong
(
surface
),
allocator
);
if
(
allocator
)
FIXME
(
"Support for allocation callbacks not implemented yet
\n
"
);
TRACE
(
"%p 0x%s
\n
"
,
instance
,
wine_dbgstr_longlong
(
surface
)
);
pvkDestroySurfaceKHR
(
instance
,
x11_surface
->
host_surface
,
NULL
/* allocator */
);
wine_vk_surface_release
(
x11_surface
);
...
...
@@ -238,8 +229,8 @@ static VkSurfaceKHR X11DRV_wine_get_host_surface( VkSurfaceKHR surface )
static
const
struct
vulkan_driver_funcs
x11drv_vulkan_driver_funcs
=
{
.
p_v
kCreateWin32SurfaceKHR
=
X11DRV_vkCreateWin32SurfaceKHR
,
.
p_v
kDestroySurfaceKHR
=
X11DRV_vkDestroySurfaceKHR
,
.
p_v
ulkan_surface_create
=
X11DRV_vulkan_surface_create
,
.
p_v
ulkan_surface_destroy
=
X11DRV_vulkan_surface_destroy
,
.
p_vulkan_surface_presented
=
X11DRV_vulkan_surface_presented
,
.
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
=
X11DRV_vkGetPhysicalDeviceWin32PresentationSupportKHR
,
...
...
include/wine/vulkan_driver.h
View file @
334a100a
...
...
@@ -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
29
#define WINE_VULKAN_DRIVER_VERSION
30
struct
vulkan_funcs
{
...
...
@@ -44,8 +44,8 @@ struct vulkan_funcs
/* interface between win32u and the user drivers */
struct
vulkan_driver_funcs
{
VkResult
(
*
p_v
kCreateWin32SurfaceKHR
)(
VkInstance
,
const
VkWin32SurfaceCreateInfoKHR
*
,
const
VkAllocationCallbacks
*
,
VkSurfaceKHR
*
);
void
(
*
p_v
kDestroySurfaceKHR
)(
VkInstance
,
VkSurfaceKHR
,
const
VkAllocationCallbacks
*
);
VkResult
(
*
p_v
ulkan_surface_create
)(
VkInstance
,
const
VkWin32SurfaceCreateInfoKHR
*
,
VkSurfaceKHR
*
);
void
(
*
p_v
ulkan_surface_destroy
)(
VkInstance
,
VkSurfaceKHR
);
void
(
*
p_vulkan_surface_presented
)(
HWND
,
VkResult
);
VkBool32
(
*
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
)(
VkPhysicalDevice
,
uint32_t
);
...
...
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