[Mesa-dev] [PATCH 1/2] glsl: enable 'shared' keyword also for layout qualifiers
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Thu Nov 12 05:22:39 PST 2015
'shared' was added in ARB_uniform_buffer_object and also used
in ARB_shader_storage_buffer_object.
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
More information about the mesa-dev
mailing list