summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_info.h
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2012-01-06 17:38:37 -0500
committerTom Stellard <[email protected]>2012-01-30 13:37:00 -0500
commitdf169457909e1985c65e8a19c245133d2f5f013d (patch)
treeec497736735cc872bae4e5305f7f1b13f8913232 /src/gallium/auxiliary/tgsi/tgsi_info.h
parentc72d7df16879e3210946ba92a7edc823815b6f16 (diff)
tgsi: Add output_mode to struct tgsi_opcode_info v2
v2: - Rename output_type to output_mode - Add shorthand definitions for TGSI_OUTPUT_*
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_info.h')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_info.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.h b/src/gallium/auxiliary/tgsi/tgsi_info.h
index 1992d11bbe8..c0427fb61c9 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_info.h
+++ b/src/gallium/auxiliary/tgsi/tgsi_info.h
@@ -35,6 +35,39 @@
extern "C" {
#endif
+/* This enum describes how an opcode calculates its result. */
+enum tgsi_output_mode {
+ /** The opcode produces no result. */
+ TGSI_OUTPUT_NONE = 0,
+
+ /** When this opcode writes to a channel of the destination register,
+ * it takes as arguments values from the same channel of the source
+ * register(s).
+ *
+ * Example: TGSI_OPCODE_ADD
+ */
+ TGSI_OUTPUT_COMPONENTWISE = 1,
+
+ /** This opcode writes the same value to all enabled channels of the
+ * destination register.
+ *
+ * Example: TGSI_OPCODE_RSQ
+ */
+ TGSI_OUTPUT_REPLICATE = 2,
+
+ /** The operation performed by this opcode is dependent on which channel
+ * of the destination register is being written.
+ *
+ * Example: TGSI_OPCODE_LOG
+ */
+ TGSI_OUTPUT_CHAN_DEPENDENT = 3,
+
+ /**
+ * Example: TGSI_OPCODE_TEX
+ */
+ TGSI_OUTPUT_OTHER = 4
+};
+
struct tgsi_opcode_info
{
unsigned num_dst:3;
@@ -43,6 +76,7 @@ struct tgsi_opcode_info
unsigned is_branch:1;
int pre_dedent:2;
int post_indent:2;
+ enum tgsi_output_mode output_mode:3;
const char *mnemonic;
uint opcode;
};