diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index c23cb32dc26..f39c00e186c 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -1608,6 +1608,11 @@ agx_set_st_vary_final(agx_context *ctx) return; } } + + /* If we got here, there was no varying written. We need to mark that. */ + agx_block *last_block = list_last_entry(&ctx->blocks, agx_block, link); + agx_builder _b = agx_init_builder(ctx, agx_after_block_logical(last_block)); + agx_no_varyings(&_b); } static int @@ -1885,7 +1890,7 @@ agx_compile_function_nir(nir_shader *nir, nir_function_impl *impl, agx_ra(ctx); agx_lower_64bit_postra(ctx); - if (ctx->stage == MESA_SHADER_VERTEX) + if (ctx->stage == MESA_SHADER_VERTEX && !impl->function->is_preamble) agx_set_st_vary_final(ctx); agx_lower_pseudo(ctx); diff --git a/src/asahi/compiler/agx_opcodes.py b/src/asahi/compiler/agx_opcodes.py index 3c97e24a8db..01898f3c7e9 100644 --- a/src/asahi/compiler/agx_opcodes.py +++ b/src/asahi/compiler/agx_opcodes.py @@ -294,6 +294,7 @@ op("convert", (0x3E | L, 0x7F | L | (0x3 << 38), 6, _), srcs = 2, imms = [ROUND] op("iter", (0x21, 0xBF, 8, _), srcs = 2, imms = [CHANNELS, PERSPECTIVE]) op("ldcf", (0xA1, 0xBF, 8, _), srcs = 1, imms = [CHANNELS]) op("st_vary", None, dests = 0, srcs = 2, can_eliminate = False) +op("no_varyings", (0x80000051, 0xFFFFFFFF, 4, _), dests = 0, can_eliminate = False) op("stop", (0x88, 0xFFFF, 2, _), dests = 0, can_eliminate = False) op("trap", (0x08, 0xFFFF, 2, _), dests = 0, can_eliminate = False) op("writeout", (0x48, 0xFF, 4, _), dests = 0, imms = [WRITEOUT], can_eliminate = False)