diff options
author | Marek Olšák <[email protected]> | 2017-08-19 20:25:08 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-08-22 16:42:17 +0200 |
commit | 497506ad93d737db0c75f512626df2ae82c27560 (patch) | |
tree | af19e9b67d6fdac75576f4928bf2aa7405c7045a /src/gallium/drivers/svga | |
parent | 33efa6416f6ec58a5ec535c4c11501850514d5e7 (diff) |
gallium: remove TGSI opcode SCS
use COS+SIN instead.
Reviewed-by: Roland Scheidegger <[email protected]>
Acked-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_insn.c | 26 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 38 |
2 files changed, 0 insertions, 64 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c index a325a567c18..be99ad511b9 100644 --- a/src/gallium/drivers/svga/svga_tgsi_insn.c +++ b/src/gallium/drivers/svga/svga_tgsi_insn.c @@ -1250,29 +1250,6 @@ do_emit_sincos(struct svga_shader_emitter *emit, /** - * Translate/emit a TGSI SIN, COS or CSC instruction. - */ -static boolean -emit_sincos(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]); - SVGA3dShaderDestToken temp = get_temp( emit ); - - /* SCS TMP SRC */ - if (!do_emit_sincos(emit, writemask(temp, TGSI_WRITEMASK_XY), src0 )) - return FALSE; - - /* MOV DST TMP */ - if (!submit_op1( emit, inst_token( SVGA3DOP_MOV ), dst, src( temp ) )) - return FALSE; - - return TRUE; -} - - -/** * Translate TGSI SIN instruction into: * SCS TMP SRC * MOV DST TMP.yyyy @@ -2840,9 +2817,6 @@ svga_emit_instruction(struct svga_shader_emitter *emit, case TGSI_OPCODE_SIN: return emit_sin( emit, insn ); - case TGSI_OPCODE_SCS: - return emit_sincos( emit, insn ); - case TGSI_OPCODE_END: /* TGSI always finishes the main func with an END */ return emit_end( emit ); diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index d8013570ef7..a864616c05a 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -4279,42 +4279,6 @@ emit_rsq(struct svga_shader_emitter_v10 *emit, /** - * Emit code for TGSI_OPCODE_SCS instruction. - */ -static boolean -emit_scs(struct svga_shader_emitter_v10 *emit, - const struct tgsi_full_instruction *inst) -{ - /* dst.x = cos(src.x) - * dst.y = sin(src.x) - * dst.z = 0.0 - * dst.w = 1.0 - */ - struct tgsi_full_dst_register dst_x = - writemask_dst(&inst->Dst[0], TGSI_WRITEMASK_X); - struct tgsi_full_dst_register dst_y = - writemask_dst(&inst->Dst[0], TGSI_WRITEMASK_Y); - struct tgsi_full_dst_register dst_zw = - writemask_dst(&inst->Dst[0], TGSI_WRITEMASK_ZW); - - struct tgsi_full_src_register zero_one = - make_immediate_reg_float4(emit, 0.0f, 0.0f, 0.0f, 1.0f); - - begin_emit_instruction(emit); - emit_opcode(emit, VGPU10_OPCODE_SINCOS, inst->Instruction.Saturate); - emit_dst_register(emit, &dst_y); - emit_dst_register(emit, &dst_x); - emit_src_register(emit, &inst->Src[0]); - end_emit_instruction(emit); - - emit_instruction_op1(emit, VGPU10_OPCODE_MOV, - &dst_zw, &zero_one, inst->Instruction.Saturate); - - return TRUE; -} - - -/** * Emit code for TGSI_OPCODE_SEQ (Set Equal) instruction. */ static boolean @@ -5593,8 +5557,6 @@ emit_vgpu10_instruction(struct svga_shader_emitter_v10 *emit, return emit_rsq(emit, inst); case TGSI_OPCODE_SAMPLE: return emit_sample(emit, inst); - case TGSI_OPCODE_SCS: - return emit_scs(emit, inst); case TGSI_OPCODE_SEQ: return emit_seq(emit, inst); case TGSI_OPCODE_SGE: |