[Mesa-dev] [PATCH 1/2] glsl: enable 'shared' keyword also for layout qualifiers

Samuel Iglesias Gonsálvez siglesias at igalia.com
Thu Nov 12 07:36:39 PST 2015



On 12/11/15 15:28, Timothy Arceri wrote:
> 
> 
> On 13 November 2015 12:22:39 am AEDT, "Samuel Iglesias Gonsálvez" <siglesias at igalia.com> wrote:
>> 'shared' was added in ARB_uniform_buffer_object and also used
>> in ARB_shader_storage_buffer_object.
> 
> Hi Samuel,
> 
> Shared for UBO and SSBOs is not a key word its just an identifier for a layout qualifier, are you sure you need to make it available for those extensions?
> 

Right. Please ignore this patch.

Sam

>>
>> A later patch will fix the shader layout qualifier regressions
>> in dEQP.
>>
>> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
>> ---
>> src/glsl/glsl_lexer.ll | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll
>> index e59f93e..fc58ea0 100644
>> --- a/src/glsl/glsl_lexer.ll
>> +++ b/src/glsl/glsl_lexer.ll
>> @@ -414,7 +414,14 @@ writeonly      KEYWORD_WITH_ALT(420, 300, 420,
>> 310, yyextra->ARB_shader_image_lo
>>
>> atomic_uint     KEYWORD_WITH_ALT(420, 300, 420, 310,
>> yyextra->ARB_shader_atomic_counters_enable, ATOMIC_UINT);
>>
>> -shared          KEYWORD_WITH_ALT(430, 310, 430, 310,
>> yyextra->ARB_compute_shader_enable, SHARED);
>> +shared		{
>> +		   if ((yyextra->is_version(430, 310))
>> +		      || yyextra->ARB_uniform_buffer_object_enable
>> +		      || yyextra->ARB_shader_storage_buffer_object_enable
>> +		      || yyextra->ARB_compute_shader_enable) {
>> +		      return SHARED;
>> +		   }
>> +		}
>>
>> struct		return STRUCT;
>> void		return VOID_TOK;
>> -- 
>> 2.5.0
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 
> 


More information about the mesa-dev mailing list