agx: Add nest field to IR
Needed to model control flow instructions. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11023>
This commit is contained in:

committed by
Alyssa Rosenzweig

parent
6f54385b0a
commit
21cf528e76
@@ -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;
|
||||
|
@@ -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)
|
||||
|
@@ -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");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user