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
1e3d0c86
Commit
1e3d0c86
authored
Nov 10, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Don't try to convert ignored VkWriteDescriptorSet members.
Fixes crash in wined3d_unordered_access_view_vk_clear().
parent
897ab8c6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
9 deletions
+32
-9
make_vulkan
dlls/winevulkan/make_vulkan
+30
-7
vulkan_thunks.c
dlls/winevulkan/vulkan_thunks.c
+2
-2
No files found.
dlls/winevulkan/make_vulkan
View file @
1e3d0c86
...
...
@@ -267,6 +267,25 @@ STRUCT_CHAIN_CONVERSIONS = {
"VkInstanceCreateInfo"
:
[
"VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO"
],
}
# Some struct members are conditionally ignored and callers are free to leave them uninitialized.
# We can't deduce that from XML, so we allow expressing it here.
MEMBER_LENGTH_EXPRESSIONS
=
{
"VkWriteDescriptorSet"
:
{
"pImageInfo"
:
"{struct}descriptorType == VK_DESCRIPTOR_TYPE_SAMPLER || "
+
"{struct}descriptorType == VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER || "
+
"{struct}descriptorType == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE || "
+
"{struct}descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE || "
+
"{struct}descriptorType == VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT || "
+
"{struct}descriptorType == VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM || "
+
"{struct}descriptorType == VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM ? {len} : 0"
,
"pBufferInfo"
:
"{struct}descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER || "
+
"{struct}descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER || "
+
"{struct}descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC || "
+
"{struct}descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC ? {len} : 0"
,
}
}
class
Direction
(
Enum
):
""" Parameter direction: input, output, input_output. """
...
...
@@ -1129,12 +1148,16 @@ class VkVariable(object):
parent
=
var
.
struct
.
members
len
+=
len_str
if
not
len_str
in
parent
:
return
len
if
len_str
in
parent
:
var
=
parent
[
parent
.
index
(
len_str
)]
if
var
.
is_pointer
():
len
=
"*"
+
len
if
isinstance
(
self
.
parent
,
VkStruct
)
and
self
.
parent
.
name
in
MEMBER_LENGTH_EXPRESSIONS
:
exprs
=
MEMBER_LENGTH_EXPRESSIONS
[
self
.
parent
.
name
]
if
self
.
name
in
exprs
:
len
=
exprs
[
self
.
name
]
.
format
(
struct
=
prefix
,
len
=
len
)
return
len
def
is_const
(
self
):
...
...
@@ -1786,12 +1809,12 @@ class VkStruct(Sequence):
structextends
=
struct
.
attrib
.
get
(
"structextends"
)
structextends
=
structextends
.
split
(
","
)
if
structextends
else
[]
members
=
[]
s
=
VkStruct
(
name
,
[],
returnedonly
,
structextends
,
union
=
union
)
for
member
in
struct
.
findall
(
"member"
):
vk_member
=
VkMember
.
from_xml
(
member
,
returnedonly
,
member
s
)
members
.
append
(
vk_member
)
vk_member
=
VkMember
.
from_xml
(
member
,
returnedonly
,
s
)
s
.
members
.
append
(
vk_member
)
return
VkStruct
(
name
,
members
,
returnedonly
,
structextends
,
union
=
union
)
return
s
@staticmethod
def
decouple_structs
(
structs
):
...
...
dlls/winevulkan/vulkan_thunks.c
View file @
1e3d0c86
...
...
@@ -3327,8 +3327,8 @@ static inline void convert_VkWriteDescriptorSet_win32_to_host(struct conversion_
out
->
dstArrayElement
=
in
->
dstArrayElement
;
out
->
descriptorCount
=
in
->
descriptorCount
;
out
->
descriptorType
=
in
->
descriptorType
;
out
->
pImageInfo
=
convert_VkDescriptorImageInfo_array_win32_to_host
(
ctx
,
in
->
pImageInfo
,
in
->
descriptor
Count
);
out
->
pBufferInfo
=
convert_VkDescriptorBufferInfo_array_win32_to_host
(
ctx
,
in
->
pBufferInfo
,
in
->
descriptor
Count
);
out
->
pImageInfo
=
convert_VkDescriptorImageInfo_array_win32_to_host
(
ctx
,
in
->
pImageInfo
,
in
->
descriptor
Type
==
VK_DESCRIPTOR_TYPE_SAMPLER
||
in
->
descriptorType
==
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
||
in
->
descriptorType
==
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
||
in
->
descriptorType
==
VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
||
in
->
descriptorType
==
VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
||
in
->
descriptorType
==
VK_DESCRIPTOR_TYPE_SAMPLE_WEIGHT_IMAGE_QCOM
||
in
->
descriptorType
==
VK_DESCRIPTOR_TYPE_BLOCK_MATCH_IMAGE_QCOM
?
in
->
descriptorCount
:
0
);
out
->
pBufferInfo
=
convert_VkDescriptorBufferInfo_array_win32_to_host
(
ctx
,
in
->
pBufferInfo
,
in
->
descriptor
Type
==
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
||
in
->
descriptorType
==
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
||
in
->
descriptorType
==
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
||
in
->
descriptorType
==
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
?
in
->
descriptorCount
:
0
);
out
->
pTexelBufferView
=
in
->
pTexelBufferView
;
}
#endif
/* USE_STRUCT_CONVERSION */
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