summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2014-12-03 15:58:34 +0100
committerEmil Velikov <[email protected]>2015-01-22 22:16:21 +0000
commit8bbc5e27810a005b8e0c89ab1016a5ba6cff73d2 (patch)
tree06262d41436aa8bee8bef8c46240900d43a4c629 /src/gallium/state_trackers/nine
parent3ca67f881040b4f3ecdf9b91a7f3f0bf51cf1544 (diff)
st/nine: Remove duplicated code for ps texcoord input declaration
Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: David Heidelberg <[email protected]> Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine')
-rw-r--r--src/gallium/state_trackers/nine/nine_shader.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c
index 9d44598f173..bd695039e33 100644
--- a/src/gallium/state_trackers/nine/nine_shader.c
+++ b/src/gallium/state_trackers/nine/nine_shader.c
@@ -2057,8 +2057,7 @@ DECL_SPECIAL(TEXCOORD)
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;
@@ -2070,8 +2069,7 @@ DECL_SPECIAL(TEXCOORD_ps14)
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;
@@ -2170,8 +2168,7 @@ DECL_SPECIAL(TEXM3x3)
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]));
@@ -2255,8 +2252,7 @@ DECL_SPECIAL(TEX)
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);