diff options
author | Chia-I Wu <[email protected]> | 2013-05-04 17:54:16 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-05-08 11:03:47 +0800 |
commit | 1f970816b1a6d3cf63a0a2a1092fbb485024b37a (patch) | |
tree | 37af44b5a00668fc6ad62a81129f14947f69b8c2 /src/gallium/auxiliary | |
parent | 364feb327d4bea09998818975deaa70a43909454 (diff) |
tgsi: refactor tgsi_opcode_infer_src_type()
Call tgsi_opcode_infer_type() from tgsi_opcode_infer_src_type().
Signed-off-by: Chia-I Wu <[email protected]>
Acked-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_info.c | 44 |
1 files changed, 9 insertions, 35 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c index 4916da9096c..90bb4976cbc 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_info.c +++ b/src/gallium/auxiliary/tgsi/tgsi_info.c @@ -280,7 +280,7 @@ tgsi_opcode_infer_type( uint opcode ) case TGSI_OPCODE_AND: case TGSI_OPCODE_OR: case TGSI_OPCODE_XOR: - case TGSI_OPCODE_SAD: + case TGSI_OPCODE_SAD: /* XXX some src args may be signed for SAD ? */ case TGSI_OPCODE_TXQ: case TGSI_OPCODE_TXQ_LZ: case TGSI_OPCODE_F2U: @@ -320,58 +320,32 @@ tgsi_opcode_infer_type( uint opcode ) /* * infer the source type of a TGSI opcode. - * MOV is special so return VOID */ enum tgsi_opcode_type tgsi_opcode_infer_src_type( uint opcode ) { switch (opcode) { - case TGSI_OPCODE_MOV: - return TGSI_TYPE_UNTYPED; case TGSI_OPCODE_UIF: - case TGSI_OPCODE_SHL: - case TGSI_OPCODE_AND: - case TGSI_OPCODE_OR: - case TGSI_OPCODE_XOR: - /* XXX some src args may be signed for SAD ? */ - case TGSI_OPCODE_SAD: case TGSI_OPCODE_TXF: - case TGSI_OPCODE_TXQ: case TGSI_OPCODE_BREAKC: case TGSI_OPCODE_U2F: case TGSI_OPCODE_UADD: - case TGSI_OPCODE_UDIV: - case TGSI_OPCODE_UMAD: - case TGSI_OPCODE_UMAX: - case TGSI_OPCODE_UMIN: - case TGSI_OPCODE_UMOD: - case TGSI_OPCODE_UMUL: - case TGSI_OPCODE_USEQ: - case TGSI_OPCODE_USGE: - case TGSI_OPCODE_USHR: - case TGSI_OPCODE_USLT: - case TGSI_OPCODE_USNE: case TGSI_OPCODE_SWITCH: case TGSI_OPCODE_CASE: case TGSI_OPCODE_SAMPLE_I: case TGSI_OPCODE_SAMPLE_I_MS: - case TGSI_OPCODE_SVIEWINFO: return TGSI_TYPE_UNSIGNED; case TGSI_OPCODE_I2F: - case TGSI_OPCODE_MOD: - case TGSI_OPCODE_IDIV: - case TGSI_OPCODE_IMAX: - case TGSI_OPCODE_IMIN: - case TGSI_OPCODE_INEG: - case TGSI_OPCODE_ISGE: - case TGSI_OPCODE_ISHR: - case TGSI_OPCODE_ISLT: - case TGSI_OPCODE_UARL: - case TGSI_OPCODE_IABS: - case TGSI_OPCODE_ISSG: return TGSI_TYPE_SIGNED; - default: + case TGSI_OPCODE_ARL: + case TGSI_OPCODE_ARR: + case TGSI_OPCODE_TXQ_LZ: + case TGSI_OPCODE_F2I: + case TGSI_OPCODE_F2U: + case TGSI_OPCODE_UCMP: return TGSI_TYPE_FLOAT; + default: + return tgsi_opcode_infer_type(opcode); } } |