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
eefc444f
Commit
eefc444f
authored
Mar 23, 2018
by
Józef Kucia
Committed by
Alexandre Julliard
Mar 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Simplify X11DRV_vkEnumerateInstanceExtensionProperties().
Signed-off-by:
Józef Kucia
<
jkucia@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
78447f8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
26 deletions
+6
-26
vulkan.c
dlls/winex11.drv/vulkan.c
+6
-26
No files found.
dlls/winex11.drv/vulkan.c
View file @
eefc444f
...
...
@@ -368,8 +368,7 @@ static void X11DRV_vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapcha
static
VkResult
X11DRV_vkEnumerateInstanceExtensionProperties
(
const
char
*
layer_name
,
uint32_t
*
count
,
VkExtensionProperties
*
properties
)
{
VkResult
res
;
unsigned
int
i
,
num_copies
;
unsigned
int
i
;
TRACE
(
"layer_name %p, count %p, properties %p
\n
"
,
debugstr_a
(
layer_name
),
count
,
properties
);
...
...
@@ -382,37 +381,18 @@ static VkResult X11DRV_vkEnumerateInstanceExtensionProperties(const char *layer_
if
(
!
properties
)
{
/* When properties is NULL, we need to return the number of extensions
* supported. For now report 0 until we add some e.g.
* VK_KHR_win32_surface. Long-term this needs to be an intersection
* between what the native library supports and what thunks we have.
*/
*
count
=
winex11_vk_instance_extensions_count
;
return
VK_SUCCESS
;
}
if
(
*
count
<
winex11_vk_instance_extensions_count
)
{
/* Incomplete is a type of success used to signal the application
* that not all devices got copied.
*/
num_copies
=
*
count
;
res
=
VK_INCOMPLETE
;
}
else
{
num_copies
=
winex11_vk_instance_extensions_count
;
res
=
VK_SUCCESS
;
}
for
(
i
=
0
;
i
<
num_copies
;
i
++
)
*
count
=
min
(
*
count
,
winex11_vk_instance_extensions_count
);
for
(
i
=
0
;
i
<
*
count
;
i
++
)
{
memcpy
(
&
properties
[
i
],
&
winex11_vk_instance_extensions
[
i
],
sizeof
(
*
properties
))
;
properties
[
i
]
=
winex11_vk_instance_extensions
[
i
]
;
}
*
count
=
num_copies
;
TRACE
(
"Re
sult %d, extensions copied %u
\n
"
,
res
,
num_copies
);
return
res
;
TRACE
(
"Re
turning %u extensions.
\n
"
,
*
count
);
return
*
count
<
winex11_vk_instance_extensions_count
?
VK_INCOMPLETE
:
VK_SUCCESS
;
}
static
void
*
X11DRV_vkGetDeviceProcAddr
(
VkDevice
device
,
const
char
*
name
)
...
...
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