The intel_perf_counter_pass::pass field is actually useless and
invalid.
Once you have mapped all the counters to all the metrics, the order of
the metrics capture is dictated by intel_perf_get_n_passes().
When reading values that is the order we should follow.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
2001a80d4a81 ("anv: Implement VK_KHR_performance_query")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18893>
}
}
- if (pass_idx == UINT32_MAX) {
+ if (pass_idx == UINT32_MAX)
pass_array[n_written_passes] = counter_pass[i].query;
- pass_idx = n_written_passes++;
- }
- counter_pass[i].pass = pass_idx;
assert(n_written_passes <= n_passes);
}
}
struct intel_perf_counter_pass {
struct intel_perf_query_info *query;
struct intel_perf_query_counter *counter;
- uint32_t pass;
};
/** Initialize the intel_perf_config object for a given device.
const struct intel_perf_query_result *accumulated_results,
union VkPerformanceCounterResultKHR *results)
{
+ const struct intel_perf_query_info *query = pool->pass_query[pass];
+
for (uint32_t c = 0; c < pool->n_counters; c++) {
const struct intel_perf_counter_pass *counter_pass = &pool->counter_pass[c];
- if (counter_pass->pass != pass)
+ if (counter_pass->query != query)
continue;
switch (pool->pass_query[pass]->kind) {
const struct intel_perf_query_result *accumulated_results,
union VkPerformanceCounterResultKHR *results)
{
+ const struct intel_perf_query_info *query = pool->pass_query[pass];
+
for (uint32_t c = 0; c < pool->n_counters; c++) {
const struct intel_perf_counter_pass *counter_pass = &pool->counter_pass[c];
- if (counter_pass->pass != pass)
+ if (counter_pass->query != query)
continue;
switch (pool->pass_query[pass]->kind) {