diff --git a/src/asahi/compiler/agx_compiler.h b/src/asahi/compiler/agx_compiler.h index 02030f09ac6..03f9e9b7d55 100644 --- a/src/asahi/compiler/agx_compiler.h +++ b/src/asahi/compiler/agx_compiler.h @@ -278,6 +278,9 @@ typedef struct { * scoreboarding (everything but memory load/store and texturing). */ unsigned scoreboard : 1; + /* Number of nested control flow layers to jump by */ + unsigned nest : 2; + /* Output modifiers */ bool saturate : 1; unsigned mask : 4; diff --git a/src/asahi/compiler/agx_opcodes.py b/src/asahi/compiler/agx_opcodes.py index b33c473f1ef..1f054901879 100644 --- a/src/asahi/compiler/agx_opcodes.py +++ b/src/asahi/compiler/agx_opcodes.py @@ -86,6 +86,7 @@ DIM = immediate("dim", "enum agx_dim") SCOREBOARD = immediate("scoreboard") ICOND = immediate("icond") FCOND = immediate("fcond") +NEST = immediate("nest") FUNOP = lambda x: (x << 28) FUNOP_MASK = FUNOP((1 << 14) - 1) diff --git a/src/asahi/compiler/agx_print.c b/src/asahi/compiler/agx_print.c index 58c240c1d0a..b471f3aa5a0 100644 --- a/src/asahi/compiler/agx_print.c +++ b/src/asahi/compiler/agx_print.c @@ -167,6 +167,15 @@ agx_print_instr(agx_instr *I, FILE *fp) fprintf(fp, "slot %u", I->scoreboard); } + if (info.immediates & AGX_IMMEDIATE_NEST) { + if (print_comma) + fprintf(fp, ", "); + else + print_comma = true; + + fprintf(fp, "n=%u", I->nest); + } + fprintf(fp, "\n"); }