From 1288613f1c7cb17d49bd093e1339d32fcd0cd9cb Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Thu, 25 Jun 2020 12:32:24 +0200 Subject: [PATCH] freedreno/a6xx: use firstIndex field Analogous to the turnip change. Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_draw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c index fbad52204a7..d221009726e 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c @@ -82,16 +82,15 @@ draw_emit(struct fd_ringbuffer *ring, assert(!info->has_user_indices); struct pipe_resource *idx_buffer = info->index.resource; - uint32_t idx_offset = index_offset + info->start * info->index_size; unsigned max_indices = (idx_buffer->width0 - index_offset) / info->index_size; OUT_PKT(ring, CP_DRAW_INDX_OFFSET, pack_CP_DRAW_INDX_OFFSET_0(*draw0), CP_DRAW_INDX_OFFSET_1(.num_instances = info->instance_count), CP_DRAW_INDX_OFFSET_2(.num_indices = info->count), - CP_DRAW_INDX_OFFSET_3(0), + CP_DRAW_INDX_OFFSET_3(.first_indx = info->start), A5XX_CP_DRAW_INDX_OFFSET_INDX_BASE( - fd_resource(idx_buffer)->bo, idx_offset), + fd_resource(idx_buffer)->bo, index_offset), A5XX_CP_DRAW_INDX_OFFSET_6(.max_indices = max_indices) ); } else { -- 2.30.2