From: Rob Clark Date: Sat, 13 Oct 2018 16:34:09 +0000 (-0400) Subject: freedreno: fix off-by-one error in BEGIN_RING() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cbf9fe50b5f848c6be380ab37cf034618c9a851e;p=mesa.git freedreno: fix off-by-one error in BEGIN_RING() Signed-off-by: Rob Clark --- diff --git a/src/gallium/drivers/freedreno/freedreno_util.h b/src/gallium/drivers/freedreno/freedreno_util.h index 30e3c6a735f..6b9da675300 100644 --- a/src/gallium/drivers/freedreno/freedreno_util.h +++ b/src/gallium/drivers/freedreno/freedreno_util.h @@ -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); }