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
60085e46
Commit
60085e46
authored
Nov 24, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Don't try to unwrap missing optional handle struct members.
parent
feab1634
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
13 deletions
+21
-13
make_vulkan
dlls/winevulkan/make_vulkan
+15
-7
vulkan_thunks.c
dlls/winevulkan/vulkan_thunks.c
+6
-6
No files found.
dlls/winevulkan/make_vulkan
View file @
60085e46
...
...
@@ -1452,10 +1452,13 @@ class VkMember(VkVariable):
# Nothing needed this yet.
LOGGER
.
warn
(
"TODO: implement copying of static array for {0}.{1}"
.
format
(
self
.
type
,
self
.
name
))
elif
self
.
is_handle
()
and
self
.
needs_unwrapping
():
handle
=
self
.
type_info
[
"data"
]
if
direction
==
Direction
.
OUTPUT
:
LOGGER
.
err
(
"OUTPUT parameter {0}.{1} cannot be unwrapped"
.
format
(
self
.
type
,
self
.
name
))
elif
self
.
optional
:
return
"{0}{1} = {2} ? {3} : 0;
\n
"
.
format
(
output
,
self
.
name
,
self
.
value
(
input
,
conv
),
handle
.
driver_handle
(
self
.
value
(
input
,
conv
)))
else
:
handle
=
self
.
type_info
[
"data"
]
return
"{0}{1} = {2};
\n
"
.
format
(
output
,
self
.
name
,
handle
.
driver_handle
(
self
.
value
(
input
,
conv
)))
elif
self
.
is_generic_handle
():
if
direction
==
Direction
.
OUTPUT
:
...
...
@@ -1849,14 +1852,19 @@ class VkParam(VkVariable):
p
=
self
.
value
(
params_prefix
,
conv
)
if
unwrap
:
unwrap_handle
=
None
if
self
.
object_type
!=
None
and
self
.
type
==
"uint64_t"
:
return
"wine_vk_unwrap_handle({0}{1}, {0}{2})"
.
format
(
params_prefix
,
self
.
object_type
,
self
.
name
)
unwrap_handle
=
"wine_vk_unwrap_handle({0}{1}, {0}{2})"
.
format
(
params_prefix
,
self
.
object_type
,
self
.
name
)
# We need to pass the native handle to the native Vulkan calls and
# the wine driver's handle to calls which are wrapped by the driver.
driver_handle
=
self
.
handle
.
driver_handle
(
p
)
if
self
.
is_handle
()
else
None
if
driver_handle
:
return
driver_handle
elif
self
.
is_handle
():
# We need to pass the native handle to the native Vulkan calls and
# the wine driver's handle to calls which are wrapped by the driver.
unwrap_handle
=
self
.
handle
.
driver_handle
(
p
)
if
unwrap_handle
:
if
self
.
optional
:
unwrap_handle
=
"{0}{1} ? {2} : 0"
.
format
(
params_prefix
,
self
.
name
,
unwrap_handle
)
return
unwrap_handle
return
p
...
...
dlls/winevulkan/vulkan_thunks.c
View file @
60085e46
...
...
@@ -23416,7 +23416,7 @@ static inline void convert_VkPhysicalDeviceSurfaceInfo2KHR_win64_to_host(const V
out
->
sType
=
in
->
sType
;
out
->
pNext
=
in
->
pNext
;
out
->
surface
=
wine_surface_from_handle
(
in
->
surface
)
->
driver_surface
;
out
->
surface
=
in
->
surface
?
wine_surface_from_handle
(
in
->
surface
)
->
driver_surface
:
0
;
}
#endif
/* _WIN64 */
...
...
@@ -23426,7 +23426,7 @@ static inline void convert_VkPhysicalDeviceSurfaceInfo2KHR_win32_to_host(const V
out
->
sType
=
in
->
sType
;
out
->
pNext
=
NULL
;
out
->
surface
=
wine_surface_from_handle
(
in
->
surface
)
->
driver_surface
;
out
->
surface
=
in
->
surface
?
wine_surface_from_handle
(
in
->
surface
)
->
driver_surface
:
0
;
if
(
in
->
pNext
)
FIXME
(
"Unexpected pNext
\n
"
);
}
...
...
@@ -38314,7 +38314,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceSurfaceFormatsKHR(void *args)
TRACE
(
"%p, 0x%s, %p, %p
\n
"
,
params
->
physicalDevice
,
wine_dbgstr_longlong
(
params
->
surface
),
params
->
pSurfaceFormatCount
,
params
->
pSurfaceFormats
);
params
->
result
=
wine_phys_dev_from_handle
(
params
->
physicalDevice
)
->
instance
->
funcs
.
p_vkGetPhysicalDeviceSurfaceFormatsKHR
(
wine_phys_dev_from_handle
(
params
->
physicalDevice
)
->
phys_dev
,
wine_surface_from_handle
(
params
->
surface
)
->
driver_surface
,
params
->
pSurfaceFormatCount
,
params
->
pSurfaceFormats
);
params
->
result
=
wine_phys_dev_from_handle
(
params
->
physicalDevice
)
->
instance
->
funcs
.
p_vkGetPhysicalDeviceSurfaceFormatsKHR
(
wine_phys_dev_from_handle
(
params
->
physicalDevice
)
->
phys_dev
,
params
->
surface
?
wine_surface_from_handle
(
params
->
surface
)
->
driver_surface
:
0
,
params
->
pSurfaceFormatCount
,
params
->
pSurfaceFormats
);
return
STATUS_SUCCESS
;
}
#endif
/* _WIN64 */
...
...
@@ -38332,7 +38332,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceSurfaceFormatsKHR(void *args)
TRACE
(
"%#x, 0x%s, %#x, %#x
\n
"
,
params
->
physicalDevice
,
wine_dbgstr_longlong
(
params
->
surface
),
params
->
pSurfaceFormatCount
,
params
->
pSurfaceFormats
);
params
->
result
=
wine_phys_dev_from_handle
((
VkPhysicalDevice
)
UlongToPtr
(
params
->
physicalDevice
))
->
instance
->
funcs
.
p_vkGetPhysicalDeviceSurfaceFormatsKHR
(
wine_phys_dev_from_handle
((
VkPhysicalDevice
)
UlongToPtr
(
params
->
physicalDevice
))
->
phys_dev
,
wine_surface_from_handle
(
params
->
surface
)
->
driver_surface
,
(
uint32_t
*
)
UlongToPtr
(
params
->
pSurfaceFormatCount
),
(
VkSurfaceFormatKHR
*
)
UlongToPtr
(
params
->
pSurfaceFormats
));
params
->
result
=
wine_phys_dev_from_handle
((
VkPhysicalDevice
)
UlongToPtr
(
params
->
physicalDevice
))
->
instance
->
funcs
.
p_vkGetPhysicalDeviceSurfaceFormatsKHR
(
wine_phys_dev_from_handle
((
VkPhysicalDevice
)
UlongToPtr
(
params
->
physicalDevice
))
->
phys_dev
,
params
->
surface
?
wine_surface_from_handle
(
params
->
surface
)
->
driver_surface
:
0
,
(
uint32_t
*
)
UlongToPtr
(
params
->
pSurfaceFormatCount
),
(
VkSurfaceFormatKHR
*
)
UlongToPtr
(
params
->
pSurfaceFormats
));
return
STATUS_SUCCESS
;
}
...
...
@@ -38343,7 +38343,7 @@ static NTSTATUS thunk64_vkGetPhysicalDeviceSurfacePresentModesKHR(void *args)
TRACE
(
"%p, 0x%s, %p, %p
\n
"
,
params
->
physicalDevice
,
wine_dbgstr_longlong
(
params
->
surface
),
params
->
pPresentModeCount
,
params
->
pPresentModes
);
params
->
result
=
wine_phys_dev_from_handle
(
params
->
physicalDevice
)
->
instance
->
funcs
.
p_vkGetPhysicalDeviceSurfacePresentModesKHR
(
wine_phys_dev_from_handle
(
params
->
physicalDevice
)
->
phys_dev
,
wine_surface_from_handle
(
params
->
surface
)
->
driver_surface
,
params
->
pPresentModeCount
,
params
->
pPresentModes
);
params
->
result
=
wine_phys_dev_from_handle
(
params
->
physicalDevice
)
->
instance
->
funcs
.
p_vkGetPhysicalDeviceSurfacePresentModesKHR
(
wine_phys_dev_from_handle
(
params
->
physicalDevice
)
->
phys_dev
,
params
->
surface
?
wine_surface_from_handle
(
params
->
surface
)
->
driver_surface
:
0
,
params
->
pPresentModeCount
,
params
->
pPresentModes
);
return
STATUS_SUCCESS
;
}
#endif
/* _WIN64 */
...
...
@@ -38361,7 +38361,7 @@ static NTSTATUS thunk32_vkGetPhysicalDeviceSurfacePresentModesKHR(void *args)
TRACE
(
"%#x, 0x%s, %#x, %#x
\n
"
,
params
->
physicalDevice
,
wine_dbgstr_longlong
(
params
->
surface
),
params
->
pPresentModeCount
,
params
->
pPresentModes
);
params
->
result
=
wine_phys_dev_from_handle
((
VkPhysicalDevice
)
UlongToPtr
(
params
->
physicalDevice
))
->
instance
->
funcs
.
p_vkGetPhysicalDeviceSurfacePresentModesKHR
(
wine_phys_dev_from_handle
((
VkPhysicalDevice
)
UlongToPtr
(
params
->
physicalDevice
))
->
phys_dev
,
wine_surface_from_handle
(
params
->
surface
)
->
driver_surface
,
(
uint32_t
*
)
UlongToPtr
(
params
->
pPresentModeCount
),
(
VkPresentModeKHR
*
)
UlongToPtr
(
params
->
pPresentModes
));
params
->
result
=
wine_phys_dev_from_handle
((
VkPhysicalDevice
)
UlongToPtr
(
params
->
physicalDevice
))
->
instance
->
funcs
.
p_vkGetPhysicalDeviceSurfacePresentModesKHR
(
wine_phys_dev_from_handle
((
VkPhysicalDevice
)
UlongToPtr
(
params
->
physicalDevice
))
->
phys_dev
,
params
->
surface
?
wine_surface_from_handle
(
params
->
surface
)
->
driver_surface
:
0
,
(
uint32_t
*
)
UlongToPtr
(
params
->
pPresentModeCount
),
(
VkPresentModeKHR
*
)
UlongToPtr
(
params
->
pPresentModes
));
return
STATUS_SUCCESS
;
}
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