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
afa49b18
Commit
afa49b18
authored
Jun 22, 2021
by
Georg Lehmann
Committed by
Alexandre Julliard
Jun 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevulkan: Fix bit field struct members.
Signed-off-by:
Georg Lehmann
<
dadschoorse@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2aeab85c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
14 deletions
+28
-14
make_vulkan
dlls/winevulkan/make_vulkan
+16
-2
vulkan.h
include/wine/vulkan.h
+12
-12
No files found.
dlls/winevulkan/make_vulkan
View file @
afa49b18
...
...
@@ -1078,7 +1078,7 @@ class VkHandle(object):
class
VkMember
(
object
):
def
__init__
(
self
,
const
=
False
,
struct_fwd_decl
=
False
,
_type
=
None
,
pointer
=
None
,
name
=
None
,
array_len
=
None
,
dyn_array_len
=
None
,
optional
=
False
,
values
=
None
,
object_type
=
None
):
dyn_array_len
=
None
,
optional
=
False
,
values
=
None
,
object_type
=
None
,
bit_width
=
None
):
self
.
const
=
const
self
.
struct_fwd_decl
=
struct_fwd_decl
self
.
name
=
name
...
...
@@ -1090,6 +1090,7 @@ class VkMember(object):
self
.
optional
=
optional
self
.
values
=
values
self
.
object_type
=
object_type
self
.
bit_width
=
bit_width
def
__eq__
(
self
,
other
):
""" Compare member based on name against a string.
...
...
@@ -1116,6 +1117,7 @@ class VkMember(object):
member_type
=
None
pointer
=
None
array_len
=
None
bit_width
=
None
values
=
member
.
get
(
"values"
)
...
...
@@ -1161,8 +1163,14 @@ class VkMember(object):
object_type
=
member
.
get
(
"objecttype"
,
None
)
# Some members are bit field values:
# <member><type>uint32_t</type> <name>mask</name>:8</member>
if
name_elem
.
tail
and
name_elem
.
tail
[
0
]
==
':'
:
LOGGER
.
debug
(
"Found bit field"
)
bit_width
=
int
(
name_elem
.
tail
[
1
:])
return
VkMember
(
const
=
const
,
struct_fwd_decl
=
struct_fwd_decl
,
_type
=
member_type
,
pointer
=
pointer
,
name
=
name_elem
.
text
,
array_len
=
array_len
,
dyn_array_len
=
dyn_array_len
,
optional
=
optional
,
values
=
values
,
object_type
=
object_type
)
array_len
=
array_len
,
dyn_array_len
=
dyn_array_len
,
optional
=
optional
,
values
=
values
,
object_type
=
object_type
,
bit_width
=
bit_width
)
def
copy
(
self
,
input
,
output
,
direction
,
conv
):
""" Helper method for use by conversion logic to generate a C-code statement to copy this member.
...
...
@@ -1267,6 +1275,9 @@ class VkMember(object):
if
self
.
is_static_array
():
text
+=
"[{0}]"
.
format
(
self
.
array_len
)
if
self
.
is_bit_field
():
text
+=
":{}"
.
format
(
self
.
bit_width
)
return
text
def
get_conversions
(
self
):
...
...
@@ -1344,6 +1355,9 @@ class VkMember(object):
return
self
.
object_type
!=
None
and
self
.
type
==
"uint64_t"
def
is_bit_field
(
self
):
return
self
.
bit_width
is
not
None
def
needs_alignment
(
self
):
""" Check if this member needs alignment for 64-bit data.
Various structures need alignment on 64-bit variables due
...
...
include/wine/vulkan.h
View file @
afa49b18
...
...
@@ -5752,10 +5752,10 @@ typedef struct VkAccelerationStructureGeometryMotionTrianglesDataNV
typedef
struct
VkAccelerationStructureInstanceKHR
{
VkTransformMatrixKHR
transform
;
uint32_t
instanceCustomIndex
;
uint32_t
mask
;
uint32_t
instanceShaderBindingTableRecordOffset
;
VkGeometryInstanceFlagsKHR
flags
;
uint32_t
instanceCustomIndex
:
24
;
uint32_t
mask
:
8
;
uint32_t
instanceShaderBindingTableRecordOffset
:
24
;
VkGeometryInstanceFlagsKHR
flags
:
8
;
uint64_t
WINE_VK_ALIGN
(
8
)
accelerationStructureReference
;
}
VkAccelerationStructureInstanceKHR
;
typedef
VkAccelerationStructureInstanceKHR
VkAccelerationStructureInstanceNV
;
...
...
@@ -5772,10 +5772,10 @@ typedef struct VkAccelerationStructureSRTMotionInstanceNV
{
VkSRTDataNV
transformT0
;
VkSRTDataNV
transformT1
;
uint32_t
instanceCustomIndex
;
uint32_t
mask
;
uint32_t
instanceShaderBindingTableRecordOffset
;
VkGeometryInstanceFlagsKHR
flags
;
uint32_t
instanceCustomIndex
:
24
;
uint32_t
mask
:
8
;
uint32_t
instanceShaderBindingTableRecordOffset
:
24
;
VkGeometryInstanceFlagsKHR
flags
:
8
;
uint64_t
WINE_VK_ALIGN
(
8
)
accelerationStructureReference
;
}
VkAccelerationStructureSRTMotionInstanceNV
;
...
...
@@ -7033,10 +7033,10 @@ typedef struct VkAccelerationStructureMatrixMotionInstanceNV
{
VkTransformMatrixKHR
transformT0
;
VkTransformMatrixKHR
transformT1
;
uint32_t
instanceCustomIndex
;
uint32_t
mask
;
uint32_t
instanceShaderBindingTableRecordOffset
;
VkGeometryInstanceFlagsKHR
flags
;
uint32_t
instanceCustomIndex
:
24
;
uint32_t
mask
:
8
;
uint32_t
instanceShaderBindingTableRecordOffset
:
24
;
VkGeometryInstanceFlagsKHR
flags
:
8
;
uint64_t
WINE_VK_ALIGN
(
8
)
accelerationStructureReference
;
}
VkAccelerationStructureMatrixMotionInstanceNV
;
...
...
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