From f5bb5a1bf180b80a4fee12d60e97ac4c6f80876c Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Fri, 10 Oct 2014 08:28:24 -0700 Subject: glsl/cs: Add gl_WorkGroupID variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jordan Justen Reviewed-by: Kristian Høgsberg --- src/glsl/builtin_variables.cpp | 1 + src/glsl/shader_enums.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index f185d93..fbcec35 100644 --- a/src/glsl/builtin_variables.cpp +++ b/src/glsl/builtin_variables.cpp @@ -1055,6 +1055,7 @@ 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"); /* TODO: finish this. */ } diff --git a/src/glsl/shader_enums.h b/src/glsl/shader_enums.h index 3b80a1d..7c598b6 100644 --- a/src/glsl/shader_enums.h +++ b/src/glsl/shader_enums.h @@ -370,6 +370,7 @@ typedef enum */ /*@{*/ SYSTEM_VALUE_LOCAL_INVOCATION_ID, + SYSTEM_VALUE_WORK_GROUP_ID, /*@}*/ SYSTEM_VALUE_MAX /**< Number of values */ -- cgit v1.1