[Mesa-dev] [PATCH 1/4] glsl/cs: Add gl_WorkGroupID variable
Ian Romanick
idr at freedesktop.org
Wed Aug 5 09:02:47 PDT 2015
On 08/04/2015 11:24 AM, Jordan Justen wrote:
> 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. */
Are there still more to add?
> }
>
> 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,
Does adding this add any warnings about switch-statments that don't
handle all enum values?
> /*@}*/
>
> SYSTEM_VALUE_MAX /**< Number of values */
>
More information about the mesa-dev
mailing list