summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2013-09-11 10:06:29 -0400
committerRob Clark <robclark@freedesktop.org>2013-09-14 13:31:58 -0400
commitd7be322410887b94fe1ddc37a6ae63ea20721467 (patch)
tree1dde5bdf13ffd2f963148b2d64b9db47aee6b323
parentc756a3ef70ad3f020f50950bcf30f8423470478d (diff)
freedreno/a3xx: fix VFD_INDEX_MAX overflow
max_index may be 0xffffffff. The hardware does not need 1 + max_index (although it does not hurt unless max_index wraps around to zero). Signed-off-by: Rob Clark <robclark@freedesktop.org>
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_draw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c
index e1f8067501..85c7441a84 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c
@@ -84,7 +84,7 @@ fd3_draw(struct fd_context *ctx, const struct pipe_draw_info *info)
OUT_PKT0(ring, REG_A3XX_VFD_INDEX_MIN, 4);
OUT_RING(ring, info->min_index); /* VFD_INDEX_MIN */
- OUT_RING(ring, info->max_index + 1); /* VFD_INDEX_MAX */
+ OUT_RING(ring, info->max_index); /* VFD_INDEX_MAX */
OUT_RING(ring, info->start_instance); /* VFD_INSTANCEID_OFFSET */
OUT_RING(ring, info->start); /* VFD_INDEX_OFFSET */