diff options
author | Rob Clark <[email protected]> | 2017-10-30 19:24:59 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2017-11-12 12:28:59 -0500 |
commit | 6da513007474ddee48edf256e435a0fa7a65335d (patch) | |
tree | b9627059f5b8055f60d7c2c4d2eae737471c0a86 /src/gallium/drivers/freedreno/ir3/ir3.h | |
parent | 33f5f63b8fc157fa2fd2a142783f31db987c9d55 (diff) |
freedreno/ir3: add cat7 instructions
Needed for memory and execution barriers.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3/ir3.h')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3.h b/src/gallium/drivers/freedreno/ir3/ir3.h index de7a2a88733..25fddbf00f4 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3.h +++ b/src/gallium/drivers/freedreno/ir3/ir3.h @@ -228,6 +228,12 @@ struct ir3_instruction { int dst_offset; int iim_val; /* for ldgb/stgb, # of components */ } cat6; + struct { + unsigned w : 1; /* write */ + unsigned r : 1; /* read */ + unsigned l : 1; /* local */ + unsigned g : 1; /* global */ + } cat7; /* for meta-instructions, just used to hold extra data * before instruction scheduling, etc */ @@ -605,6 +611,11 @@ static inline bool is_mem(struct ir3_instruction *instr) return (opc_cat(instr->opc) == 6); } +static inline bool is_barrier(struct ir3_instruction *instr) +{ + return (opc_cat(instr->opc) == 7); +} + static inline bool is_store(struct ir3_instruction *instr) { @@ -1179,6 +1190,10 @@ INSTR4(ATOMIC_AND); INSTR4(ATOMIC_OR); INSTR4(ATOMIC_XOR); +/* cat7 instructions: */ +INSTR0(BAR); +INSTR0(FENCE); + /* ************************************************************************* */ /* split this out or find some helper to use.. like main/bitset.h.. */ |