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>