intel/perf: fix crash when no perf queries are supported
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ec1fa1d51f
("intel/perf: fix raw query kernel metric selection")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7024>
This commit is contained in:

committed by
Marge Bot

parent
82563b6a9f
commit
79f3544412
@@ -781,7 +781,7 @@ load_oa_metrics(struct gen_perf_config *perf, int fd,
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (perf->fallback_raw_oa_metric == 0)
|
||||
if (perf->fallback_raw_oa_metric == 0 && perf->n_queries > 0)
|
||||
perf->fallback_raw_oa_metric = perf->queries[perf->n_queries - 1].oa_metrics_set_id;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user