summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-10-17 23:15:28 +0200
committerMarek Olšák <[email protected]>2015-10-20 12:58:25 +0200
commite70c66197ea10cf052010c7352420a2ae0b0a50a (patch)
tree975708dc7cf7b27d7de7feb49beff1bcc1ddc578 /src
parent67f489ded3a4c575e203dc82368ebe645e72079a (diff)
gallium: add new properties for clip and cull distance usage
The TGSI usage mask can't be used, because these are declared as an output array of 2 elements. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_strings.c2
-rw-r--r--src/gallium/docs/source/tgsi.rst10
-rw-r--r--src/gallium/include/pipe/p_shader_tokens.h4
3 files changed, 15 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c
index 8271ea08177..89369d60f4e 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_strings.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c
@@ -137,6 +137,8 @@ const char *tgsi_property_names[TGSI_PROPERTY_COUNT] =
"TES_SPACING",
"TES_VERTEX_ORDER_CW",
"TES_POINT_MODE",
+ "NUM_CLIPDIST_ENABLED",
+ "NUM_CULLDIST_ENABLED",
};
const char *tgsi_return_type_names[TGSI_RETURN_TYPE_COUNT] =
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index 314fe1bb74f..01e18f3084e 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -3126,6 +3126,16 @@ TES_POINT_MODE
If set to a non-zero value, this turns on point mode for the tessellator,
which means that points will be generated instead of primitives.
+NUM_CLIPDIST_ENABLED
+""""""""""""""""
+
+How many clip distance scalar outputs are enabled.
+
+NUM_CULLDIST_ENABLED
+""""""""""""""""
+
+How many cull distance scalar outputs are enabled.
+
Texture Sampling and Texture Formats
------------------------------------
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index b36e0a35b8d..e0ab9013dd5 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -267,7 +267,9 @@ union tgsi_immediate_data
#define TGSI_PROPERTY_TES_SPACING 12
#define TGSI_PROPERTY_TES_VERTEX_ORDER_CW 13
#define TGSI_PROPERTY_TES_POINT_MODE 14
-#define TGSI_PROPERTY_COUNT 15
+#define TGSI_PROPERTY_NUM_CLIPDIST_ENABLED 15
+#define TGSI_PROPERTY_NUM_CULLDIST_ENABLED 16
+#define TGSI_PROPERTY_COUNT 17
struct tgsi_property {
unsigned Type : 4; /**< TGSI_TOKEN_TYPE_PROPERTY */