diff options
author | Marek Olšák <[email protected]> | 2017-08-19 22:23:08 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-08-22 13:29:47 +0200 |
commit | 985e6b5ef91ec8de7ae5e03fcfb978ea6e8993ea (patch) | |
tree | dc0d1343692b0fd7889905db57dbe85c728554eb /src/gallium/drivers/nouveau | |
parent | 3e2ff8fade879cedfdff0e180a6996df1223a823 (diff) |
gallium: remove TGSI opcode XPD
use MUL+MAD+MOV instead.
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau')
5 files changed, 0 insertions, 39 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp index c06e74e2f81..a862f985fd4 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -346,14 +346,6 @@ unsigned int Instruction::srcMask(unsigned int s) const return mask; case TGSI_OPCODE_TXQ: return 1; - case TGSI_OPCODE_XPD: - { - unsigned int x = 0; - if (mask & 1) x |= 0x6; - if (mask & 2) x |= 0x5; - if (mask & 4) x |= 0x3; - return x; - } case TGSI_OPCODE_D2I: case TGSI_OPCODE_D2U: case TGSI_OPCODE_D2F: @@ -3347,25 +3339,6 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn) case TGSI_OPCODE_LIT: handleLIT(dst0); break; - case TGSI_OPCODE_XPD: - FOR_EACH_DST_ENABLED_CHANNEL(0, c, tgsi) { - if (c < 3) { - val0 = getSSA(); - src0 = fetchSrc(1, (c + 1) % 3); - src1 = fetchSrc(0, (c + 2) % 3); - mkOp2(OP_MUL, TYPE_F32, val0, src0, src1) - ->dnz = info->io.mul_zero_wins; - mkOp1(OP_NEG, TYPE_F32, val0, val0); - - src0 = fetchSrc(0, (c + 1) % 3); - src1 = fetchSrc(1, (c + 2) % 3); - mkOp3(OP_MAD, TYPE_F32, dst0[c], src0, src1, val0) - ->dnz = info->io.mul_zero_wins; - } else { - loadImm(dst0[c], 1.0f); - } - } - break; case TGSI_OPCODE_ISSG: case TGSI_OPCODE_SSG: FOR_EACH_DST_ENABLED_CHANNEL(0, c, tgsi) { diff --git a/src/gallium/drivers/nouveau/nv30/nv30_vertprog.h b/src/gallium/drivers/nouveau/nv30/nv30_vertprog.h index 5556e0c77bd..89d5b935e9f 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_vertprog.h +++ b/src/gallium/drivers/nouveau/nv30/nv30_vertprog.h @@ -10,7 +10,6 @@ * POW - EX2 + MUL + LG2 * SUB - ADD, second source negated * SWZ - MOV - * XPD - * * Register access * - Only one INPUT can be accessed per-instruction (move extras into TEMPs) diff --git a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c index a3ed5c6526b..7d006fb2dd7 100644 --- a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c +++ b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c @@ -774,11 +774,6 @@ nvfx_fragprog_parse_instruction(struct nvfx_fpc *fpc, case TGSI_OPCODE_TXP: nvfx_fp_emit(fpc, tex(sat, TXP, unit, dst, mask, src[0], none, none)); break; - case TGSI_OPCODE_XPD: - tmp = nvfx_src(temp(fpc)); - nvfx_fp_emit(fpc, arith(0, MUL, tmp.reg, mask, swz(src[0], Z, X, Y, Y), swz(src[1], Y, Z, X, X), none)); - nvfx_fp_emit(fpc, arith(sat, MAD, dst, (mask & ~NVFX_FP_MASK_W), swz(src[0], Y, Z, X, X), swz(src[1], Z, X, Y, Y), neg(tmp))); - break; case TGSI_OPCODE_IF: // MOVRC0 R31 (TR0.xyzw), R<src>: diff --git a/src/gallium/drivers/nouveau/nv30/nvfx_shader.h b/src/gallium/drivers/nouveau/nv30/nvfx_shader.h index e66d8af7620..f196c4fc17d 100644 --- a/src/gallium/drivers/nouveau/nv30/nvfx_shader.h +++ b/src/gallium/drivers/nouveau/nv30/nvfx_shader.h @@ -164,7 +164,6 @@ * RSQ - LG2 + EX2 * POW - LG2 + MUL + EX2 * SCS - COS + SIN - * XPD * * NV40 Looping * Loops appear to be fairly expensive on NV40 at least, the proprietary diff --git a/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c b/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c index 8ba3d5a0500..83823a148b3 100644 --- a/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c +++ b/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c @@ -683,11 +683,6 @@ nvfx_vertprog_parse_instruction(struct nvfx_vpc *vpc, insn.cc_test = NVFX_COND_LT; nvfx_vp_emit(vpc, insn); break; - case TGSI_OPCODE_XPD: - tmp = nvfx_src(temp(vpc)); - nvfx_vp_emit(vpc, arith(0, VEC, MUL, tmp.reg, mask, swz(src[0], Z, X, Y, Y), swz(src[1], Y, Z, X, X), none)); - nvfx_vp_emit(vpc, arith(sat, VEC, MAD, dst, (mask & ~NVFX_VP_MASK_W), swz(src[0], Y, Z, X, X), swz(src[1], Z, X, Y, Y), neg(tmp))); - break; case TGSI_OPCODE_IF: insn = arith(0, VEC, MOV, none.reg, NVFX_VP_MASK_X, src[0], none, none); insn.cc_update = 1; |