freedreno: fix off-by-one error in BEGIN_RING()
authorRob Clark <robdclark@gmail.com>
Sat, 13 Oct 2018 16:34:09 +0000 (12:34 -0400)
committerRob Clark <robdclark@gmail.com>
Wed, 17 Oct 2018 16:44:48 +0000 (12:44 -0400)
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_util.h

index 30e3c6a735fef456a57f94f414fc2c338206e148..6b9da6753009ade1dc799e86e05a1bce37dbbd6f 100644 (file)
@@ -274,7 +274,7 @@ OUT_RB(struct fd_ringbuffer *ring, struct fd_ringbuffer *target)
 
 static inline void BEGIN_RING(struct fd_ringbuffer *ring, uint32_t ndwords)
 {
-       if (ring->cur + ndwords >= ring->end)
+       if (ring->cur + ndwords > ring->end)
                fd_ringbuffer_grow(ring, ndwords);
 }