[Mesa-dev] [PATCH 1/4] glsl/cs: Add gl_WorkGroupID variable

Jordan Justen jordan.l.justen at intel.com
Tue Aug 4 11:24:07 PDT 2015


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 src/glsl/builtin_variables.cpp | 2 ++
 src/glsl/shader_enums.h        | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index b2936a5..8fa7b19 100644
--- a/src/glsl/builtin_variables.cpp
+++ b/src/glsl/builtin_variables.cpp
@@ -1047,6 +1047,8 @@ builtin_variable_generator::generate_cs_special_vars()
 {
    add_system_value(SYSTEM_VALUE_LOCAL_INVOCATION_ID, glsl_type::uvec3_type,
                     "gl_LocalInvocationID");
+   add_system_value(SYSTEM_VALUE_WORK_GROUP_ID, glsl_type::uvec3_type,
+                    "gl_WorkGroupID");
    /* TODO: finish this. */
 }
 
diff --git a/src/glsl/shader_enums.h b/src/glsl/shader_enums.h
index 64e1e46..a23b874 100644
--- a/src/glsl/shader_enums.h
+++ b/src/glsl/shader_enums.h
@@ -183,6 +183,7 @@ typedef enum
     */
    /*@{*/
    SYSTEM_VALUE_LOCAL_INVOCATION_ID,
+   SYSTEM_VALUE_WORK_GROUP_ID,
    /*@}*/
 
    SYSTEM_VALUE_MAX             /**< Number of values */
-- 
2.1.4



More information about the mesa-dev mailing list