diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-08-26 15:28:56 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-08-30 15:50:24 -0700 |
commit | cfd5bd2c7d114dd29f5bebdd12362a416d4d3bde (patch) | |
tree | 3786fbf6f721bb4364c4828493a5c1e417b5272d /src/panfrost | |
parent | d6e4e36566272288bc5f618ee2b7ae677bcf87dd (diff) |
pan/midgard: Document Midgard scheduling requirements
Oh boy. Midgard scheduling is crazy... These are all just the
requirements, not even the algorithm yet.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/midgard/midgard_schedule.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c index 8d055f086c9..98d5f1b03f7 100644 --- a/src/panfrost/midgard/midgard_schedule.c +++ b/src/panfrost/midgard/midgard_schedule.c @@ -26,6 +26,35 @@ #include "util/u_memory.h" #include "util/register_allocate.h" +/* Scheduling for Midgard is complicated, to say the least. ALU instructions + * must be grouped into VLIW bundles according to following model: + * + * [VMUL] [SADD] + * [VADD] [SMUL] [VLUT] + * + * A given instruction can execute on some subset of the units (or a few can + * execute on all). Instructions can be either vector or scalar; only scalar + * instructions can execute on SADD/SMUL units. Units on a given line execute + * in parallel. Subsequent lines execute separately and can pass results + * directly via pipeline registers r24/r25, bypassing the register file. + * + * A bundle can optionally have 128-bits of embedded constants, shared across + * all of the instructions within a bundle. + * + * Instructions consuming conditionals (branches and conditional selects) + * require their condition to be written into the conditional register (r31) + * within the same bundle they are consumed. + * + * Fragment writeout requires its argument to be written in full within the + * same bundle as the branch, with no hanging dependencies. + * + * Load/store instructions are also in bundles of simply two instructions, and + * texture instructions have no bundling. + * + * ------------------------------------------------------------------------- + * + */ + /* Create a mask of accessed components from a swizzle to figure out vector * dependencies */ |