mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-17 01:40:36 +01:00
etnaviv: query: correct max number of perfmon samples
The real maximium for the perfmon samples is much higher than what the code currently claims to support as we always allocate a full 4KB buffer to store the query results. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23557>
This commit is contained in:
parent
f33a4fa602
commit
3d98e9c2e0
1 changed files with 4 additions and 2 deletions
|
|
@ -33,6 +33,8 @@
|
|||
#include "etnaviv_emit.h"
|
||||
#include "etnaviv_query_acc.h"
|
||||
|
||||
#define MAX_PERFMON_SAMPLES 1022 /* (4KB / 4Byte/sample) - 1 reserved seqno */
|
||||
|
||||
struct etna_pm_query
|
||||
{
|
||||
struct etna_acc_query base;
|
||||
|
|
@ -65,8 +67,8 @@ pm_query(struct etna_context *ctx, struct etna_acc_query *aq, unsigned flags)
|
|||
unsigned offset;
|
||||
assert(flags);
|
||||
|
||||
if (aq->samples > 127) {
|
||||
aq->samples = 127;
|
||||
if (aq->samples > MAX_PERFMON_SAMPLES) {
|
||||
aq->samples = MAX_PERFMON_SAMPLES;
|
||||
BUG("samples overflow perfmon");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue