const unsigned s = tx->insn.dst[0].idx;
struct ureg_dst dst = tx_dst_param(tx, &tx->insn.dst[0]);
- if (ureg_src_is_undef(tx->regs.vT[s]))
- tx->regs.vT[s] = ureg_DECL_fs_input(ureg, tx->texcoord_sn, s, TGSI_INTERPOLATE_PERSPECTIVE);
+ tx_texcoord_alloc(tx, s);
ureg_MOV(ureg, dst, tx->regs.vT[s]); /* XXX is this sufficient ? */
return D3D_OK;
const unsigned s = tx->insn.src[0].idx;
struct ureg_dst dst = tx_dst_param(tx, &tx->insn.dst[0]);
- if (ureg_src_is_undef(tx->regs.vT[s]))
- tx->regs.vT[s] = ureg_DECL_fs_input(ureg, tx->texcoord_sn, s, TGSI_INTERPOLATE_PERSPECTIVE);
+ tx_texcoord_alloc(tx, s);
ureg_MOV(ureg, dst, tx->regs.vT[s]); /* XXX is this sufficient ? */
return D3D_OK;
assert(m >= 0 && m > n);
for (s = m; s <= (m + 2); ++s) {
- if (ureg_src_is_undef(tx->regs.vT[s]))
- tx->regs.vT[s] = ureg_DECL_fs_input(ureg, tx->texcoord_sn, s, TGSI_INTERPOLATE_PERSPECTIVE);
+ tx_texcoord_alloc(tx, s);
src[s] = tx->regs.vT[s];
}
ureg_DP3(ureg, ureg_writemask(dst, TGSI_WRITEMASK_X), src[0], ureg_src(tx->regs.tS[n]));
struct ureg_dst dst = tx_dst_param(tx, &tx->insn.dst[0]);
struct ureg_src src[2];
- if (ureg_src_is_undef(tx->regs.vT[s]))
- tx->regs.vT[s] = ureg_DECL_fs_input(ureg, tx->texcoord_sn, s, TGSI_INTERPOLATE_PERSPECTIVE);
+ tx_texcoord_alloc(tx, s);
src[0] = tx->regs.vT[s];
src[1] = ureg_DECL_sampler(ureg, s);