Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Helix Graziani
wine
Commits
b63f29c4
Commit
b63f29c4
authored
1 month ago
by
Paul Gofman
Committed by
Alexandre Julliard
1 month ago
Browse files
Options
Downloads
Patches
Plain Diff
win32u: Don't invalidate existing Vulkan surface when a new one is created for window.
parent
789899e4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/win32u/vulkan.c
+0
-41
0 additions, 41 deletions
dlls/win32u/vulkan.c
with
0 additions
and
41 deletions
dlls/win32u/vulkan.c
+
0
−
41
View file @
b63f29c4
...
...
@@ -75,45 +75,6 @@ static struct swapchain *swapchain_from_handle( VkSwapchainKHR handle )
return
CONTAINING_RECORD
(
obj
,
struct
swapchain
,
obj
);
}
static
int
window_surface_compare
(
const
void
*
key
,
const
struct
rb_entry
*
entry
)
{
const
struct
surface
*
surface
=
RB_ENTRY_VALUE
(
entry
,
struct
surface
,
window_entry
);
HWND
key_hwnd
=
(
HWND
)
key
;
if
(
key_hwnd
<
surface
->
hwnd
)
return
-
1
;
if
(
key_hwnd
>
surface
->
hwnd
)
return
1
;
return
0
;
}
static
pthread_mutex_t
window_surfaces_lock
=
PTHREAD_MUTEX_INITIALIZER
;
static
struct
rb_tree
window_surfaces
=
{.
compare
=
window_surface_compare
};
static
void
window_surfaces_insert
(
struct
surface
*
surface
)
{
struct
surface
*
previous
;
struct
rb_entry
*
ptr
;
pthread_mutex_lock
(
&
window_surfaces_lock
);
if
(
!
(
ptr
=
rb_get
(
&
window_surfaces
,
surface
->
hwnd
)))
rb_put
(
&
window_surfaces
,
surface
->
hwnd
,
&
surface
->
window_entry
);
else
{
previous
=
RB_ENTRY_VALUE
(
ptr
,
struct
surface
,
window_entry
);
rb_replace
(
&
window_surfaces
,
&
previous
->
window_entry
,
&
surface
->
window_entry
);
previous
->
hwnd
=
0
;
/* make sure previous surface becomes invalid */
}
pthread_mutex_unlock
(
&
window_surfaces_lock
);
}
static
void
window_surfaces_remove
(
struct
surface
*
surface
)
{
pthread_mutex_lock
(
&
window_surfaces_lock
);
if
(
surface
->
hwnd
)
rb_remove
(
&
window_surfaces
,
&
surface
->
window_entry
);
pthread_mutex_unlock
(
&
window_surfaces_lock
);
}
static
VkResult
win32u_vkCreateWin32SurfaceKHR
(
VkInstance
client_instance
,
const
VkWin32SurfaceCreateInfoKHR
*
create_info
,
const
VkAllocationCallbacks
*
allocator
,
VkSurfaceKHR
*
ret
)
{
...
...
@@ -161,7 +122,6 @@ static VkResult win32u_vkCreateWin32SurfaceKHR( VkInstance client_instance, cons
instance
->
p_insert_object
(
instance
,
&
surface
->
obj
.
obj
);
if
(
dummy
)
NtUserDestroyWindow
(
dummy
);
window_surfaces_insert
(
surface
);
*
ret
=
surface
->
obj
.
client
.
surface
;
return
VK_SUCCESS
;
...
...
@@ -189,7 +149,6 @@ static void win32u_vkDestroySurfaceKHR( VkInstance client_instance, VkSurfaceKHR
driver_funcs
->
p_vulkan_surface_destroy
(
surface
->
hwnd
,
surface
->
driver_private
);
instance
->
p_remove_object
(
instance
,
&
surface
->
obj
.
obj
);
window_surfaces_remove
(
surface
);
free
(
surface
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment