summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-07-01 20:54:01 -0400
committerIlia Mirkin <[email protected]>2014-07-09 19:26:32 -0400
commit4c97ed4411e3653a082875b79587fb308c284a99 (patch)
treebc6f1666166da83a51525f6460d49c7d6d473166 /src/gallium/include
parente3b16294cb56bc0f3ee4a68a525884db0ce6806d (diff)
gallium: switch dedicated centroid field to interpolation location
The new location field can be either center, centroid, or sample, which indicates the location that the shader should interpolate at. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_shader_tokens.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index 9261b79d91e..e68258d7776 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -103,6 +103,11 @@ enum tgsi_file_type {
#define TGSI_INTERPOLATE_COLOR 3 /* special color case for smooth/flat */
#define TGSI_INTERPOLATE_COUNT 4
+#define TGSI_INTERPOLATE_LOC_CENTER 0
+#define TGSI_INTERPOLATE_LOC_CENTROID 1
+#define TGSI_INTERPOLATE_LOC_SAMPLE 2
+#define TGSI_INTERPOLATE_LOC_COUNT 3
+
#define TGSI_CYLINDRICAL_WRAP_X (1 << 0)
#define TGSI_CYLINDRICAL_WRAP_Y (1 << 1)
#define TGSI_CYLINDRICAL_WRAP_Z (1 << 2)
@@ -138,9 +143,9 @@ struct tgsi_declaration_dimension
struct tgsi_declaration_interp
{
unsigned Interpolate : 4; /**< one of TGSI_INTERPOLATE_x */
- unsigned Centroid : 1; /**< centroid sampling? */
+ unsigned Location : 2; /**< one of TGSI_INTERPOLATE_LOC_x */
unsigned CylindricalWrap:4; /**< TGSI_CYLINDRICAL_WRAP_x flags */
- unsigned Padding : 23;
+ unsigned Padding : 22;
};
#define TGSI_SEMANTIC_POSITION 0