diff options
author | Marek Olšák <[email protected]> | 2017-08-19 20:25:08 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-08-22 16:42:17 +0200 |
commit | 497506ad93d737db0c75f512626df2ae82c27560 (patch) | |
tree | af19e9b67d6fdac75576f4928bf2aa7405c7045a /src/gallium/state_trackers/nine | |
parent | 33efa6416f6ec58a5ec535c4c11501850514d5e7 (diff) |
gallium: remove TGSI opcode SCS
use COS+SIN instead.
Reviewed-by: Roland Scheidegger <[email protected]>
Acked-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine')
-rw-r--r-- | src/gallium/state_trackers/nine/nine_shader.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/nine/nine_shader.c b/src/gallium/state_trackers/nine/nine_shader.c index 50750cb547b..5b60dcbac8f 100644 --- a/src/gallium/state_trackers/nine/nine_shader.c +++ b/src/gallium/state_trackers/nine/nine_shader.c @@ -1784,13 +1784,17 @@ DECL_SPECIAL(LABEL) DECL_SPECIAL(SINCOS) { + struct ureg_program *ureg = tx->ureg; struct ureg_dst dst = tx_dst_param(tx, &tx->insn.dst[0]); struct ureg_src src = tx_src_param(tx, &tx->insn.src[0]); assert(!(dst.WriteMask & 0xc)); - dst.WriteMask &= TGSI_WRITEMASK_XY; /* z undefined, w untouched */ - ureg_SCS(tx->ureg, dst, src); + /* z undefined, w untouched */ + ureg_COS(ureg, ureg_writemask(dst, TGSI_WRITEMASK_X), + ureg_scalar(src, TGSI_SWIZZLE_X)); + ureg_SIN(ureg, ureg_writemask(dst, TGSI_WRITEMASK_Y), + ureg_scalar(src, TGSI_SWIZZLE_X)); return D3D_OK; } @@ -2943,8 +2947,8 @@ struct sm1_op_info inst_table[] = _OPI(ABS, NOP, V(0,0), V(3,0), V(0,0), V(3,0), 1, 1, SPECIAL(ABS)), _OPI(NRM, NOP, V(0,0), V(3,0), V(0,0), V(3,0), 1, 1, SPECIAL(NRM)), /* NRM doesn't fit */ - _OPI(SINCOS, SCS, V(2,0), V(2,1), V(2,0), V(2,1), 1, 3, SPECIAL(SINCOS)), - _OPI(SINCOS, SCS, V(3,0), V(3,0), V(3,0), V(3,0), 1, 1, SPECIAL(SINCOS)), + _OPI(SINCOS, NOP, V(2,0), V(2,1), V(2,0), V(2,1), 1, 3, SPECIAL(SINCOS)), + _OPI(SINCOS, NOP, V(3,0), V(3,0), V(3,0), V(3,0), 1, 1, SPECIAL(SINCOS)), /* More flow control */ _OPI(REP, NOP, V(2,0), V(3,0), V(2,1), V(3,0), 0, 1, SPECIAL(REP)), |