Mesa (master): freedreno/a5xx: Fix indirect draw max_indices calculation

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 11 06:37:50 UTC 2019


Module: Mesa
Branch: master
Commit: 3fb7b1fd350246c09ef014a9fb8a04728d66e88a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3fb7b1fd350246c09ef014a9fb8a04728d66e88a

Author: Eduardo Lima Mitev <elima at igalia.com>
Date:   Mon Jun 10 23:27:22 2019 +0200

freedreno/a5xx: Fix indirect draw max_indices calculation

The number of elements to draw should not be affected by the offset.

A similar fix was submitted for a6xx at 79180a05.

Fixes these dEQP tests on a5xx:

dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_separate_grid_500x500_drawcount_8
dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_separate_grid_500x500_drawcount_2500
dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_separate_grid_500x500_drawcount_2500
dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawarrays_combined_grid_500x500_drawcount_2500
dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_combined_grid_500x500_drawcount_8
dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements_combined_grid_500x500_drawcount_2500

Reviewed-by: Rob Clark <robdclark at gmail.com>

---

 src/gallium/drivers/freedreno/a5xx/fd5_draw.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_draw.h b/src/gallium/drivers/freedreno/a5xx/fd5_draw.h
index c0d50b29cfd..119ecd4d3ad 100644
--- a/src/gallium/drivers/freedreno/a5xx/fd5_draw.h
+++ b/src/gallium/drivers/freedreno/a5xx/fd5_draw.h
@@ -98,8 +98,7 @@ 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->indirect->offset) /
-					info->index_size;
+			unsigned max_indicies = idx->width0 / info->index_size;
 
 			OUT_PKT7(ring, CP_DRAW_INDX_INDIRECT, 6);
 			OUT_RINGP(ring, DRAW4(primtype, DI_SRC_SEL_DMA,




More information about the mesa-commit mailing list