aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2020-06-25 12:32:24 +0200
committerMarge Bot <[email protected]>2020-06-26 10:05:24 +0000
commit1288613f1c7cb17d49bd093e1339d32fcd0cd9cb (patch)
tree3f9104ab5508445d4615cdd53dd44b0295cb640f /src/gallium/drivers/freedreno
parentba5e1c5310f3954aae803fe82814b22a86beeef7 (diff)
freedreno/a6xx: use firstIndex field
Analogous to the turnip change. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5644>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_draw.c5
1 files 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 {