mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
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> (cherry picked from commit79f3544412)
This commit is contained in:
parent
a19b215ad6
commit
e29629de7d
2 changed files with 2 additions and 2 deletions
|
|
@ -2524,7 +2524,7 @@
|
|||
"description": "intel/perf: fix crash when no perf queries are supported",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "ec1fa1d51ff614c19d08c949482b40c060de48c9"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue