return (instr->category == 5);
}
+static inline bool is_mem(struct ir3_instruction *instr)
+{
+ return (instr->category == 6);
+}
+
static inline bool is_input(struct ir3_instruction *instr)
{
return (instr->category == 2) && (instr->opc == OPC_BARY_F);
void ir3_block_legalize(struct ir3_block *block,
bool *has_samp, int *max_bary);
-#ifndef ARRAY_SIZE
-# define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-#endif
/* ************************************************************************* */
/* split this out or find some helper to use.. like main/bitset.h.. */
return 6;
/* handled via sync flags: */
- if (is_sfu(assigner) || is_tex(assigner))
+ if (is_sfu(assigner) || is_tex(assigner) || is_mem(assigner))
return 0;
/* assigner must be alu: */
*/
ctx->has_samp = true;
regmask_set(&needs_sy, n->regs[0]);
+ } else if (is_mem(n)) {
+ regmask_set(&needs_sy, n->regs[0]);
}
/* both tex/sfu appear to not always immediately consume