generate more shader register fields

This commit is contained in:
Asuka 2020-04-09 00:53:18 +08:00
parent c6c308ab15
commit d4470f7217

View file

@ -29,7 +29,7 @@ def MacroToStruct(src, dst):
# filter some registers which we currently don't use.
# change the filter at your needs for future development.
if not reg_name.startswith('SPI_SHADER_PGM') and not reg_name.startswith('COMPUTE_PGM'):
if not reg_name.startswith('SPI_'):
continue
print(reg_name)
@ -38,6 +38,9 @@ def MacroToStruct(src, dst):
dst.write('struct ' + reg_name + '\n{\n')
line = line[8:-1]
if not line:
continue
parts = line.split(' ')
pair = [x for x in parts if x != '']
field_name = pair[0]