mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 06:40:08 +01:00
asahi: fix _packed USC structs
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28483>
This commit is contained in:
parent
b3fdede75b
commit
6a63fffeaa
1 changed files with 5 additions and 1 deletions
|
|
@ -702,7 +702,11 @@ class Parser(object):
|
|||
print('#define {} {}'.format (name + "_LENGTH", self.group.length))
|
||||
if self.group.align != None:
|
||||
print('#define {} {}'.format (name + "_ALIGN", self.group.align))
|
||||
print('struct {}_packed {{ uint32_t opaque[{}]; }};'.format(name.lower(), self.group.length // 4))
|
||||
|
||||
# round up to handle 6 half-word USC structures
|
||||
words = (self.group.length + 4 - 1) // 4
|
||||
print('struct {}_packed {{ uint32_t opaque[{}];}};'.format(name.lower(),
|
||||
words))
|
||||
|
||||
def emit_unpack_function(self, name, group):
|
||||
print("static inline void")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue