From e16e48d00c84588c6ef5fcb87e375a1afd6fef74 Mon Sep 17 00:00:00 2001 From: "Kristian H. Kristensen" Date: Tue, 22 Oct 2019 19:26:30 -0700 Subject: [PATCH] freedreno/ir3: End TES with chsh when using GS When we have both TES and GS, the TES needs to chain to the VS with chmask and chsh GS just like the VS does to either TCS or GS. Signed-off-by: Kristian H. Kristensen Acked-by: Eric Anholt Reviewed-by: Rob Clark --- src/freedreno/ir3/ir3_compiler_nir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index f4e94332a2a..8ed5b2f91fa 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -2598,7 +2598,9 @@ emit_function(struct ir3_context *ctx, nir_function_impl *impl) * be read by the HS. Then it resets execution mask (chmask) and chains * to the next shader (chsh). */ - if (ctx->so->type == MESA_SHADER_VERTEX && ctx->so->key.has_gs) { + if ((ctx->so->type == MESA_SHADER_VERTEX && + (ctx->so->key.has_gs || ctx->so->key.tessellation)) || + (ctx->so->type == MESA_SHADER_TESS_EVAL && ctx->so->key.has_gs)) { struct ir3_instruction *chmask = ir3_CHMASK(ctx->block); chmask->barrier_class = IR3_BARRIER_EVERYTHING;