diff options
author | Eric Anholt <[email protected]> | 2014-11-12 13:13:59 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-11-24 14:56:22 -0800 |
commit | d4864cdf15ccd30f0e82d07fd0e9db8a0c115cda (patch) | |
tree | fddfda125d068bb4b451ca411fe9fc6b130a9d62 /src/gallium/drivers/svga | |
parent | 7361d5ba63dda35683569e76caa33f886304958f (diff) |
gallium: Drop the NRM and NRM4 opcodes.
They weren't generated in tree, and as far as I know all hardware had to
lower it to a DP, RSQ, MUL.
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_insn.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c index b68b01a04ab..7a12b52e2dd 100644 --- a/src/gallium/drivers/svga/svga_tgsi_insn.c +++ b/src/gallium/drivers/svga/svga_tgsi_insn.c @@ -54,7 +54,6 @@ translate_opcode(uint opcode) case TGSI_OPCODE_MOV: return SVGA3DOP_MOV; case TGSI_OPCODE_MUL: return SVGA3DOP_MUL; case TGSI_OPCODE_NOP: return SVGA3DOP_NOP; - case TGSI_OPCODE_NRM4: return SVGA3DOP_NRM; default: assert(!"svga: unexpected opcode in translate_opcode()"); return SVGA3DOP_LAST_INST; @@ -1270,40 +1269,6 @@ emit_dph(struct svga_shader_emitter *emit, /** - * Translate the following TGSI DST instruction. - * NRM DST, SRC - * To the following SVGA3D instruction sequence. - * DP3 TMP, SRC, SRC - * RSQ TMP, TMP - * MUL DST, SRC, TMP - */ -static boolean -emit_nrm(struct svga_shader_emitter *emit, - const struct tgsi_full_instruction *insn) -{ - SVGA3dShaderDestToken dst = translate_dst_register( emit, insn, 0 ); - const struct src_register src0 = - translate_src_register(emit, &insn->Src[0]); - SVGA3dShaderDestToken temp = get_temp( emit ); - - /* DP3 TMP, SRC, SRC */ - if (!submit_op2( emit, inst_token( SVGA3DOP_DP3 ), temp, src0, src0 )) - return FALSE; - - /* RSQ TMP, TMP */ - if (!submit_op1( emit, inst_token( SVGA3DOP_RSQ ), temp, src( temp ))) - return FALSE; - - /* MUL DST, SRC, TMP */ - if (!submit_op2( emit, inst_token( SVGA3DOP_MUL ), dst, - src0, src( temp ))) - return FALSE; - - return TRUE; -} - - -/** * Sine / Cosine helper function. */ static boolean @@ -2962,9 +2927,6 @@ svga_emit_instruction(struct svga_shader_emitter *emit, case TGSI_OPCODE_DPH: return emit_dph( emit, insn ); - case TGSI_OPCODE_NRM: - return emit_nrm( emit, insn ); - case TGSI_OPCODE_COS: return emit_cos( emit, insn ); |