pps: Add the Primitive, Instruction, Pixel and Fragment unit types

The Perfetto spec supports several units that are supported directly by
Mali performance counters, which are not being expressed in the data
source.

Signed-off-by: Lukas Zapolskas <lukas.zapolskas@arm.com>
This commit is contained in:
Lukas Zapolskas 2025-03-19 16:28:11 +00:00 committed by Christoph Pillmayer
parent 226669227e
commit 5c32d45ede
2 changed files with 16 additions and 0 deletions

View file

@ -40,6 +40,10 @@ class Counter
Byte, Byte,
Hertz, Hertz,
None, None,
Primitive,
Instruction,
Pixel,
Fragment
}; };
using Value = std::variant<int64_t, double>; using Value = std::variant<int64_t, double>;

View file

@ -183,6 +183,18 @@ template <typename GpuCounterDescriptor> void add_descriptors(GpuCounterDescript
case Counter::Units::None: case Counter::Units::None:
units = GpuCounterDescriptor::NONE; units = GpuCounterDescriptor::NONE;
break; break;
case Counter::Units::Primitive:
units = GpuCounterDescriptor::PRIMITIVE;
break;
case Counter::Units::Instruction:
units = GpuCounterDescriptor::INSTRUCTION;
break;
case Counter::Units::Pixel:
units = GpuCounterDescriptor::PIXEL;
break;
case Counter::Units::Fragment:
units = GpuCounterDescriptor::FRAGMENT;
break;
default: default:
assert(false && "Missing counter units type!"); assert(false && "Missing counter units type!");
break; break;