mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-29 07:20:23 +01:00
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:
parent
3d98e9c2e0
commit
5ef6da21d9
1 changed files with 4 additions and 2 deletions
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue