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
04981ad7
Commit
04981ad7
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: Get rid of the wine_vk_device_free helper.
parent
aaeb221f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
31 deletions
+12
-31
vulkan.c
dlls/winevulkan/vulkan.c
+12
-31
No files found.
dlls/winevulkan/vulkan.c
View file @
04981ad7
...
...
@@ -501,31 +501,6 @@ static VkResult wine_vk_device_convert_create_info(struct wine_phys_dev *phys_de
return
VK_SUCCESS
;
}
/* Helper function used for freeing a device structure. This function supports full
* and partial object cleanups and can thus be used for vkCreateDevice failures.
*/
static
void
wine_vk_device_free
(
struct
wine_device
*
device
)
{
unsigned
int
i
;
if
(
!
device
)
return
;
for
(
i
=
0
;
i
<
device
->
queue_count
;
i
++
)
{
struct
wine_queue
*
queue
=
device
->
queues
+
i
;
if
(
queue
->
host_queue
)
remove_handle_mapping
(
device
->
phys_dev
->
instance
,
&
queue
->
wrapper_entry
);
}
if
(
device
->
host_device
&&
device
->
funcs
.
p_vkDestroyDevice
)
{
remove_handle_mapping
(
device
->
phys_dev
->
instance
,
&
device
->
wrapper_entry
);
device
->
funcs
.
p_vkDestroyDevice
(
device
->
host_device
,
NULL
/* pAllocator */
);
}
free
(
device
);
}
NTSTATUS
init_vulkan
(
void
*
args
)
{
vk_funcs
=
__wine_get_vulkan_driver
(
WINE_VULKAN_DRIVER_VERSION
);
...
...
@@ -825,7 +800,9 @@ VkResult wine_vkCreateDevice(VkPhysicalDevice phys_dev_handle, const VkDeviceCre
if
(
res
!=
VK_SUCCESS
)
{
WARN
(
"Failed to create device, res=%d.
\n
"
,
res
);
goto
fail
;
remove_handle_mapping
(
object
->
phys_dev
->
instance
,
&
object
->
wrapper_entry
);
free
(
object
);
return
res
;
}
/* Just load all function pointers we are aware off. The loader takes care of filtering.
...
...
@@ -848,10 +825,6 @@ VkResult wine_vkCreateDevice(VkPhysicalDevice phys_dev_handle, const VkDeviceCre
TRACE
(
"Created device %p, host_device %p.
\n
"
,
object
,
object
->
host_device
);
return
VK_SUCCESS
;
fail:
wine_vk_device_free
(
object
);
return
res
;
}
VkResult
wine_vkCreateInstance
(
const
VkInstanceCreateInfo
*
create_info
,
...
...
@@ -935,11 +908,19 @@ VkResult wine_vkCreateInstance(const VkInstanceCreateInfo *create_info,
void
wine_vkDestroyDevice
(
VkDevice
handle
,
const
VkAllocationCallbacks
*
allocator
)
{
struct
wine_device
*
device
=
wine_device_from_handle
(
handle
);
unsigned
int
i
;
if
(
allocator
)
FIXME
(
"Support for allocation callbacks not implemented yet
\n
"
);
if
(
!
device
)
return
;
wine_vk_device_free
(
device
);
for
(
i
=
0
;
i
<
device
->
queue_count
;
i
++
)
remove_handle_mapping
(
device
->
phys_dev
->
instance
,
&
device
->
queues
[
i
].
wrapper_entry
);
remove_handle_mapping
(
device
->
phys_dev
->
instance
,
&
device
->
wrapper_entry
);
device
->
funcs
.
p_vkDestroyDevice
(
device
->
host_device
,
NULL
/* pAllocator */
);
free
(
device
);
}
void
wine_vkDestroyInstance
(
VkInstance
handle
,
const
VkAllocationCallbacks
*
allocator
)
...
...
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