diff options
author | Dave Airlie <[email protected]> | 2012-01-24 11:55:14 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2012-02-17 17:39:01 +0000 |
commit | 13e2e51f7058dff01281050db1b64639ad3b399e (patch) | |
tree | ebe8a1b8da89718fc7cfad014ff7bcd6281a4787 /src/gallium/auxiliary/tgsi/tgsi_info.h | |
parent | 9be0f9b0e470bb7bc8672d161615c16fe5b026fd (diff) |
tgsi: add source/destination type from opcodes. (v2)
These two functions produce the src/dst types for an opcode.
MOV is special since it can be used to mov float->float and int->int,
so just return VOID.
v2: use a new enum for the opcode type as per Jose's suggestion.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_info.h')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_info.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.h b/src/gallium/auxiliary/tgsi/tgsi_info.h index c0427fb61c9..541491645ec 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_info.h +++ b/src/gallium/auxiliary/tgsi/tgsi_info.h @@ -30,6 +30,7 @@ #include "pipe/p_compiler.h" #include "pipe/p_shader_tokens.h" +#include "util/u_format.h" #if defined __cplusplus extern "C" { @@ -90,6 +91,20 @@ tgsi_get_opcode_name( uint opcode ); const char * tgsi_get_processor_name( uint processor ); +enum tgsi_opcode_type { + TGSI_TYPE_UNTYPED, /* for MOV */ + TGSI_TYPE_VOID, + TGSI_TYPE_UNSIGNED, + TGSI_TYPE_SIGNED, + TGSI_TYPE_FLOAT, + TGSI_TYPE_DOUBLE, +}; + +enum tgsi_opcode_type +tgsi_opcode_infer_src_type( uint opcode ); + +enum tgsi_opcode_type +tgsi_opcode_infer_dst_type( uint opcode ); #if defined __cplusplus } |