[Mesa-dev] [PATCH v2 25/25] radeonsi: shrink the GSVS ring to account for the reduced item sizes

Nicolai Hähnle nhaehnle at gmail.com
Tue Dec 6 10:48:36 UTC 2016


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

---
 src/gallium/drivers/radeonsi/si_state_shaders.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 151ed17..4a7f638 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1954,21 +1954,21 @@ static bool si_update_gs_ring_buffers(struct si_context *sctx)
 	unsigned max_size = ((unsigned)(63.999 * 1024 * 1024) & ~255) * num_se;
 
 	/* Calculate the minimum size. */
 	unsigned min_esgs_ring_size = align(es->esgs_itemsize * gs_vertex_reuse *
 					    wave_size, alignment);
 
 	/* These are recommended sizes, not minimum sizes. */
 	unsigned esgs_ring_size = max_gs_waves * 2 * wave_size *
 				  es->esgs_itemsize * gs->gs_input_verts_per_prim;
 	unsigned gsvs_ring_size = max_gs_waves * 2 * wave_size *
-				  gs->max_gsvs_emit_size * (gs->max_gs_stream + 1);
+				  gs->max_gsvs_emit_size;
 
 	min_esgs_ring_size = align(min_esgs_ring_size, alignment);
 	esgs_ring_size = align(esgs_ring_size, alignment);
 	gsvs_ring_size = align(gsvs_ring_size, alignment);
 
 	esgs_ring_size = CLAMP(esgs_ring_size, min_esgs_ring_size, max_size);
 	gsvs_ring_size = MIN2(gsvs_ring_size, max_size);
 
 	/* Some rings don't have to be allocated if shaders don't use them.
 	 * (e.g. no varyings between ES and GS or GS and VS)
-- 
2.7.4



More information about the mesa-dev mailing list