[Mesa-dev] [PATCH 1/3] glsl/cs: Add gl_GlobalInvocationID variable
Jordan Justen
jordan.l.justen at intel.com
Thu Aug 6 11:01:52 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 8fa7b19..5154b2f 100644
--- a/src/glsl/builtin_variables.cpp
+++ b/src/glsl/builtin_variables.cpp
@@ -1049,6 +1049,8 @@ builtin_variable_generator::generate_cs_special_vars()
"gl_LocalInvocationID");
add_system_value(SYSTEM_VALUE_WORK_GROUP_ID, glsl_type::uvec3_type,
"gl_WorkGroupID");
+ add_system_value(SYSTEM_VALUE_GLOBAL_INVOCATION_ID, glsl_type::uvec3_type,
+ "gl_GlobalInvocationID");
/* TODO: finish this. */
}
diff --git a/src/glsl/shader_enums.h b/src/glsl/shader_enums.h
index a23b874..af74eef 100644
--- a/src/glsl/shader_enums.h
+++ b/src/glsl/shader_enums.h
@@ -184,6 +184,7 @@ typedef enum
/*@{*/
SYSTEM_VALUE_LOCAL_INVOCATION_ID,
SYSTEM_VALUE_WORK_GROUP_ID,
+ SYSTEM_VALUE_GLOBAL_INVOCATION_ID,
/*@}*/
SYSTEM_VALUE_MAX /**< Number of values */
--
2.1.4
More information about the mesa-dev
mailing list