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
8fd39cc2
Commit
8fd39cc2
authored
Mar 29, 2018
by
Józef Kucia
Committed by
Alexandre Julliard
Mar 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Avoid goto in wine_vkCreateDevice().
Signed-off-by:
Józef Kucia
<
jkucia@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a8c06b63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
vulkan.c
dlls/winevulkan/vulkan.c
+7
-10
No files found.
dlls/winevulkan/vulkan.c
View file @
8fd39cc2
...
...
@@ -531,8 +531,9 @@ VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice phys_dev,
&
create_info_host
,
NULL
/* allocator */
,
&
object
->
device
);
if
(
res
!=
VK_SUCCESS
)
{
ERR
(
"Failed to create device
\n
"
);
goto
err
;
ERR
(
"Failed to create device.
\n
"
);
wine_vk_device_free
(
object
);
return
res
;
}
object
->
phys_dev
=
phys_dev
;
...
...
@@ -559,8 +560,8 @@ VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice phys_dev,
object
->
queues
=
heap_calloc
(
max_queue_families
,
sizeof
(
*
object
->
queues
));
if
(
!
object
->
queues
)
{
res
=
VK_ERROR_OUT_OF_HOST_MEMORY
;
goto
err
;
wine_vk_device_free
(
object
)
;
return
VK_ERROR_OUT_OF_HOST_MEMORY
;
}
for
(
i
=
0
;
i
<
create_info_host
.
queueCreateInfoCount
;
i
++
)
...
...
@@ -573,18 +574,14 @@ VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice phys_dev,
object
->
queues
[
family_index
]
=
wine_vk_device_alloc_queues
(
object
,
family_index
,
queue_count
);
if
(
!
object
->
queues
[
family_index
])
{
res
=
VK_ERROR_OUT_OF_HOST_MEMORY
;
ERR
(
"Failed to allocate memory for queues
\n
"
);
goto
err
;
wine_vk_device_free
(
object
);
return
VK_ERROR_OUT_OF_HOST_MEMORY
;
}
}
*
device
=
object
;
return
VK_SUCCESS
;
err:
wine_vk_device_free
(
object
);
return
res
;
}
VkResult
WINAPI
wine_vkCreateInstance
(
const
VkInstanceCreateInfo
*
create_info
,
...
...
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