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
b62d4ea6
Commit
b62d4ea6
authored
Aug 30, 2018
by
Józef Kucia
Committed by
Alexandre Julliard
Aug 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Free all command buffers when vkAllocateCommandBuffers() fails.
Signed-off-by:
Józef Kucia
<
jkucia@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
29d49fb8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
vulkan.c
dlls/winevulkan/vulkan.c
+4
-5
No files found.
dlls/winevulkan/vulkan.c
View file @
b62d4ea6
...
@@ -540,25 +540,24 @@ VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device,
...
@@ -540,25 +540,24 @@ VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device,
buffers
[
i
]
->
base
.
loader_magic
=
VULKAN_ICD_MAGIC_VALUE
;
buffers
[
i
]
->
base
.
loader_magic
=
VULKAN_ICD_MAGIC_VALUE
;
buffers
[
i
]
->
device
=
device
;
buffers
[
i
]
->
device
=
device
;
list_add_tail
(
&
pool
->
command_buffers
,
&
buffers
[
i
]
->
pool_link
);
res
=
device
->
funcs
.
p_vkAllocateCommandBuffers
(
device
->
device
,
res
=
device
->
funcs
.
p_vkAllocateCommandBuffers
(
device
->
device
,
&
allocate_info_host
,
&
buffers
[
i
]
->
command_buffer
);
&
allocate_info_host
,
&
buffers
[
i
]
->
command_buffer
);
if
(
res
!=
VK_SUCCESS
)
if
(
res
!=
VK_SUCCESS
)
{
{
ERR
(
"Failed to allocate command buffer, res=%d.
\n
"
,
res
);
ERR
(
"Failed to allocate command buffer, res=%d.
\n
"
,
res
);
buffers
[
i
]
->
command_buffer
=
VK_NULL_HANDLE
;
break
;
break
;
}
}
list_add_tail
(
&
pool
->
command_buffers
,
&
buffers
[
i
]
->
pool_link
);
}
}
if
(
res
!=
VK_SUCCESS
)
if
(
res
!=
VK_SUCCESS
)
{
{
wine_vk_free_command_buffers
(
device
,
pool
,
i
,
buffers
);
wine_vk_free_command_buffers
(
device
,
pool
,
i
+
1
,
buffers
);
memset
(
buffers
,
0
,
allocate_info
->
commandBufferCount
*
sizeof
(
*
buffers
));
memset
(
buffers
,
0
,
allocate_info
->
commandBufferCount
*
sizeof
(
*
buffers
));
return
res
;
}
}
return
VK_SUCCESS
;
return
res
;
}
}
void
WINAPI
wine_vkCmdExecuteCommands
(
VkCommandBuffer
buffer
,
uint32_t
count
,
void
WINAPI
wine_vkCmdExecuteCommands
(
VkCommandBuffer
buffer
,
uint32_t
count
,
...
...
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