v3dv: ensure there is always a perfmon and counter
Helps static analyzer to don't complain about (potential) reading unitialized values. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32593>
This commit is contained in:
committed by
Marge Bot
parent
13581b7380
commit
15dfcd0db3
@@ -643,6 +643,9 @@ write_performance_query_result(struct v3dv_device *device,
|
||||
struct v3dv_query *q = &pool->queries[query];
|
||||
uint64_t counter_values[V3D_MAX_PERFCNT];
|
||||
|
||||
assert(pool->perfmon.nperfmons);
|
||||
assert(pool->perfmon.ncounters);
|
||||
|
||||
for (uint32_t i = 0; i < pool->perfmon.nperfmons; i++) {
|
||||
struct drm_v3d_perfmon_get_values req = {
|
||||
.id = q->perf.kperfmon_ids[i],
|
||||
|
||||
Reference in New Issue
Block a user