mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 20:10:17 +01:00
freedreno/registers: use macro instead of inline function for array regs
This is to allow use in places where an inline function isn't allowed, such as a static initializer. Signed-off-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8423>
This commit is contained in:
parent
79921b81bc
commit
72f00fe72e
1 changed files with 1 additions and 1 deletions
|
|
@ -244,7 +244,7 @@ class Array(object):
|
|||
self.length = int(attrs["length"], 0)
|
||||
|
||||
def dump(self):
|
||||
print("static inline uint32_t REG_%s_%s(uint32_t i0) { return 0x%08x + 0x%x*i0; }\n" % (self.domain, self.name, self.offset, self.stride))
|
||||
print("#define REG_%s_%s(i0) (0x%08x + 0x%x*(i0))\n" % (self.domain, self.name, self.offset, self.stride))
|
||||
|
||||
def dump_pack_struct(self):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue