From: Axel Davy Date: Sun, 28 Dec 2014 13:42:33 +0000 (+0100) Subject: st/nine: Implement TEXDP3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09eb1e901f4d8e8b18675eb92e5f43dcbd831501;p=mesa.git st/nine: Implement TEXDP3 Reviewed-by: Ilia Mirkin Signed-off-by: Axel Davy Cc: "10.4" --- diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index 027f5ba036d..0585362619d 100644 --- a/src/gallium/state_trackers/nine/nine_shader.c +++ b/src/gallium/state_trackers/nine/nine_shader.c @@ -2252,7 +2252,17 @@ DECL_SPECIAL(TEXM3x2DEPTH) DECL_SPECIAL(TEXDP3) { - STUB(D3DERR_INVALIDCALL); + struct ureg_program *ureg = tx->ureg; + struct ureg_dst dst = tx_dst_param(tx, &tx->insn.dst[0]); + const int m = tx->insn.dst[0].idx; + const int n = tx->insn.src[0].idx; + assert(m >= 0 && m > n); + + tx_texcoord_alloc(tx, m); + + ureg_DP3(ureg, dst, tx->regs.vT[m], ureg_src(tx->regs.tS[n])); + + return D3D_OK; } DECL_SPECIAL(TEXM3x3)