diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-03-02 21:45:47 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-05 14:35:38 +0000 |
commit | 6a7987aba10aaf05fbe678b3f3ccf5882b687aea (patch) | |
tree | b4dca430ec2a43c0d24cacfc8c1ad10d92ec2c82 /src | |
parent | aa2f12de562e38b7b0e154c7d467aa1d85279a32 (diff) |
pan/bi: Pull out bifrost_load_var
We're not using this structure yet but we want everything in the ISA
ready for us.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>
Diffstat (limited to 'src')
-rw-r--r-- | src/panfrost/bifrost/bifrost.h | 20 | ||||
-rw-r--r-- | src/panfrost/bifrost/disassemble.c | 8 |
2 files changed, 24 insertions, 4 deletions
diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h index 237b99e93d6..50bcc92bebb 100644 --- a/src/panfrost/bifrost/bifrost.h +++ b/src/panfrost/bifrost/bifrost.h @@ -184,6 +184,26 @@ struct bifrost_ld_attr { unsigned op : 5; }; +enum bifrost_interp_mode { + BIFROST_INTERP_PER_FRAG = 0x0, + BIFROST_INTERP_CENTROID = 0x1, + BIFROST_INTERP_DEFAULT = 0x2, + BIFROST_INTERP_EXPLICIT = 0x3 +}; + +struct bifrost_ld_var { + unsigned src0 : 3; + + /* If top two bits set, indirect with src in bottom three */ + unsigned addr : 5; + + unsigned channels : 2; /* MALI_POSITIVE */ + enum bifrost_interp_mode interp_mode : 2; + unsigned reuse : 1; + unsigned flat : 1; + unsigned op : 6; +}; + struct bifrost_tex_ctrl { unsigned sampler_index : 4; // also used to signal indirects unsigned tex_index : 7; diff --git a/src/panfrost/bifrost/disassemble.c b/src/panfrost/bifrost/disassemble.c index f16f96cd73b..19964d36a5d 100644 --- a/src/panfrost/bifrost/disassemble.c +++ b/src/panfrost/bifrost/disassemble.c @@ -1324,15 +1324,15 @@ static void dump_add(FILE *fp, uint64_t word, struct bifrost_regs regs, if (ADD.op & 0x400) fprintf(fp, ".flat"); switch ((ADD.op >> 7) & 0x3) { - case 0: + case BIFROST_INTERP_PER_FRAG: fprintf(fp, ".per_frag"); break; - case 1: + case BIFROST_INTERP_CENTROID: fprintf(fp, ".centroid"); break; - case 2: + case BIFROST_INTERP_DEFAULT: break; - case 3: + case BIFROST_INTERP_EXPLICIT: fprintf(fp, ".explicit"); break; } |