diff options
author | Marek Olšák <[email protected]> | 2017-08-19 21:41:57 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-08-22 13:29:47 +0200 |
commit | 86e6f7a73bdbced24e10fb80fdcba591e0568120 (patch) | |
tree | 8cb2a014a944585bf49e6af66075500c927cca49 /src/gallium/drivers/svga | |
parent | 0bb367830a613da30991ca60b4dccdda61302038 (diff) |
gallium: remove TGSI opcode DP2A
use DP3 instead.
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_insn.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 51 |
2 files changed, 0 insertions, 52 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c index fc3ec5eed73..dd29f74a2a7 100644 --- a/src/gallium/drivers/svga/svga_tgsi_insn.c +++ b/src/gallium/drivers/svga/svga_tgsi_insn.c @@ -44,7 +44,6 @@ translate_opcode(uint opcode) { switch (opcode) { case TGSI_OPCODE_ADD: return SVGA3DOP_ADD; - case TGSI_OPCODE_DP2A: return SVGA3DOP_DP2ADD; case TGSI_OPCODE_DP3: return SVGA3DOP_DP3; case TGSI_OPCODE_DP4: return SVGA3DOP_DP4; case TGSI_OPCODE_FRC: return SVGA3DOP_FRC; diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index d7ec48eb8ac..56afd497d74 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -3578,55 +3578,6 @@ emit_cmp(struct svga_shader_emitter_v10 *emit, /** - * Emit code for TGSI_OPCODE_DP2A instruction. - */ -static boolean -emit_dp2a(struct svga_shader_emitter_v10 *emit, - const struct tgsi_full_instruction *inst) -{ - /* dst.x = src0.x * src1.x + src0.y * src1.y + src2.x - * dst.y = src0.x * src1.x + src0.y * src1.y + src2.x - * dst.z = src0.x * src1.x + src0.y * src1.y + src2.x - * dst.w = src0.x * src1.x + src0.y * src1.y + src2.x - * Translate into - * MAD tmp.x, s0.y, s1.y, s2.x - * MAD tmp.x, s0.x, s1.x, tmp.x - * MOV dst.xyzw, tmp.xxxx - */ - unsigned tmp = get_temp_index(emit); - struct tgsi_full_src_register tmp_src = make_src_temp_reg(tmp); - struct tgsi_full_dst_register tmp_dst = make_dst_temp_reg(tmp); - - struct tgsi_full_src_register tmp_src_xxxx = - scalar_src(&tmp_src, TGSI_SWIZZLE_X); - struct tgsi_full_dst_register tmp_dst_x = - writemask_dst(&tmp_dst, TGSI_WRITEMASK_X); - - struct tgsi_full_src_register src0_xxxx = - scalar_src(&inst->Src[0], TGSI_SWIZZLE_X); - struct tgsi_full_src_register src0_yyyy = - scalar_src(&inst->Src[0], TGSI_SWIZZLE_Y); - struct tgsi_full_src_register src1_xxxx = - scalar_src(&inst->Src[1], TGSI_SWIZZLE_X); - struct tgsi_full_src_register src1_yyyy = - scalar_src(&inst->Src[1], TGSI_SWIZZLE_Y); - struct tgsi_full_src_register src2_xxxx = - scalar_src(&inst->Src[2], TGSI_SWIZZLE_X); - - emit_instruction_op3(emit, VGPU10_OPCODE_MAD, &tmp_dst_x, &src0_yyyy, - &src1_yyyy, &src2_xxxx, FALSE); - emit_instruction_op3(emit, VGPU10_OPCODE_MAD, &tmp_dst_x, &src0_xxxx, - &src1_xxxx, &tmp_src_xxxx, FALSE); - emit_instruction_op1(emit, VGPU10_OPCODE_MOV, &inst->Dst[0], - &tmp_src_xxxx, inst->Instruction.Saturate); - - free_temp_indexes(emit); - - return TRUE; -} - - -/** * Emit code for TGSI_OPCODE_DPH instruction. */ static boolean @@ -5761,8 +5712,6 @@ emit_vgpu10_instruction(struct svga_shader_emitter_v10 *emit, return emit_cmp(emit, inst); case TGSI_OPCODE_COS: return emit_sincos(emit, inst); - case TGSI_OPCODE_DP2A: - return emit_dp2a(emit, inst); case TGSI_OPCODE_DPH: return emit_dph(emit, inst); case TGSI_OPCODE_DST: |