mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
mesa/main: use BITSET_FOREACH_SET in perf_monitor_result_size
This should make the code both faster and slightly clearer. Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
parent
9c0773958e
commit
819543adb4
1 changed files with 3 additions and 4 deletions
|
|
@ -591,11 +591,10 @@ perf_monitor_result_size(const struct gl_context *ctx,
|
|||
|
||||
for (group = 0; group < ctx->PerfMonitor.NumGroups; group++) {
|
||||
const struct gl_perf_monitor_group *g = &ctx->PerfMonitor.Groups[group];
|
||||
for (counter = 0; counter < g->NumCounters; counter++) {
|
||||
const struct gl_perf_monitor_counter *c = &g->Counters[counter];
|
||||
BITSET_WORD tmp;
|
||||
|
||||
if (!BITSET_TEST(m->ActiveCounters[group], counter))
|
||||
continue;
|
||||
BITSET_FOREACH_SET(counter, tmp, m->ActiveCounters[group], g->NumCounters) {
|
||||
const struct gl_perf_monitor_counter *c = &g->Counters[counter];
|
||||
|
||||
size += sizeof(uint32_t); /* Group ID */
|
||||
size += sizeof(uint32_t); /* Counter ID */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue