aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2015-08-20 15:56:53 -0700
committerJordan Justen <[email protected]>2015-09-29 08:23:47 -0700
commitf6ae91406966c0fdcfcd628539e34964ae0ab1a6 (patch)
treee262431611224b36a37c8f1a9948049213a3fd90 /src
parent63d7b33f516815ce3f9b3bb1b26a39f1545a4446 (diff)
glsl/cs: Add gl_NumWorkGroups as a system value
Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/builtin_variables.cpp2
-rw-r--r--src/glsl/shader_enums.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index 0722051c08e..a6ad1050552 100644
--- a/src/glsl/builtin_variables.cpp
+++ b/src/glsl/builtin_variables.cpp
@@ -1058,9 +1058,9 @@ builtin_variable_generator::generate_cs_special_vars()
add_system_value(SYSTEM_VALUE_LOCAL_INVOCATION_ID, uvec3_t,
"gl_LocalInvocationID");
add_system_value(SYSTEM_VALUE_WORK_GROUP_ID, uvec3_t, "gl_WorkGroupID");
+ add_system_value(SYSTEM_VALUE_NUM_WORK_GROUPS, uvec3_t, "gl_NumWorkGroups");
add_variable("gl_GlobalInvocationID", uvec3_t, ir_var_auto, 0);
add_variable("gl_LocalInvocationIndex", uint_t, ir_var_auto, 0);
- /* TODO: finish this. */
}
diff --git a/src/glsl/shader_enums.h b/src/glsl/shader_enums.h
index 39780076e74..99acc640496 100644
--- a/src/glsl/shader_enums.h
+++ b/src/glsl/shader_enums.h
@@ -410,6 +410,7 @@ typedef enum
/*@{*/
SYSTEM_VALUE_LOCAL_INVOCATION_ID,
SYSTEM_VALUE_WORK_GROUP_ID,
+ SYSTEM_VALUE_NUM_WORK_GROUPS,
/*@}*/
/**