[Mesa-dev] [PATCH 12/26] glsl/shader_enums: Add the other two compute builtins
Roland Scheidegger
sroland at vmware.com
Mon Apr 11 22:13:46 UTC 2016
Am 11.04.2016 um 23:50 schrieb Jose Fonseca:
> On 25/03/16 23:12, Jason Ekstrand wrote:
>> These weren't added before because they are actually calculated values
>> that
>> are computed from other inputs. However, in order to handle them in
>> nir_lower_system_values, it's nice for them to have a cannonical
>> locaiton.
>> ---
>> src/compiler/shader_enums.c | 2 ++
>> src/compiler/shader_enums.h | 2 ++
>> 2 files changed, 4 insertions(+)
>>
>> diff --git a/src/compiler/shader_enums.c b/src/compiler/shader_enums.c
>> index 003ad3b..ff2f564 100644
>> --- a/src/compiler/shader_enums.c
>> +++ b/src/compiler/shader_enums.c
>> @@ -215,6 +215,8 @@ gl_system_value_name(gl_system_value sysval)
>> ENUM(SYSTEM_VALUE_TESS_LEVEL_OUTER),
>> ENUM(SYSTEM_VALUE_TESS_LEVEL_INNER),
>> ENUM(SYSTEM_VALUE_LOCAL_INVOCATION_ID),
>> + ENUM(SYSTEM_VALUE_LOCAL_INVOCATION_INDEX),
>> + ENUM(SYSTEM_VALUE_GLOBAL_INVOCATION_ID),
>> ENUM(SYSTEM_VALUE_WORK_GROUP_ID),
>> ENUM(SYSTEM_VALUE_NUM_WORK_GROUPS),
>> ENUM(SYSTEM_VALUE_VERTEX_CNT),
>> diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h
>> index 2ae129b..d44aabf 100644
>> --- a/src/compiler/shader_enums.h
>> +++ b/src/compiler/shader_enums.h
>> @@ -459,6 +459,8 @@ typedef enum
>> */
>> /*@{*/
>> SYSTEM_VALUE_LOCAL_INVOCATION_ID,
>> + SYSTEM_VALUE_LOCAL_INVOCATION_INDEX,
>> + SYSTEM_VALUE_GLOBAL_INVOCATION_ID,
>> SYSTEM_VALUE_WORK_GROUP_ID,
>> SYSTEM_VALUE_NUM_WORK_GROUPS,
>> /*@}*/
>>
>
>
> This changes broke st_glsl_to_tgsi.c.
>
> It seems that code assumes that the MESA and TGSI enums match 1:1. I
> think it's a bad assumption to make, but it's not a trivial one liner fix.
>
> Everything in gallium is busted without this (every single test is
> asserting). But it's late for me here to tackle on this. If there's no
> easy fix, could we revert it? I can look into making st_glsl_to_tgsi.c
> more robust tomorrow if nobody beats me to it.
>
> Jose
I think it actually was the change before it which broke it.
Nevertheless, adding a couple 0's to _mesa_sysval_to_semantic should
probably fix it...
Roland
More information about the mesa-dev
mailing list