glsl: Add parser state enables for the framebuffer fetch extensions.
authorFrancisco Jerez <currojerez@riseup.net>
Tue, 26 Jul 2016 00:24:52 +0000 (17:24 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 24 Aug 2016 20:28:30 +0000 (13:28 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/glsl/glsl_parser_extras.cpp
src/compiler/glsl/glsl_parser_extras.h

index 14a5540063c38228d4d4da72d8a9a992303cfde3..a18575920f5c3b106b82b9e01c85dbb9c579b42a 100644 (file)
@@ -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),
index 0294ef79abe9784d1f95fb083fafacf5ad77052d..3311688aa6fe985cf3027b6c85b38265ef5616d1 100644 (file)
@@ -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;
    /*@}*/