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/i915 | |
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/i915')
-rw-r--r-- | src/gallium/drivers/i915/i915_fpc_optimize.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_fpc_translate.c | 26 |
2 files changed, 0 insertions, 27 deletions
diff --git a/src/gallium/drivers/i915/i915_fpc_optimize.c b/src/gallium/drivers/i915/i915_fpc_optimize.c index da06e16bf0e..fb97e9ea868 100644 --- a/src/gallium/drivers/i915/i915_fpc_optimize.c +++ b/src/gallium/drivers/i915/i915_fpc_optimize.c @@ -118,7 +118,6 @@ static const struct { [ TGSI_OPCODE_TRUNC ] = { false, false, 0, 1, 1 }, [ TGSI_OPCODE_TXB ] = { true, false, 0, 1, 2 }, [ TGSI_OPCODE_TXP ] = { true, false, 0, 1, 2 }, - [ TGSI_OPCODE_XPD ] = { false, false, 0, 1, 2 }, }; static boolean op_has_dst(unsigned opcode) diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c index 22a42eeeab4..2faab338b77 100644 --- a/src/gallium/drivers/i915/i915_fpc_translate.c +++ b/src/gallium/drivers/i915/i915_fpc_translate.c @@ -1027,32 +1027,6 @@ i915_translate_instruction(struct i915_fp_compile *p, emit_tex(p, inst, T0_TEXLDP, fs); break; - case TGSI_OPCODE_XPD: - /* Cross product: - * result.x = src0.y * src1.z - src0.z * src1.y; - * result.y = src0.z * src1.x - src0.x * src1.z; - * result.z = src0.x * src1.y - src0.y * src1.x; - * result.w = undef; - */ - src0 = src_vector(p, &inst->Src[0], fs); - src1 = src_vector(p, &inst->Src[1], fs); - tmp = i915_get_utemp(p); - - i915_emit_arith(p, - A0_MUL, - tmp, A0_DEST_CHANNEL_ALL, 0, - swizzle(src0, Z, X, Y, ONE), - swizzle(src1, Y, Z, X, ONE), 0); - - i915_emit_arith(p, - A0_MAD, - get_result_vector(p, &inst->Dst[0]), - get_result_flags(inst), 0, - swizzle(src0, Y, Z, X, ONE), - swizzle(src1, Z, X, Y, ONE), - negate(tmp, 1, 1, 1, 0)); - break; - default: i915_program_error(p, "bad opcode %d", inst->Instruction.Opcode); p->error = 1; |