summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/ir3/ir3.h
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2017-10-30 19:24:59 -0400
committerRob Clark <[email protected]>2017-11-12 12:28:59 -0500
commit6da513007474ddee48edf256e435a0fa7a65335d (patch)
treeb9627059f5b8055f60d7c2c4d2eae737471c0a86 /src/gallium/drivers/freedreno/ir3/ir3.h
parent33f5f63b8fc157fa2fd2a142783f31db987c9d55 (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.h15
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.. */