diff options
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/freedreno/a2xx/fd2_compiler.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_fpc_optimize.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_fpc_translate.c | 9 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/shader/toy_tgsi.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 3 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_tgsi_to_rc.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 9 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_insn.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 24 |
12 files changed, 3 insertions, 62 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_compiler.c b/src/gallium/drivers/freedreno/a2xx/fd2_compiler.c index 39418fca41f..2ffd8cd5a77 100644 --- a/src/gallium/drivers/freedreno/a2xx/fd2_compiler.c +++ b/src/gallium/drivers/freedreno/a2xx/fd2_compiler.c @@ -1080,11 +1080,6 @@ translate_instruction(struct fd2_compile_context *ctx, case TGSI_OPCODE_POW: translate_pow(ctx, inst); break; - case TGSI_OPCODE_ABS: - instr = ir2_instr_create_alu(cf, MAXv, ~0); - add_regs_vector_1(ctx, inst, instr); - instr->regs[1]->flags |= IR2_REG_NEGATE; /* src0 */ - break; case TGSI_OPCODE_COS: case TGSI_OPCODE_SIN: translate_trig(ctx, inst, opc); diff --git a/src/gallium/drivers/i915/i915_fpc_optimize.c b/src/gallium/drivers/i915/i915_fpc_optimize.c index a2b6d272939..7c3b9a9782f 100644 --- a/src/gallium/drivers/i915/i915_fpc_optimize.c +++ b/src/gallium/drivers/i915/i915_fpc_optimize.c @@ -76,7 +76,6 @@ static const struct { unsigned num_dst; unsigned num_src; } op_table [TGSI_OPCODE_LAST] = { - [ TGSI_OPCODE_ABS ] = { false, false, 0, 1, 1 }, [ TGSI_OPCODE_ADD ] = { false, true, TGSI_SWIZZLE_ZERO, 1, 2 }, [ TGSI_OPCODE_CEIL ] = { false, false, 0, 1, 1 }, [ TGSI_OPCODE_CMP ] = { false, false, 0, 1, 2 }, diff --git a/src/gallium/drivers/i915/i915_fpc_translate.c b/src/gallium/drivers/i915/i915_fpc_translate.c index 72b90929401..80caf31f383 100644 --- a/src/gallium/drivers/i915/i915_fpc_translate.c +++ b/src/gallium/drivers/i915/i915_fpc_translate.c @@ -500,15 +500,6 @@ i915_translate_instruction(struct i915_fp_compile *p, uint tmp = 0; switch (inst->Instruction.Opcode) { - case TGSI_OPCODE_ABS: - src0 = src_vector(p, &inst->Src[0], fs); - i915_emit_arith(p, - A0_MAX, - get_result_vector(p, &inst->Dst[0]), - get_result_flags(inst), 0, - src0, negate(src0, 1, 1, 1, 1), 0); - break; - case TGSI_OPCODE_ADD: emit_simple_arith(p, inst, A0_ADD, 2, fs); break; diff --git a/src/gallium/drivers/ilo/shader/toy_tgsi.c b/src/gallium/drivers/ilo/shader/toy_tgsi.c index e5fbb6e592a..a88f189ae88 100644 --- a/src/gallium/drivers/ilo/shader/toy_tgsi.c +++ b/src/gallium/drivers/ilo/shader/toy_tgsi.c @@ -58,7 +58,6 @@ static const struct { [TGSI_OPCODE_EX2] = { TOY_OPCODE_EXP, 1, 1 }, [TGSI_OPCODE_LG2] = { TOY_OPCODE_LOG, 1, 1 }, [TGSI_OPCODE_POW] = { TOY_OPCODE_POW, 1, 2 }, - [TGSI_OPCODE_ABS] = { GEN6_OPCODE_MOV, 1, 1 }, [TGSI_OPCODE_DPH] = { GEN6_OPCODE_DPH, 1, 2 }, [TGSI_OPCODE_COS] = { TOY_OPCODE_COS, 1, 1 }, [TGSI_OPCODE_KILL] = { TOY_OPCODE_KIL, 0, 0 }, @@ -148,7 +147,6 @@ aos_simple(struct toy_compiler *tc, case TGSI_OPCODE_SUB: src[1] = tsrc_negate(src[1]); break; - case TGSI_OPCODE_ABS: case TGSI_OPCODE_IABS: src[0] = tsrc_absolute(src[0]); break; @@ -790,7 +788,6 @@ static const toy_tgsi_translate aos_translate_table[TGSI_OPCODE_LAST] = { [TGSI_OPCODE_LG2] = aos_simple, [TGSI_OPCODE_POW] = aos_simple, [TGSI_OPCODE_XPD] = aos_XPD, - [TGSI_OPCODE_ABS] = aos_simple, [TGSI_OPCODE_DPH] = aos_simple, [TGSI_OPCODE_COS] = aos_simple, [TGSI_OPCODE_DDX] = aos_unsupported, @@ -1333,7 +1330,6 @@ static const toy_tgsi_translate soa_translate_table[TGSI_OPCODE_LAST] = { [TGSI_OPCODE_LG2] = soa_scalar_replicate, [TGSI_OPCODE_POW] = soa_scalar_replicate, [TGSI_OPCODE_XPD] = soa_XPD, - [TGSI_OPCODE_ABS] = soa_per_channel, [TGSI_OPCODE_DPH] = soa_dot_product, [TGSI_OPCODE_COS] = soa_scalar_replicate, [TGSI_OPCODE_DDX] = soa_partial_derivative, 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 91cef81aa0d..b9190980455 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp @@ -731,8 +731,6 @@ static nv50_ir::operation translateOpcode(uint opcode) NV50_IR_OPCODE_CASE(LG2, LG2); NV50_IR_OPCODE_CASE(POW, POW); - NV50_IR_OPCODE_CASE(ABS, ABS); - NV50_IR_OPCODE_CASE(COS, COS); NV50_IR_OPCODE_CASE(DDX, DFDX); NV50_IR_OPCODE_CASE(DDX_FINE, DFDX); @@ -3011,7 +3009,6 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn) } break; case TGSI_OPCODE_MOV: - case TGSI_OPCODE_ABS: case TGSI_OPCODE_CEIL: case TGSI_OPCODE_FLR: case TGSI_OPCODE_TRUNC: diff --git a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c index dab42e17cfe..d031c6846ea 100644 --- a/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c +++ b/src/gallium/drivers/nouveau/nv30/nvfx_fragprog.c @@ -533,9 +533,6 @@ nvfx_fragprog_parse_instruction(struct nvfx_fpc *fpc, sat = finst->Instruction.Saturate; switch (finst->Instruction.Opcode) { - case TGSI_OPCODE_ABS: - nvfx_fp_emit(fpc, arith(sat, MOV, dst, mask, abs(src[0]), none, none)); - break; case TGSI_OPCODE_ADD: nvfx_fp_emit(fpc, arith(sat, ADD, dst, mask, src[0], src[1], none)); break; diff --git a/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c b/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c index b39c4b74eca..a802c43e22b 100644 --- a/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c +++ b/src/gallium/drivers/nouveau/nv30/nvfx_vertprog.c @@ -549,9 +549,6 @@ nvfx_vertprog_parse_instruction(struct nvfx_vpc *vpc, } switch (finst->Instruction.Opcode) { - case TGSI_OPCODE_ABS: - nvfx_vp_emit(vpc, arith(sat, VEC, MOV, dst, mask, abs(src[0]), none, none)); - break; case TGSI_OPCODE_ADD: nvfx_vp_emit(vpc, arith(sat, VEC, ADD, dst, mask, src[0], none, src[1])); break; diff --git a/src/gallium/drivers/r300/r300_tgsi_to_rc.c b/src/gallium/drivers/r300/r300_tgsi_to_rc.c index 23ed2cf2532..9d1e59f18b6 100644 --- a/src/gallium/drivers/r300/r300_tgsi_to_rc.c +++ b/src/gallium/drivers/r300/r300_tgsi_to_rc.c @@ -61,7 +61,6 @@ static unsigned translate_opcode(unsigned opcode) case TGSI_OPCODE_LG2: return RC_OPCODE_LG2; case TGSI_OPCODE_POW: return RC_OPCODE_POW; case TGSI_OPCODE_XPD: return RC_OPCODE_XPD; - case TGSI_OPCODE_ABS: return RC_OPCODE_ABS; case TGSI_OPCODE_DPH: return RC_OPCODE_DPH; case TGSI_OPCODE_COS: return RC_OPCODE_COS; case TGSI_OPCODE_DDX: return RC_OPCODE_DDX; diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index b5e7b7d7223..c2996aa3085 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -3936,9 +3936,6 @@ static int tgsi_op2_s(struct r600_shader_ctx *ctx, int swap, int trans_only) case TGSI_OPCODE_SUB: r600_bytecode_src_toggle_neg(&alu.src[1]); break; - case TGSI_OPCODE_ABS: - r600_bytecode_src_set_abs(&alu.src[0]); - break; default: break; } @@ -9025,7 +9022,7 @@ static const struct r600_shader_tgsi_instruction r600_shader_tgsi_instruction[] [TGSI_OPCODE_POW] = { ALU_OP0_NOP, tgsi_pow}, [TGSI_OPCODE_XPD] = { ALU_OP0_NOP, tgsi_xpd}, [32] = { ALU_OP0_NOP, tgsi_unsupported}, - [TGSI_OPCODE_ABS] = { ALU_OP1_MOV, tgsi_op2}, + [33] = { ALU_OP0_NOP, tgsi_unsupported}, [34] = { ALU_OP0_NOP, tgsi_unsupported}, [TGSI_OPCODE_DPH] = { ALU_OP2_DOT4, tgsi_dp}, [TGSI_OPCODE_COS] = { ALU_OP1_COS, tgsi_trig}, @@ -9224,7 +9221,7 @@ static const struct r600_shader_tgsi_instruction eg_shader_tgsi_instruction[] = [TGSI_OPCODE_POW] = { ALU_OP0_NOP, tgsi_pow}, [TGSI_OPCODE_XPD] = { ALU_OP0_NOP, tgsi_xpd}, [32] = { ALU_OP0_NOP, tgsi_unsupported}, - [TGSI_OPCODE_ABS] = { ALU_OP1_MOV, tgsi_op2}, + [33] = { ALU_OP0_NOP, tgsi_unsupported}, [34] = { ALU_OP0_NOP, tgsi_unsupported}, [TGSI_OPCODE_DPH] = { ALU_OP2_DOT4, tgsi_dp}, [TGSI_OPCODE_COS] = { ALU_OP1_COS, tgsi_trig}, @@ -9447,7 +9444,7 @@ static const struct r600_shader_tgsi_instruction cm_shader_tgsi_instruction[] = [TGSI_OPCODE_POW] = { ALU_OP0_NOP, cayman_pow}, [TGSI_OPCODE_XPD] = { ALU_OP0_NOP, tgsi_xpd}, [32] = { ALU_OP0_NOP, tgsi_unsupported}, - [TGSI_OPCODE_ABS] = { ALU_OP1_MOV, tgsi_op2}, + [33] = { ALU_OP0_NOP, tgsi_unsupported}, [34] = { ALU_OP0_NOP, tgsi_unsupported}, [TGSI_OPCODE_DPH] = { ALU_OP2_DOT4, tgsi_dp}, [TGSI_OPCODE_COS] = { ALU_OP1_COS, cayman_trig}, diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c index 1966752cc0a..0a49bc2b2c2 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c @@ -767,8 +767,6 @@ void si_shader_context_init_alu(struct lp_build_tgsi_context *bld_base) { lp_set_default_actions(bld_base); - bld_base->op_actions[TGSI_OPCODE_ABS].emit = build_tgsi_intrinsic_nomem; - bld_base->op_actions[TGSI_OPCODE_ABS].intr_name = "llvm.fabs.f32"; bld_base->op_actions[TGSI_OPCODE_AND].emit = emit_and; bld_base->op_actions[TGSI_OPCODE_ARL].emit = emit_arl; bld_base->op_actions[TGSI_OPCODE_BFI].emit = emit_bfi; diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c index 0e200136b6c..47a0afc8ad0 100644 --- a/src/gallium/drivers/svga/svga_tgsi_insn.c +++ b/src/gallium/drivers/svga/svga_tgsi_insn.c @@ -43,7 +43,6 @@ static unsigned translate_opcode(uint opcode) { switch (opcode) { - case TGSI_OPCODE_ABS: return SVGA3DOP_ABS; case TGSI_OPCODE_ADD: return SVGA3DOP_ADD; case TGSI_OPCODE_DP2A: return SVGA3DOP_DP2ADD; case TGSI_OPCODE_DP3: return SVGA3DOP_DP3; diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index 981251af628..e7cfb404a2e 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -3456,28 +3456,6 @@ emit_puint_to_sscaled(struct svga_shader_emitter_v10 *emit, /** - * Emit code for TGSI_OPCODE_ABS instruction. - */ -static boolean -emit_abs(struct svga_shader_emitter_v10 *emit, - const struct tgsi_full_instruction *inst) -{ - /* dst = ABS(s0): - * dst = abs(s0) - * Translates into: - * MOV dst, abs(s0) - */ - struct tgsi_full_src_register abs_src0 = absolute_src(&inst->Src[0]); - - /* MOV dst, abs(s0) */ - emit_instruction_op1(emit, VGPU10_OPCODE_MOV, &inst->Dst[0], - &abs_src0, inst->Instruction.Saturate); - - return TRUE; -} - - -/** * Emit code for TGSI_OPCODE_ARL or TGSI_OPCODE_UARL instruction. */ static boolean @@ -5756,8 +5734,6 @@ emit_vgpu10_instruction(struct svga_shader_emitter_v10 *emit, return emit_vertex(emit, inst); case TGSI_OPCODE_ENDPRIM: return emit_endprim(emit, inst); - case TGSI_OPCODE_ABS: - return emit_abs(emit, inst); case TGSI_OPCODE_IABS: return emit_iabs(emit, inst); case TGSI_OPCODE_ARL: |