freedreno/ir3: End TES with chsh when using GS
authorKristian H. Kristensen <hoegsberg@google.com>
Wed, 23 Oct 2019 02:26:30 +0000 (19:26 -0700)
committerKristian H. Kristensen <hoegsberg@google.com>
Fri, 8 Nov 2019 00:37:05 +0000 (16:37 -0800)
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 <hoegsberg@google.com>
Acked-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Rob Clark <robdclark@gmail.com>
src/freedreno/ir3/ir3_compiler_nir.c

index f4e9433..8ed5b2f 100644 (file)
@@ -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;