}
static int
-sysval_for_instr(nir_instr *instr, unsigned *dest)
+sysval_for_instr(nir_instr *instr, nir_dest *dest)
{
nir_intrinsic_instr *intr;
nir_dest *dst = NULL;
}
if (dest && dst)
- *dest = nir_dest_index(dst);
+ *dest = *dst;
return sysval;
}
emit_sysval_read(compiler_context *ctx, nir_instr *instr, signed dest_override,
unsigned nr_components, unsigned offset)
{
- unsigned dest = 0;
+ nir_dest nir_dest;
/* Figure out which uniform this is */
- int sysval = sysval_for_instr(instr, &dest);
+ int sysval = sysval_for_instr(instr, &nir_dest);
void *val = _mesa_hash_table_u64_search(ctx->sysval_to_id, sysval);
+ unsigned dest = nir_dest_index(&nir_dest);
+
if (dest_override >= 0)
dest = dest_override;