[Mesa-dev] [PATCH 06/11] glsl: add SYSTEM_VALUE_VERTEX_CNT

Rob Clark robdclark at gmail.com
Sun Sep 13 08:51:53 PDT 2015


From: Rob Clark <robclark at freedesktop.org>

Used internally in freedreno/ir3 to calc stream-out position.  Seems
like a generic enough way to implement stream-out (using str instrs),
plus it avoids compiler warnings by sneaking in a non-enum value in
switch statements.

Signed-off-by: Rob Clark <robclark at freedesktop.org>
---
 src/glsl/shader_enums.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/glsl/shader_enums.h b/src/glsl/shader_enums.h
index d054b87..fb4bcd0 100644
--- a/src/glsl/shader_enums.h
+++ b/src/glsl/shader_enums.h
@@ -402,6 +402,12 @@ typedef enum
    SYSTEM_VALUE_TESS_LEVEL_INNER, /**< TES input */
    /*@}*/
 
+   /**
+    * Driver internal vertex-count, used (for example) for drivers to
+    * calculate stride for stream-out outputs.  Not externally visible.
+    */
+   SYSTEM_VALUE_VERTEX_CNT,
+
    SYSTEM_VALUE_MAX             /**< Number of values */
 } gl_system_value;
 
-- 
2.4.3



More information about the mesa-dev mailing list