[Mesa-dev] [PATCH 8/8] radeonsi/gfx9: simplify condition for on-chip ESGS

Nicolai Hähnle nhaehnle at gmail.com
Tue Nov 21 15:03:28 UTC 2017


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

---
 src/gallium/drivers/radeonsi/si_shader.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index 61adb6b1dcc..898e2f89514 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -4727,23 +4727,21 @@ static void create_function(struct si_shader_context *ctx)
 
 	for (; i < fninfo.num_params; ++i)
 		shader->info.num_input_vgprs += ac_get_type_size(fninfo.types[i]) / 4;
 
 	assert(shader->info.num_input_vgprs >= num_prolog_vgprs);
 	shader->info.num_input_vgprs -= num_prolog_vgprs;
 
 	if (shader->key.as_ls ||
 	    ctx->type == PIPE_SHADER_TESS_CTRL ||
 	    /* GFX9 has the ESGS ring buffer in LDS. */
-	    (ctx->screen->b.chip_class >= GFX9 &&
-	     (shader->key.as_es ||
-	      ctx->type == PIPE_SHADER_GEOMETRY)))
+	    type == SI_SHADER_MERGED_VERTEX_OR_TESSEVAL_GEOMETRY)
 		ac_declare_lds_as_pointer(&ctx->ac);
 }
 
 /**
  * Load ESGS and GSVS ring buffer resource descriptors and save the variables
  * for later use.
  */
 static void preload_ring_buffers(struct si_shader_context *ctx)
 {
 	LLVMBuilderRef builder = ctx->ac.builder;
-- 
2.11.0



More information about the mesa-dev mailing list