Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
32eef26a
Commit
32eef26a
authored
Mar 15, 2018
by
Józef Kucia
Committed by
Alexandre Julliard
Mar 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Simplify wine_vkEnumeratePhysicalDevices().
Signed-off-by:
Józef Kucia
<
jkucia@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
76275505
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
23 deletions
+8
-23
vulkan.c
dlls/winevulkan/vulkan.c
+8
-23
No files found.
dlls/winevulkan/vulkan.c
View file @
32eef26a
...
...
@@ -838,42 +838,27 @@ static VkResult WINAPI wine_vkEnumerateInstanceExtensionProperties(const char *l
return
res
;
}
VkResult
WINAPI
wine_vkEnumeratePhysicalDevices
(
VkInstance
instance
,
uint32_t
*
device_
count
,
VkResult
WINAPI
wine_vkEnumeratePhysicalDevices
(
VkInstance
instance
,
uint32_t
*
count
,
VkPhysicalDevice
*
devices
)
{
VkResult
res
;
unsigned
int
i
,
num_copies
;
unsigned
int
i
;
TRACE
(
"%p %p %p
\n
"
,
instance
,
device_
count
,
devices
);
TRACE
(
"%p %p %p
\n
"
,
instance
,
count
,
devices
);
if
(
!
devices
)
{
*
device_
count
=
instance
->
num_phys_devs
;
*
count
=
instance
->
num_phys_devs
;
return
VK_SUCCESS
;
}
if
(
*
device_count
<
instance
->
num_phys_devs
)
{
/* Incomplete is a type of success used to signal the application
* that not all devices got copied.
*/
num_copies
=
*
device_count
;
res
=
VK_INCOMPLETE
;
}
else
{
num_copies
=
instance
->
num_phys_devs
;
res
=
VK_SUCCESS
;
}
for
(
i
=
0
;
i
<
num_copies
;
i
++
)
*
count
=
min
(
*
count
,
instance
->
num_phys_devs
);
for
(
i
=
0
;
i
<
*
count
;
i
++
)
{
devices
[
i
]
=
instance
->
phys_devs
[
i
];
}
*
device_count
=
num_copies
;
TRACE
(
"Returning %u devices
\n
"
,
*
device_
count
);
return
res
;
TRACE
(
"Returning %u devices
.
\n
"
,
*
count
);
return
*
count
<
instance
->
num_phys_devs
?
VK_INCOMPLETE
:
VK_SUCCESS
;
}
void
WINAPI
wine_vkFreeCommandBuffers
(
VkDevice
device
,
VkCommandPool
pool
,
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