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:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user