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
81ed2e54
Commit
81ed2e54
authored
Mar 13, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Simplify wine_vk_instance_free helper.
parent
04981ad7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
vulkan.c
dlls/winevulkan/vulkan.c
+9
-11
No files found.
dlls/winevulkan/vulkan.c
View file @
81ed2e54
...
...
@@ -684,17 +684,11 @@ static void wine_vk_instance_free(struct wine_instance *instance)
{
unsigned
int
i
;
if
(
!
instance
)
return
;
for
(
i
=
0
;
i
<
instance
->
phys_dev_count
;
i
++
)
wine_phys_dev_cleanup
(
&
instance
->
phys_devs
[
i
]);
if
(
instance
->
host_instance
)
{
vk_funcs
->
p_vkDestroyInstance
(
instance
->
host_instance
,
NULL
/* allocator */
);
remove_handle_mapping
(
instance
,
&
instance
->
wrapper_entry
);
}
vk_funcs
->
p_vkDestroyInstance
(
instance
->
host_instance
,
NULL
/* allocator */
);
remove_handle_mapping
(
instance
,
&
instance
->
wrapper_entry
);
pthread_rwlock_destroy
(
&
instance
->
wrapper_lock
);
free
(
instance
->
utils_messengers
);
...
...
@@ -846,8 +840,6 @@ VkResult wine_vkCreateInstance(const VkInstanceCreateInfo *create_info,
ERR
(
"Failed to allocate memory for instance
\n
"
);
return
VK_ERROR_OUT_OF_HOST_MEMORY
;
}
rb_init
(
&
object
->
wrappers
,
wrapper_entry_compare
);
pthread_rwlock_init
(
&
object
->
wrapper_lock
,
NULL
);
init_conversion_context
(
&
ctx
);
res
=
wine_vk_instance_convert_create_info
(
&
ctx
,
create_info
,
&
create_info_host
,
object
);
...
...
@@ -857,10 +849,14 @@ VkResult wine_vkCreateInstance(const VkInstanceCreateInfo *create_info,
if
(
res
!=
VK_SUCCESS
)
{
ERR
(
"Failed to create instance, res=%d
\n
"
,
res
);
wine_vk_instance_free
(
object
);
free
(
object
->
utils_messengers
);
free
(
object
);
return
res
;
}
rb_init
(
&
object
->
wrappers
,
wrapper_entry_compare
);
pthread_rwlock_init
(
&
object
->
wrapper_lock
,
NULL
);
object
->
handle
=
client_instance
;
add_handle_mapping_ptr
(
object
,
object
->
handle
,
object
->
host_instance
,
&
object
->
wrapper_entry
);
...
...
@@ -929,6 +925,8 @@ void wine_vkDestroyInstance(VkInstance handle, const VkAllocationCallbacks *allo
if
(
allocator
)
FIXME
(
"Support allocation allocators
\n
"
);
if
(
!
instance
)
return
;
wine_vk_instance_free
(
instance
);
}
...
...
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