[Mesa-dev] [Mesa-dev,1/4] glsl/cs: Add gl_WorkGroupID variable
Kristian Høgsberg
krh at bitplanet.net
Thu Sep 10 12:19:50 PDT 2015
Jordan Justen <jordan.l.justen at intel.com> writes:
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
>
> ---
> 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 */
More information about the mesa-dev
mailing list