glsl: add SYSTEM_VALUE_VERTEX_CNT
authorRob Clark <robclark@freedesktop.org>
Fri, 11 Sep 2015 21:01:23 +0000 (17:01 -0400)
committerRob Clark <robclark@freedesktop.org>
Thu, 17 Sep 2015 23:55:43 +0000 (19:55 -0400)
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@freedesktop.org>
src/glsl/shader_enums.c
src/glsl/shader_enums.h

index 530fd9e4081b7e6a356933c2a143246d63d7a24b..c196b791d4f2080dabce3caa3aa9e54b1db59641 100644 (file)
@@ -169,6 +169,7 @@ const char * gl_system_value_name(gl_system_value sysval)
      ENUM(SYSTEM_VALUE_TESS_LEVEL_INNER),
      ENUM(SYSTEM_VALUE_LOCAL_INVOCATION_ID),
      ENUM(SYSTEM_VALUE_WORK_GROUP_ID),
+     ENUM(SYSTEM_VALUE_VERTEX_CNT),
    };
    return NAME(sysval);
 }
index 385ca972809a86de43f951be835bca50b4b228aa..39780076e74536ef2455b35dda639619069788c5 100644 (file)
@@ -412,6 +412,12 @@ typedef enum
    SYSTEM_VALUE_WORK_GROUP_ID,
    /*@}*/
 
+   /**
+    * 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;