summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_util.h
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-07-17 09:54:23 -0400
committerRob Clark <[email protected]>2018-07-17 11:00:00 -0400
commit20f677f6bccdabafbffd0d8e948514dda0acb3f4 (patch)
tree7c7bfa11a69c6015cacbec58c63c5f60e0dc96e3 /src/gallium/drivers/freedreno/freedreno_util.h
parent15f6c0509a8b6928a94023e095e08419cf1fe589 (diff)
freedreno: get rid of noop render
This was basically to avoid a zero-dword IB (indirect-branch), but instead just don't emit the IB packet in that case. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_util.h')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h
index cdac08be6e2..d8dec0151d0 100644
--- a/src/gallium/drivers/freedreno/freedreno_util.h
+++ b/src/gallium/drivers/freedreno/freedreno_util.h
@@ -355,6 +355,9 @@ OUT_WFI5(struct fd_ringbuffer *ring)
static inline void
__OUT_IB(struct fd_ringbuffer *ring, bool prefetch, struct fd_ringbuffer *target)
{
+ if (target->cur == target->start)
+ return;
+
unsigned count = fd_ringbuffer_cmd_count(target);
debug_assert(__gpu_id(ring) < 500);
@@ -382,6 +385,9 @@ __OUT_IB(struct fd_ringbuffer *ring, bool prefetch, struct fd_ringbuffer *target
static inline void
__OUT_IB5(struct fd_ringbuffer *ring, struct fd_ringbuffer *target)
{
+ if (target->cur == target->start)
+ return;
+
unsigned count = fd_ringbuffer_cmd_count(target);
for (unsigned i = 0; i < count; i++) {