etnaviv: query: correct max number of occlusion query samples

The real maximium for the occlusion query 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:
Lucas Stach 2023-06-09 19:06:59 +02:00 committed by Marge Bot
parent 3d98e9c2e0
commit 5ef6da21d9

View file

@ -36,6 +36,8 @@
#include "etnaviv_query_acc.h"
#include "etnaviv_screen.h"
#define MAX_OQ_SAMPLES 511 /* 4KB / 8Bytes/sample */
/*
* Occlusion Query:
*
@ -73,8 +75,8 @@ occlusion_resume(struct etna_acc_query *aq, struct etna_context *ctx)
.flags = ETNA_RELOC_WRITE
};
if (aq->samples > 63) {
aq->samples = 63;
if (aq->samples > MAX_OQ_SAMPLES) {
aq->samples = MAX_OQ_SAMPLES;
BUG("samples overflow");
}