diff options
author | Iago Toral Quiroga <itoral@igalia.com> | 2024-04-23 10:06:53 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-04-23 11:20:08 +0000 |
commit | 6c73c9bb16f1a35aa4ee908c9a8255b05e7e7c63 (patch) | |
tree | c7a6bb991f86ff39f9ba90f991d021475ccbc292 | |
parent | 0c0d62ba701063deb0911ddb1e522cbcbdf6aa40 (diff) |
v3d/simulator: size counter_values array correctly on V3D 7.x
sim_state.perfcnt_total provides the total number of counters
supported by the underlying simulated platform and is what we
use when we create a perform to validate that the counters
requested are valid, so we should use this.
V3D_PERFCNT_NUM is a fixed enum value that is only valid for
V3D 4.2 at present and is not sufficiently large for all the
counters available in V3D 7.x.
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28870>
-rw-r--r-- | src/broadcom/simulator/v3d_simulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/broadcom/simulator/v3d_simulator.c b/src/broadcom/simulator/v3d_simulator.c index 7e5c97e33f4..1d78d7205f1 100644 --- a/src/broadcom/simulator/v3d_simulator.c +++ b/src/broadcom/simulator/v3d_simulator.c @@ -854,7 +854,7 @@ v3d_write_performance_query_result(int fd, { struct v3d_simulator_file *file = v3d_get_simulator_file_for_fd(fd); struct v3d_simulator_perfmon *perfmon; - uint64_t counter_values[V3D_PERFCNT_NUM]; + uint64_t counter_values[sim_state.perfcnt_total]; for (uint32_t i = 0; i < copy->nperfmons; i++) { mtx_lock(&sim_state.submit_lock); |