[Mesa-dev] [PATCH] r600: don't emit vfetch if tess eval isn't accessing any inputs.

Dave Airlie airlied at gmail.com
Wed Nov 15 01:25:16 UTC 2017


From: Dave Airlie <airlied at redhat.com>

This should avoid emitting anything in the shader if we aren't
accessing any inputs.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/gallium/drivers/r600/r600_shader.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index 625537b48b..95a4c05e81 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -3167,7 +3167,8 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
 		vs_add_primid_output(&ctx, key.vs.prim_id_out);
 
 	if (ctx.type == PIPE_SHADER_TESS_EVAL)
-		r600_fetch_tess_io_info(&ctx);
+		if (ctx.info.num_inputs)
+			r600_fetch_tess_io_info(&ctx);
 
 	while (!tgsi_parse_end_of_tokens(&ctx.parse)) {
 		tgsi_parse_token(&ctx.parse);
-- 
2.14.3



More information about the mesa-dev mailing list