summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-10-15 09:56:35 -0400
committerRob Clark <[email protected]>2018-10-17 12:44:49 -0400
commitd27b1c83b9b7bd2db8851fe497246c0143b73554 (patch)
tree78a905c128158a45c5534b6ca26546a69bdca91b /src
parent24d57a6d8f72156aa81dce89683bd16e771c7ea2 (diff)
freedreno/a6xx: don't allocate binning rb
Now that a single cmdstream is used for both binning and draw passes, we can skip allocation of cmdstream buffer for binning. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_batch.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c
index a714d97f5cd..487176cc638 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch.c
+++ b/src/gallium/drivers/freedreno/freedreno_batch.c
@@ -56,12 +56,15 @@ batch_init(struct fd_batch *batch)
batch->draw = fd_ringbuffer_new(ctx->pipe, size);
if (!batch->nondraw) {
- batch->binning = fd_ringbuffer_new(ctx->pipe, size);
batch->gmem = fd_ringbuffer_new(ctx->pipe, size);
fd_ringbuffer_set_parent(batch->gmem, NULL);
fd_ringbuffer_set_parent(batch->draw, batch->gmem);
- fd_ringbuffer_set_parent(batch->binning, batch->gmem);
+
+ if (ctx->screen->gpu_id < 600) {
+ batch->binning = fd_ringbuffer_new(ctx->pipe, size);
+ fd_ringbuffer_set_parent(batch->binning, batch->gmem);
+ }
} else {
fd_ringbuffer_set_parent(batch->draw, NULL);
}
@@ -131,7 +134,8 @@ batch_fini(struct fd_batch *batch)
fd_ringbuffer_del(batch->draw);
if (!batch->nondraw) {
- fd_ringbuffer_del(batch->binning);
+ if (batch->binning)
+ fd_ringbuffer_del(batch->binning);
fd_ringbuffer_del(batch->gmem);
} else {
debug_assert(!batch->binning);