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 <hoegsberg@google.com>
Acked-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
Kristian H. Kristensen 2019-10-22 19:26:30 -07:00
parent 581cd59692
commit e16e48d00c
1 changed files with 3 additions and 1 deletions

View 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;