[Mesa-dev] [PATCH 13/14] radeonsi: bump MAX_GS_INVOCATIONS

Marek Olšák maraeo at gmail.com
Wed Aug 8 23:55:22 UTC 2018


From: Marek Olšák <marek.olsak at amd.com>

same as the closed driver
---
 src/gallium/drivers/radeonsi/si_get.c           | 4 +++-
 src/gallium/drivers/radeonsi/si_state_shaders.c | 2 --
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c
index b8ad84f3613..41b9cad071b 100644
--- a/src/gallium/drivers/radeonsi/si_get.c
+++ b/src/gallium/drivers/radeonsi/si_get.c
@@ -286,21 +286,23 @@ static int si_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
 	case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
 	case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
 		return 32*4;
 
 	/* Geometry shader output. */
 	case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES:
 		return 1024;
 	case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS:
 		return 4095;
 	case PIPE_CAP_MAX_GS_INVOCATIONS:
-		return 32;
+		/* The closed driver exposes 127, but 125 is the greatest
+		 * number that works. */
+		return 125;
 
 	case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE:
 		return 2048;
 
 	/* Texturing. */
 	case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
 	case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
 		return 15; /* 16384 */
 	case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
 		/* textures support 8192, but layered rendering supports 2048 */
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index de33d250301..5b39d4a1e37 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -651,22 +651,20 @@ static void gfx9_get_gs_info(struct si_shader_selector *es,
 	const unsigned esgs_itemsize = es->esgs_itemsize / 4;
 	unsigned esgs_lds_size;
 
 	/* All these are per subgroup: */
 	const unsigned max_out_prims = 32 * 1024;
 	const unsigned max_es_verts = 255;
 	const unsigned ideal_gs_prims = 64;
 	unsigned max_gs_prims, gs_prims;
 	unsigned min_es_verts, es_verts, worst_case_es_verts;
 
-	assert(gs_num_invocations <= 32); /* GL maximum */
-
 	if (uses_adjacency || gs_num_invocations > 1)
 		max_gs_prims = 127 / gs_num_invocations;
 	else
 		max_gs_prims = 255;
 
 	/* MAX_PRIMS_PER_SUBGROUP = gs_prims * max_vert_out * gs_invocations.
 	 * Make sure we don't go over the maximum value.
 	 */
 	if (gs->gs_max_out_vertices > 0) {
 		max_gs_prims = MIN2(max_gs_prims,
-- 
2.17.1



More information about the mesa-dev mailing list