return n;
}
+static INLINE boolean
+is_gpr63(struct nv_value *val)
+{
+ return (val->reg.file == NV_FILE_GPR && val->reg.id == 63);
+}
+
struct nv_value *
nvc0_pc_find_constant(struct nv_ref *ref)
{
assert(!src->insn->src[0]->mod);
src = src->insn->src[0]->value;
}
- if ((src->reg.file == NV_FILE_IMM) ||
+ if ((src->reg.file == NV_FILE_IMM) || is_gpr63(src) ||
(src->insn &&
src->insn->opcode == NV_OP_LD &&
src->insn->src[0]->value->reg.file >= NV_FILE_MEM_C(0) &&
{
struct nv_value *src = nvc0_pc_find_constant(ref);
- return (src && src->reg.file == NV_FILE_IMM) ? src : NULL;
+ return (src && (src->reg.file == NV_FILE_IMM || is_gpr63(src))) ? src : NULL;
}
static void
return nvi;
}
-/*
-static boolean
-bld_is_constant(struct nv_value *val)
-{
- if (val->reg.file == NV_FILE_IMM)
- return TRUE;
- return val->insn && nvCG_find_constant(val->insn->src[0]);
-}
-*/
-
static void
bld_tex(struct bld_context *bld, struct nv_value *dst0[4],
const struct tgsi_full_instruction *insn)