mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
panfrost: Use the enum values for counter description generation
Using the enum definitions prevents the category indices to get out of sync from the block types specified in the XML. Signed-off-by: Lukas Zapolskas <lukas.zapolskas@arm.com>
This commit is contained in:
parent
1749999200
commit
23d265928e
1 changed files with 9 additions and 1 deletions
|
|
@ -26,6 +26,14 @@ class SourceFile:
|
|||
def outdent(self, n):
|
||||
self._indent -= n
|
||||
|
||||
CATEGORY_IDX_REMAP = {
|
||||
"Job Manager": "PAN_PERF_COUNTER_CAT_FRONTEND",
|
||||
"CSF": "PAN_PERF_COUNTER_CAT_FRONTEND",
|
||||
"Tiler": "PAN_PERF_COUNTER_CAT_TILER",
|
||||
"Memory System" : "PAN_PERF_COUNTER_CAT_MEMSYS",
|
||||
"L2 Cache": "PAN_PERF_COUNTER_CAT_MEMSYS",
|
||||
"Shader Core": "PAN_PERF_COUNTER_CAT_SHADER",
|
||||
}
|
||||
|
||||
class Counter:
|
||||
# category Category owning the counter
|
||||
|
|
@ -165,7 +173,7 @@ def main():
|
|||
c.write(".symbol_name = \"%s\"," % (counter.underscore_name))
|
||||
c.write(".units = PAN_PERF_COUNTER_UNITS_%s," % (counter.units.upper()))
|
||||
c.write(".offset = %u," % (counter.offset))
|
||||
c.write(".category_index = %u," % i)
|
||||
c.write(".category_index = %s," % CATEGORY_IDX_REMAP[category.name])
|
||||
|
||||
c.outdent(tab_size)
|
||||
c.write("}, // counter")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue