*/
OPC_META_TEX_PREFETCH = _OPC(-1, 4),
+ /* Parallel copies have multiple destinations, and copy each destination
+ * to its corresponding source. This happens "in parallel," meaning that
+ * it happens as-if every source is read first and then every destination
+ * is stored. These are produced in RA when register shuffling is
+ * required, and then lowered away immediately afterwards.
+ */
+ OPC_META_PARALLEL_COPY = _OPC(-1, 5),
+ OPC_META_PHI = _OPC(-1, 6),
} opc_t;
#define opc_cat(opc) ((int)((opc) >> NOPC_BITS))
unsigned *outidxs;
} end;
struct {
+ /* used to temporarily hold reference to nir_phi_instr
+ * until we resolve the phi srcs
+ */
+ void *nphi;
+ } phi;
+ struct {
unsigned samp, tex;
unsigned input_offset;
unsigned samp_base : 3;
if (is_meta(instr)) {
switch (instr->opc) {
case OPC_META_INPUT: printf("_meta:in"); break;
- case OPC_META_SPLIT: printf("_meta:split"); break;
- case OPC_META_COLLECT: printf("_meta:collect"); break;
- case OPC_META_TEX_PREFETCH: printf("_meta:tex_prefetch"); break;
+ case OPC_META_SPLIT: printf("_meta:split"); break;
+ case OPC_META_COLLECT: printf("_meta:collect"); break;
+ case OPC_META_TEX_PREFETCH: printf("_meta:tex_prefetch"); break;
+ case OPC_META_PARALLEL_COPY: printf("_meta:parallel_copy"); break;
+ case OPC_META_PHI: printf("_meta:phi"); break;
/* shouldn't hit here.. just for debugging: */
default: printf("_meta:%d", instr->opc); break;