[Mesa-dev] [PATCH 07/11] glsl: add gl_LocalGroupSizeARB as a system value
Samuel Pitoiset
samuel.pitoiset at gmail.com
Sat Sep 10 13:50:39 UTC 2016
On 09/09/2016 08:50 PM, Ilia Mirkin wrote:
> On Thu, Sep 8, 2016 at 4:31 PM, Samuel Pitoiset
> <samuel.pitoiset at gmail.com> wrote:
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> ---
>> src/compiler/glsl/builtin_variables.cpp | 2 ++
>> src/compiler/shader_enums.h | 1 +
>> 2 files changed, 3 insertions(+)
>>
>> diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp
>> index f47daab..a1768fc 100644
>> --- a/src/compiler/glsl/builtin_variables.cpp
>> +++ b/src/compiler/glsl/builtin_variables.cpp
>> @@ -1236,6 +1236,8 @@ builtin_variable_generator::generate_cs_special_vars()
>> "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_system_value(SYSTEM_VALUE_LOCAL_GROUP_SIZE,
>> + uvec3_t, "gl_LocalGroupSizeARB");
>
> if (state->ARB_bla_bla_bla_enable) { } I think
Yep, I added that check. Thanks.
>
>> if (state->ctx->Const.LowerCsDerivedVariables) {
>> add_variable("gl_GlobalInvocationID", uvec3_t, ir_var_auto, 0);
>> add_variable("gl_LocalInvocationIndex", uint_t, ir_var_auto, 0);
>> diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h
>> index c3a62e0..b6e048e 100644
>> --- a/src/compiler/shader_enums.h
>> +++ b/src/compiler/shader_enums.h
>> @@ -472,6 +472,7 @@ typedef enum
>> SYSTEM_VALUE_GLOBAL_INVOCATION_ID,
>> SYSTEM_VALUE_WORK_GROUP_ID,
>> SYSTEM_VALUE_NUM_WORK_GROUPS,
>> + SYSTEM_VALUE_LOCAL_GROUP_SIZE,
>> /*@}*/
>>
>> /**
>> --
>> 2.9.3
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list