diff options
author | Rob Clark <[email protected]> | 2019-06-11 05:16:21 -0700 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-06-13 08:56:27 -0700 |
commit | 9f10e40cdee534f590e8331defdb13c6a880ccfa (patch) | |
tree | 72e0c92a04adf2a0abdd1891047d263119f6dbaa /src | |
parent | ce12ac8c2bc4114ffa9386a473fcf24df079fb1e (diff) |
freedreno/a6xx: fix MAX_INDICES
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_draw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c index edf4925a339..ff9e4bb036c 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.c @@ -50,13 +50,12 @@ draw_emit_indirect(struct fd_batch *batch, struct fd_ringbuffer *ring, if (info->index_size) { struct pipe_resource *idx = info->index.resource; - unsigned max_indicies = idx->width0 / info->index_size; + unsigned max_indicies = (idx->width0 - index_offset) / info->index_size; OUT_PKT7(ring, CP_DRAW_INDX_INDIRECT, 6); OUT_RINGP(ring, draw0, &batch->draw_patches); OUT_RELOC(ring, fd_resource(idx)->bo, index_offset, 0, 0); - // XXX: Check A5xx vs A6xx OUT_RING(ring, A5XX_CP_DRAW_INDX_INDIRECT_3_MAX_INDICES(max_indicies)); OUT_RELOC(ring, ind->bo, info->indirect->offset, 0, 0); } else { |