diff options
author | Rob Clark <[email protected]> | 2017-11-22 09:45:28 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2017-12-03 14:17:40 -0500 |
commit | ef6313ffd3c0e764142ed2df87b52264bd7d4188 (patch) | |
tree | 34f80cc19b2ba76a5118c0ab1227ff0dbda01b5c /src | |
parent | e19c623128ef07c778f5f587864361c1ff383695 (diff) |
freedreno/a5xx: correct max_indicies for indirect draws
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/freedreno/a5xx/fd5_draw.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_draw.h b/src/gallium/drivers/freedreno/a5xx/fd5_draw.h index d1069157e75..3edfc391fdf 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_draw.h +++ b/src/gallium/drivers/freedreno/a5xx/fd5_draw.h @@ -97,7 +97,8 @@ fd5_draw_emit(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 - info->indirect->offset) / + info->index_size; OUT_PKT7(ring, CP_DRAW_INDX_INDIRECT, 6); OUT_RINGP(ring, DRAW4(primtype, DI_SRC_SEL_DMA, |