projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d44525
)
freedreno: Limit max draws per batch
author
Rob Clark
<robdclark@chromium.org>
Mon, 2 Jan 2023 17:19:49 +0000
(09:19 -0800)
committer
Marge Bot
<emma+marge@anholt.net>
Thu, 5 Jan 2023 15:44:39 +0000
(15:44 +0000)
Mostly so that piglit drawoverhead doesn't OoM itself with absurd # of
draws.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20496>
src/gallium/drivers/freedreno/freedreno_batch.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/freedreno/freedreno_batch.c
b/src/gallium/drivers/freedreno/freedreno_batch.c
index
3704340
..
5ed1c1b
100644
(file)
--- a/
src/gallium/drivers/freedreno/freedreno_batch.c
+++ b/
src/gallium/drivers/freedreno/freedreno_batch.c
@@
-537,6
+537,11
@@
fd_batch_check_size(struct fd_batch *batch)
return;
}
+ if (batch->num_draws > 100000) {
+ fd_batch_flush(batch);
+ return;
+ }
+
/* Place a reasonable upper bound on prim/draw stream buffer size: */
const unsigned limit_bits = 8 * 8 * 1024 * 1024;
if ((batch->prim_strm_bits > limit_bits) ||