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
d519cf6c
Commit
d519cf6c
authored
Apr 12, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
May 01, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move thread detach from winex11.
parent
dc7dcbee
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
35 additions
and
31 deletions
+35
-31
vulkan.c
dlls/win32u/vulkan.c
+6
-0
vulkan.c
dlls/winemac.drv/vulkan.c
+5
-0
vulkan.c
dlls/winewayland.drv/vulkan.c
+5
-0
vulkan.c
dlls/winex11.drv/vulkan.c
+15
-26
window.c
dlls/winex11.drv/window.c
+1
-2
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-1
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+0
-1
vulkan_driver.h
include/wine/vulkan_driver.h
+2
-1
No files found.
dlls/win32u/vulkan.c
View file @
d519cf6c
...
@@ -185,6 +185,10 @@ static void nulldrv_vulkan_surface_destroy( HWND hwnd, void *private )
...
@@ -185,6 +185,10 @@ static void nulldrv_vulkan_surface_destroy( HWND hwnd, void *private )
{
{
}
}
static
void
nulldrv_vulkan_surface_detach
(
HWND
hwnd
,
void
*
private
)
{
}
static
void
nulldrv_vulkan_surface_presented
(
HWND
hwnd
,
VkResult
result
)
static
void
nulldrv_vulkan_surface_presented
(
HWND
hwnd
,
VkResult
result
)
{
{
}
}
...
@@ -203,6 +207,7 @@ static const struct vulkan_driver_funcs nulldrv_funcs =
...
@@ -203,6 +207,7 @@ static const struct vulkan_driver_funcs nulldrv_funcs =
{
{
.
p_vulkan_surface_create
=
nulldrv_vulkan_surface_create
,
.
p_vulkan_surface_create
=
nulldrv_vulkan_surface_create
,
.
p_vulkan_surface_destroy
=
nulldrv_vulkan_surface_destroy
,
.
p_vulkan_surface_destroy
=
nulldrv_vulkan_surface_destroy
,
.
p_vulkan_surface_detach
=
nulldrv_vulkan_surface_detach
,
.
p_vulkan_surface_presented
=
nulldrv_vulkan_surface_presented
,
.
p_vulkan_surface_presented
=
nulldrv_vulkan_surface_presented
,
.
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
=
nulldrv_vkGetPhysicalDeviceWin32PresentationSupportKHR
,
.
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
=
nulldrv_vkGetPhysicalDeviceWin32PresentationSupportKHR
,
.
p_get_host_surface_extension
=
nulldrv_get_host_surface_extension
,
.
p_get_host_surface_extension
=
nulldrv_get_host_surface_extension
,
...
@@ -257,6 +262,7 @@ void vulkan_detach_surfaces( struct list *surfaces )
...
@@ -257,6 +262,7 @@ void vulkan_detach_surfaces( struct list *surfaces )
LIST_FOR_EACH_ENTRY
(
surface
,
surfaces
,
struct
surface
,
entry
)
LIST_FOR_EACH_ENTRY
(
surface
,
surfaces
,
struct
surface
,
entry
)
{
{
driver_funcs
->
p_vulkan_surface_detach
(
surface
->
hwnd
,
surface
->
driver_private
);
list_remove
(
&
surface
->
entry
);
list_remove
(
&
surface
->
entry
);
list_init
(
&
surface
->
entry
);
list_init
(
&
surface
->
entry
);
}
}
...
...
dlls/winemac.drv/vulkan.c
View file @
d519cf6c
...
@@ -178,6 +178,10 @@ static void macdrv_vulkan_surface_destroy(HWND hwnd, void *private)
...
@@ -178,6 +178,10 @@ static void macdrv_vulkan_surface_destroy(HWND hwnd, void *private)
wine_vk_surface_destroy
(
mac_surface
);
wine_vk_surface_destroy
(
mac_surface
);
}
}
static
void
macdrv_vulkan_surface_detach
(
HWND
hwnd
,
void
*
private
)
{
}
static
void
macdrv_vulkan_surface_presented
(
HWND
hwnd
,
VkResult
result
)
static
void
macdrv_vulkan_surface_presented
(
HWND
hwnd
,
VkResult
result
)
{
{
}
}
...
@@ -199,6 +203,7 @@ static const struct vulkan_driver_funcs macdrv_vulkan_driver_funcs =
...
@@ -199,6 +203,7 @@ static const struct vulkan_driver_funcs macdrv_vulkan_driver_funcs =
{
{
.
p_vulkan_surface_create
=
macdrv_vulkan_surface_create
,
.
p_vulkan_surface_create
=
macdrv_vulkan_surface_create
,
.
p_vulkan_surface_destroy
=
macdrv_vulkan_surface_destroy
,
.
p_vulkan_surface_destroy
=
macdrv_vulkan_surface_destroy
,
.
p_vulkan_surface_detach
=
macdrv_vulkan_surface_detach
,
.
p_vulkan_surface_presented
=
macdrv_vulkan_surface_presented
,
.
p_vulkan_surface_presented
=
macdrv_vulkan_surface_presented
,
.
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
=
macdrv_vkGetPhysicalDeviceWin32PresentationSupportKHR
,
.
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
=
macdrv_vkGetPhysicalDeviceWin32PresentationSupportKHR
,
...
...
dlls/winewayland.drv/vulkan.c
View file @
d519cf6c
...
@@ -132,6 +132,10 @@ static void wayland_vulkan_surface_destroy(HWND hwnd, void *private)
...
@@ -132,6 +132,10 @@ static void wayland_vulkan_surface_destroy(HWND hwnd, void *private)
wine_vk_surface_destroy
(
client
);
wine_vk_surface_destroy
(
client
);
}
}
static
void
wayland_vulkan_surface_detach
(
HWND
hwnd
,
void
*
private
)
{
}
static
void
wayland_vulkan_surface_presented
(
HWND
hwnd
,
VkResult
result
)
static
void
wayland_vulkan_surface_presented
(
HWND
hwnd
,
VkResult
result
)
{
{
struct
wayland_surface
*
wayland_surface
;
struct
wayland_surface
*
wayland_surface
;
...
@@ -171,6 +175,7 @@ static const struct vulkan_driver_funcs wayland_vulkan_driver_funcs =
...
@@ -171,6 +175,7 @@ static const struct vulkan_driver_funcs wayland_vulkan_driver_funcs =
{
{
.
p_vulkan_surface_create
=
wayland_vulkan_surface_create
,
.
p_vulkan_surface_create
=
wayland_vulkan_surface_create
,
.
p_vulkan_surface_destroy
=
wayland_vulkan_surface_destroy
,
.
p_vulkan_surface_destroy
=
wayland_vulkan_surface_destroy
,
.
p_vulkan_surface_detach
=
wayland_vulkan_surface_detach
,
.
p_vulkan_surface_presented
=
wayland_vulkan_surface_presented
,
.
p_vulkan_surface_presented
=
wayland_vulkan_surface_presented
,
.
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
=
wayland_vkGetPhysicalDeviceWin32PresentationSupportKHR
,
.
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
=
wayland_vkGetPhysicalDeviceWin32PresentationSupportKHR
,
...
...
dlls/winex11.drv/vulkan.c
View file @
d519cf6c
...
@@ -107,24 +107,6 @@ void destroy_vk_surface( HWND hwnd )
...
@@ -107,24 +107,6 @@ void destroy_vk_surface( HWND hwnd )
pthread_mutex_unlock
(
&
vulkan_mutex
);
pthread_mutex_unlock
(
&
vulkan_mutex
);
}
}
void
vulkan_thread_detach
(
void
)
{
struct
wine_vk_surface
*
surface
,
*
next
;
DWORD
thread_id
=
GetCurrentThreadId
();
pthread_mutex_lock
(
&
vulkan_mutex
);
LIST_FOR_EACH_ENTRY_SAFE
(
surface
,
next
,
&
surface_list
,
struct
wine_vk_surface
,
entry
)
{
if
(
surface
->
hwnd_thread_id
!=
thread_id
)
continue
;
TRACE
(
"Detaching surface %p, hwnd %p.
\n
"
,
surface
,
surface
->
hwnd
);
XReparentWindow
(
gdi_display
,
surface
->
window
,
get_dummy_parent
(),
0
,
0
);
XSync
(
gdi_display
,
False
);
}
pthread_mutex_unlock
(
&
vulkan_mutex
);
}
static
VkResult
X11DRV_vulkan_surface_create
(
HWND
hwnd
,
VkInstance
instance
,
VkSurfaceKHR
*
surface
,
void
**
private
)
static
VkResult
X11DRV_vulkan_surface_create
(
HWND
hwnd
,
VkInstance
instance
,
VkSurfaceKHR
*
surface
,
void
**
private
)
{
{
VkResult
res
;
VkResult
res
;
...
@@ -192,6 +174,20 @@ static void X11DRV_vulkan_surface_destroy( HWND hwnd, void *private )
...
@@ -192,6 +174,20 @@ static void X11DRV_vulkan_surface_destroy( HWND hwnd, void *private )
wine_vk_surface_release
(
x11_surface
);
wine_vk_surface_release
(
x11_surface
);
}
}
static
void
X11DRV_vulkan_surface_detach
(
HWND
hwnd
,
void
*
private
)
{
struct
wine_vk_surface
*
x11_surface
=
private
;
struct
x11drv_win_data
*
data
;
TRACE
(
"%p %p
\n
"
,
hwnd
,
private
);
if
((
data
=
get_win_data
(
hwnd
)))
{
detach_client_window
(
data
,
x11_surface
->
window
);
release_win_data
(
data
);
}
}
static
void
X11DRV_vulkan_surface_presented
(
HWND
hwnd
,
VkResult
result
)
static
void
X11DRV_vulkan_surface_presented
(
HWND
hwnd
,
VkResult
result
)
{
{
}
}
...
@@ -214,6 +210,7 @@ static const struct vulkan_driver_funcs x11drv_vulkan_driver_funcs =
...
@@ -214,6 +210,7 @@ static const struct vulkan_driver_funcs x11drv_vulkan_driver_funcs =
{
{
.
p_vulkan_surface_create
=
X11DRV_vulkan_surface_create
,
.
p_vulkan_surface_create
=
X11DRV_vulkan_surface_create
,
.
p_vulkan_surface_destroy
=
X11DRV_vulkan_surface_destroy
,
.
p_vulkan_surface_destroy
=
X11DRV_vulkan_surface_destroy
,
.
p_vulkan_surface_detach
=
X11DRV_vulkan_surface_detach
,
.
p_vulkan_surface_presented
=
X11DRV_vulkan_surface_presented
,
.
p_vulkan_surface_presented
=
X11DRV_vulkan_surface_presented
,
.
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
=
X11DRV_vkGetPhysicalDeviceWin32PresentationSupportKHR
,
.
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
=
X11DRV_vkGetPhysicalDeviceWin32PresentationSupportKHR
,
...
@@ -247,12 +244,4 @@ UINT X11DRV_VulkanInit( UINT version, void *vulkan_handle, const struct vulkan_d
...
@@ -247,12 +244,4 @@ UINT X11DRV_VulkanInit( UINT version, void *vulkan_handle, const struct vulkan_d
return
STATUS_NOT_IMPLEMENTED
;
return
STATUS_NOT_IMPLEMENTED
;
}
}
void
destroy_vk_surface
(
HWND
hwnd
)
{
}
void
vulkan_thread_detach
(
void
)
{
}
#endif
/* SONAME_LIBVULKAN */
#endif
/* SONAME_LIBVULKAN */
dlls/winex11.drv/window.c
View file @
d519cf6c
...
@@ -1604,7 +1604,7 @@ static void client_window_events_disable( struct x11drv_win_data *data, Window c
...
@@ -1604,7 +1604,7 @@ static void client_window_events_disable( struct x11drv_win_data *data, Window c
/**********************************************************************
/**********************************************************************
* detach_client_window
* detach_client_window
*/
*/
static
void
detach_client_window
(
struct
x11drv_win_data
*
data
,
Window
client_window
)
void
detach_client_window
(
struct
x11drv_win_data
*
data
,
Window
client_window
)
{
{
if
(
data
->
client_window
!=
client_window
||
!
client_window
)
return
;
if
(
data
->
client_window
!=
client_window
||
!
client_window
)
return
;
...
@@ -1940,7 +1940,6 @@ void X11DRV_DestroyWindow( HWND hwnd )
...
@@ -1940,7 +1940,6 @@ void X11DRV_DestroyWindow( HWND hwnd )
release_win_data
(
data
);
release_win_data
(
data
);
free
(
data
);
free
(
data
);
destroy_gl_drawable
(
hwnd
);
destroy_gl_drawable
(
hwnd
);
destroy_vk_surface
(
hwnd
);
}
}
...
...
dlls/winex11.drv/x11drv.h
View file @
d519cf6c
...
@@ -641,7 +641,6 @@ extern void sync_gl_drawable( HWND hwnd, BOOL known_child );
...
@@ -641,7 +641,6 @@ extern void sync_gl_drawable( HWND hwnd, BOOL known_child );
extern
void
set_gl_drawable_parent
(
HWND
hwnd
,
HWND
parent
);
extern
void
set_gl_drawable_parent
(
HWND
hwnd
,
HWND
parent
);
extern
void
destroy_gl_drawable
(
HWND
hwnd
);
extern
void
destroy_gl_drawable
(
HWND
hwnd
);
extern
void
destroy_vk_surface
(
HWND
hwnd
);
extern
void
destroy_vk_surface
(
HWND
hwnd
);
extern
void
vulkan_thread_detach
(
void
);
extern
void
wait_for_withdrawn_state
(
HWND
hwnd
,
BOOL
set
);
extern
void
wait_for_withdrawn_state
(
HWND
hwnd
,
BOOL
set
);
extern
Window
init_clip_window
(
void
);
extern
Window
init_clip_window
(
void
);
...
@@ -650,6 +649,7 @@ extern void read_net_wm_states( Display *display, struct x11drv_win_data *data )
...
@@ -650,6 +649,7 @@ extern void read_net_wm_states( Display *display, struct x11drv_win_data *data )
extern
void
update_net_wm_states
(
struct
x11drv_win_data
*
data
);
extern
void
update_net_wm_states
(
struct
x11drv_win_data
*
data
);
extern
void
make_window_embedded
(
struct
x11drv_win_data
*
data
);
extern
void
make_window_embedded
(
struct
x11drv_win_data
*
data
);
extern
Window
create_client_window
(
HWND
hwnd
,
const
XVisualInfo
*
visual
,
Colormap
colormap
);
extern
Window
create_client_window
(
HWND
hwnd
,
const
XVisualInfo
*
visual
,
Colormap
colormap
);
extern
void
detach_client_window
(
struct
x11drv_win_data
*
data
,
Window
client_window
);
extern
void
destroy_client_window
(
HWND
hwnd
,
Window
client_window
);
extern
void
destroy_client_window
(
HWND
hwnd
,
Window
client_window
);
extern
void
set_window_visual
(
struct
x11drv_win_data
*
data
,
const
XVisualInfo
*
vis
,
BOOL
use_alpha
);
extern
void
set_window_visual
(
struct
x11drv_win_data
*
data
,
const
XVisualInfo
*
vis
,
BOOL
use_alpha
);
extern
void
change_systray_owner
(
Display
*
display
,
Window
systray_window
);
extern
void
change_systray_owner
(
Display
*
display
,
Window
systray_window
);
...
...
dlls/winex11.drv/x11drv_main.c
View file @
d519cf6c
...
@@ -696,7 +696,6 @@ void X11DRV_ThreadDetach(void)
...
@@ -696,7 +696,6 @@ void X11DRV_ThreadDetach(void)
if
(
data
)
if
(
data
)
{
{
vulkan_thread_detach
();
if
(
data
->
xim
)
XCloseIM
(
data
->
xim
);
if
(
data
->
xim
)
XCloseIM
(
data
->
xim
);
if
(
data
->
font_set
)
XFreeFontSet
(
data
->
display
,
data
->
font_set
);
if
(
data
->
font_set
)
XFreeFontSet
(
data
->
display
,
data
->
font_set
);
XSync
(
gdi_display
,
False
);
/* make sure XReparentWindow requests have completed before closing the thread display */
XSync
(
gdi_display
,
False
);
/* make sure XReparentWindow requests have completed before closing the thread display */
...
...
include/wine/vulkan_driver.h
View file @
d519cf6c
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
#define __WINE_VULKAN_DRIVER_H
#define __WINE_VULKAN_DRIVER_H
/* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */
/* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */
#define WINE_VULKAN_DRIVER_VERSION 3
3
#define WINE_VULKAN_DRIVER_VERSION 3
4
struct
vulkan_funcs
struct
vulkan_funcs
{
{
...
@@ -46,6 +46,7 @@ struct vulkan_driver_funcs
...
@@ -46,6 +46,7 @@ struct vulkan_driver_funcs
{
{
VkResult
(
*
p_vulkan_surface_create
)(
HWND
,
VkInstance
,
VkSurfaceKHR
*
,
void
**
);
VkResult
(
*
p_vulkan_surface_create
)(
HWND
,
VkInstance
,
VkSurfaceKHR
*
,
void
**
);
void
(
*
p_vulkan_surface_destroy
)(
HWND
,
void
*
);
void
(
*
p_vulkan_surface_destroy
)(
HWND
,
void
*
);
void
(
*
p_vulkan_surface_detach
)(
HWND
,
void
*
);
void
(
*
p_vulkan_surface_presented
)(
HWND
,
VkResult
);
void
(
*
p_vulkan_surface_presented
)(
HWND
,
VkResult
);
VkBool32
(
*
p_vkGetPhysicalDeviceWin32PresentationSupportKHR
)(
VkPhysicalDevice
,
uint32_t
);
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