From 1c6f34f6118a68c42fe4eb203066e8f2c17aab3e Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sat, 17 Apr 2021 18:09:41 -0400 Subject: [PATCH] agx: Set flag on last st_vary instruction Not sure what the point is but let's match the blob. Signed-off-by: Alyssa Rosenzweig Acked-by: Jason Ekstrand Acked-by: Bas Nieuwenhuizen Part-of: --- src/asahi/compiler/agx_compile.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index 51ad0ab7144..c460a655b7c 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -556,6 +556,17 @@ emit_cf_list(agx_context *ctx, struct exec_list *list) return start_block; } +static void +agx_set_st_vary_final(agx_context *ctx) +{ + agx_foreach_instr_global_rev(ctx, I) { + if (I->op == AGX_OPCODE_ST_VARY) { + I->last = true; + return; + } + } +} + static void agx_print_stats(agx_context *ctx, unsigned size, FILE *fp) { @@ -797,6 +808,9 @@ agx_compile_shader_nir(nir_shader *nir, agx_ra(ctx); + if (ctx->stage == MESA_SHADER_VERTEX) + agx_set_st_vary_final(ctx); + if (agx_debug & AGX_DBG_SHADERS && !skip_internal) agx_print_shader(ctx, stdout);