From d7cd7b9c49ab01b954702783493fe22cd2bb38f1 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Mon, 25 Jul 2016 17:24:52 -0700 Subject: [PATCH] glsl: Add parser state enables for the framebuffer fetch extensions. Reviewed-by: Kenneth Graunke --- src/compiler/glsl/glsl_parser_extras.cpp | 1 + src/compiler/glsl/glsl_parser_extras.h | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index 14a5540063c..a18575920f5 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -652,6 +652,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = { EXT(EXT_clip_cull_distance), EXT(EXT_gpu_shader5), EXT(EXT_separate_shader_objects), + EXT(EXT_shader_framebuffer_fetch), EXT(EXT_shader_integer_mix), EXT(EXT_shader_io_blocks), EXT(EXT_shader_samples_identical), diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h index 0294ef79abe..3311688aa6f 100644 --- a/src/compiler/glsl/glsl_parser_extras.h +++ b/src/compiler/glsl/glsl_parser_extras.h @@ -308,6 +308,13 @@ struct _mesa_glsl_parse_state { is_version(450, 0); } + bool has_framebuffer_fetch() const + { + return EXT_shader_framebuffer_fetch_enable || + MESA_shader_framebuffer_fetch_enable || + MESA_shader_framebuffer_fetch_non_coherent_enable; + } + void process_version_directive(YYLTYPE *locp, int version, const char *ident); @@ -696,6 +703,8 @@ struct _mesa_glsl_parse_state { bool EXT_gpu_shader5_warn; bool EXT_separate_shader_objects_enable; bool EXT_separate_shader_objects_warn; + bool EXT_shader_framebuffer_fetch_enable; + bool EXT_shader_framebuffer_fetch_warn; bool EXT_shader_integer_mix_enable; bool EXT_shader_integer_mix_warn; bool EXT_shader_io_blocks_enable; @@ -710,6 +719,10 @@ struct _mesa_glsl_parse_state { bool EXT_texture_array_warn; bool EXT_texture_buffer_enable; bool EXT_texture_buffer_warn; + bool MESA_shader_framebuffer_fetch_enable; + bool MESA_shader_framebuffer_fetch_warn; + bool MESA_shader_framebuffer_fetch_non_coherent_enable; + bool MESA_shader_framebuffer_fetch_non_coherent_warn; bool MESA_shader_integer_functions_enable; bool MESA_shader_integer_functions_warn; /*@}*/ -- 2.30.2