diff options
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_insn.c | 27 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 25 |
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 47a0afc8ad0..0efd72d7992 100644 --- a/src/gallium/drivers/svga/svga_tgsi_insn.c +++ b/src/gallium/drivers/svga/svga_tgsi_insn.c @@ -1403,30 +1403,6 @@ emit_ssg(struct svga_shader_emitter *emit, /** - * Translate/emit TGSI SUB instruction as: - * ADD DST, SRC0, negate(SRC1) - */ -static boolean -emit_sub(struct svga_shader_emitter *emit, - const struct tgsi_full_instruction *insn) -{ - SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 ); - struct src_register src0 = translate_src_register( - emit, &insn->Src[0] ); - struct src_register src1 = translate_src_register( - emit, &insn->Src[1] ); - - src1 = negate(src1); - - if (!submit_op2( emit, inst_token( SVGA3DOP_ADD ), dst, - src0, src1 )) - return FALSE; - - return TRUE; -} - - -/** * Translate/emit KILL_IF instruction (kill if any of X,Y,Z,W are negative). */ static boolean @@ -2989,9 +2965,6 @@ svga_emit_instruction(struct svga_shader_emitter *emit, case TGSI_OPCODE_SLE: return emit_select_op( emit, PIPE_FUNC_LEQUAL, insn ); - case TGSI_OPCODE_SUB: - return emit_sub( emit, insn ); - case TGSI_OPCODE_POW: return emit_pow( emit, insn ); diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index e7cfb404a2e..3131444e495 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -4715,29 +4715,6 @@ emit_issg(struct svga_shader_emitter_v10 *emit, /** - * Emit code for TGSI_OPCODE_SUB instruction. - */ -static boolean -emit_sub(struct svga_shader_emitter_v10 *emit, - const struct tgsi_full_instruction *inst) -{ - /* dst = SUB(s0, s1): - * dst = s0 - s1 - * Translates into: - * ADD dst, s0, neg(s1) - */ - struct tgsi_full_src_register neg_src1 = negate_src(&inst->Src[1]); - - /* ADD dst, s0, neg(s1) */ - emit_instruction_op2(emit, VGPU10_OPCODE_ADD, &inst->Dst[0], - &inst->Src[0], &neg_src1, - inst->Instruction.Saturate); - - return TRUE; -} - - -/** * Emit a comparison instruction. The dest register will get * 0 or ~0 values depending on the outcome of comparing src0 to src1. */ @@ -5801,8 +5778,6 @@ emit_vgpu10_instruction(struct svga_shader_emitter_v10 *emit, return emit_ssg(emit, inst); case TGSI_OPCODE_ISSG: return emit_issg(emit, inst); - case TGSI_OPCODE_SUB: - return emit_sub(emit, inst); case TGSI_OPCODE_TEX: return emit_tex(emit, inst); case TGSI_OPCODE_TXP: |