summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/tgsi/exec
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-09-19 18:53:36 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-09-19 18:53:59 -0600
commit37cf13ed9a429c755f121daa1776b1b30a985ab3 (patch)
tree8ae423c054011d6826024b173e1de892c8bed78e /src/mesa/pipe/tgsi/exec
parent83a674a7af4e58f677a56aae2111d2cbdbf1e21d (diff)
Checkpoint: replacement of TGSI_ATTRIB_x tokens with input/output semantics.
TGSI_ATTRIB_x tokens still present and used in a few places. Expanded set of TGSI_SEMANTIC_x tokens for describing the meaning of inputs/outputs. These tokens are in a crude state ATM. Lots of #if 0 / disabled code to be removed yet, etc... Softpipe and i915 drivers should be in working condition but not heavily tested.
Diffstat (limited to 'src/mesa/pipe/tgsi/exec')
-rwxr-xr-xsrc/mesa/pipe/tgsi/exec/tgsi_build.c2
-rwxr-xr-xsrc/mesa/pipe/tgsi/exec/tgsi_dump.c18
-rw-r--r--src/mesa/pipe/tgsi/exec/tgsi_token.h31
3 files changed, 40 insertions, 11 deletions
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_build.c b/src/mesa/pipe/tgsi/exec/tgsi_build.c
index 20e4cf17f0..1320872c64 100755
--- a/src/mesa/pipe/tgsi/exec/tgsi_build.c
+++ b/src/mesa/pipe/tgsi/exec/tgsi_build.c
@@ -325,7 +325,7 @@ tgsi_build_declaration_semantic(
{
struct tgsi_declaration_semantic ds;
- assert( semantic_name <= TGSI_SEMANTIC_COLOR );
+ assert( semantic_name <= TGSI_SEMANTIC_COUNT );
assert( semantic_index <= 0xFFFF );
ds = tgsi_default_declaration_semantic();
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_dump.c b/src/mesa/pipe/tgsi/exec/tgsi_dump.c
index e6e99d9d75..0a47ad2a8c 100755
--- a/src/mesa/pipe/tgsi/exec/tgsi_dump.c
+++ b/src/mesa/pipe/tgsi/exec/tgsi_dump.c
@@ -202,13 +202,27 @@ static const char *TGSI_INTERPOLATES_SHORT[] =
static const char *TGSI_SEMANTICS[] =
{
"SEMANTIC_DEPTH",
- "SEMANTIC_COLOR"
+ "SEMANTIC_COLOR0",
+ "SEMANTIC_COLOR1",
+ "SEMANTIC_COLOR0B",
+ "SEMANTIC_COLOR1B",
+ "SEMANTIC_POSITION",
+ "SEMANTIC_FOG",
+ "SEMANTIC_OTHER,"
+ "SEMANTIC_TEX0",
};
static const char *TGSI_SEMANTICS_SHORT[] =
{
"DEPTH",
- "COLOR"
+ "COLOR0",
+ "COLOR1",
+ "COLOR0B",
+ "COLOR1B",
+ "POSITION",
+ "FOG",
+ "OTHER",
+ "TEX0"
};
static const char *TGSI_IMMS[] =
diff --git a/src/mesa/pipe/tgsi/exec/tgsi_token.h b/src/mesa/pipe/tgsi/exec/tgsi_token.h
index ca53071a60..a642ba131a 100644
--- a/src/mesa/pipe/tgsi/exec/tgsi_token.h
+++ b/src/mesa/pipe/tgsi/exec/tgsi_token.h
@@ -73,11 +73,11 @@ struct tgsi_declaration
{
unsigned Type : 4; /* TGSI_TOKEN_TYPE_DECLARATION */
unsigned Size : 8; /* UINT */
- unsigned File : 4; /* TGSI_FILE_ */
- unsigned Declare : 4; /* TGSI_DECLARE_ */
- unsigned UsageMask : 4; /* TGSI_WRITEMASK_ */
- unsigned Interpolate : 1; /* BOOL */
- unsigned Semantic : 1; /* BOOL */
+ unsigned File : 4; /* one of TGSI_FILE_x */
+ unsigned Declare : 4; /* one of TGSI_DECLARE_x */
+ unsigned UsageMask : 4; /* bitmask of TGSI_WRITEMASK_x flags */
+ unsigned Interpolate : 1; /* BOOL, any interpolation info? */
+ unsigned Semantic : 1; /* BOOL, any semantic info? */
unsigned Padding : 5;
unsigned Extended : 1; /* BOOL */
};
@@ -103,12 +103,27 @@ struct tgsi_declaration_interpolation
unsigned Padding : 28;
};
-#define TGSI_SEMANTIC_DEPTH 0
-#define TGSI_SEMANTIC_COLOR 1
+#define TGSI_SEMANTIC_DEPTH 0
+#define TGSI_SEMANTIC_COLOR0 1
+#define TGSI_SEMANTIC_COLOR1 2
+#define TGSI_SEMANTIC_COLOR0B 3 /**< back-face primary color */
+#define TGSI_SEMANTIC_COLOR1B 4 /**< back-face secondary color */
+#define TGSI_SEMANTIC_POSITION 5
+#define TGSI_SEMANTIC_FOG 6
+#define TGSI_SEMANTIC_OTHER 7 /* XXX temp */
+#define TGSI_SEMANTIC_TEX0 8
+#define TGSI_SEMANTIC_TEX1 9
+#define TGSI_SEMANTIC_TEX2 10
+#define TGSI_SEMANTIC_TEX3 11
+#define TGSI_SEMANTIC_TEX4 12
+#define TGSI_SEMANTIC_TEX5 13
+#define TGSI_SEMANTIC_TEX6 14
+#define TGSI_SEMANTIC_TEX7 15
+#define TGSI_SEMANTIC_COUNT 16 /**< number of semantic values */
struct tgsi_declaration_semantic
{
- unsigned SemanticName : 8; /* TGSI_SEMANTIC_ */
+ unsigned SemanticName : 8; /* one of TGSI_SEMANTIC_ */
unsigned SemanticIndex : 16; /* UINT */
unsigned Padding : 8;
};