diff options
author | Rob Clark <[email protected]> | 2018-09-06 07:52:01 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2018-09-27 15:25:49 -0400 |
commit | a7fa44cd33378c6058b8069e6edcae1963c96bd3 (patch) | |
tree | c8235ee341de7a02a0bc420b9e31dfebb4beed14 /src/gallium/drivers/freedreno/freedreno_batch.c | |
parent | 83c5c026ee66ccdcc2e31c1b54c1b70e4309092e (diff) |
freedreno: fix FD_MESA_DEBUG=flush
The logic to force a flush every draw was short-circuited with newer
kernels. Also it should apply to clears as well.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_batch.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_batch.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c index ff8298e82a1..8dc0d7c612a 100644 --- a/src/gallium/drivers/freedreno/freedreno_batch.c +++ b/src/gallium/drivers/freedreno/freedreno_batch.c @@ -483,12 +483,16 @@ fd_batch_check_size(struct fd_batch *batch) { debug_assert(!batch->flushed); + if (unlikely(fd_mesa_debug & FD_DBG_FLUSH)) { + fd_batch_flush(batch, true, false); + return; + } + if (fd_device_version(batch->ctx->screen->dev) >= FD_VERSION_UNLIMITED_CMDS) return; struct fd_ringbuffer *ring = batch->draw; - if (((ring->cur - ring->start) > (ring->size/4 - 0x1000)) || - (fd_mesa_debug & FD_DBG_FLUSH)) + if ((ring->cur - ring->start) > (ring->size/4 - 0x1000)) fd_batch_flush(batch, true, false); } |