[Mesa-dev,07/17] glsl: Add parser state enables for the framebuffer fetch extensions.

Submitted by Francisco Jerez on July 21, 2016, 4:49 a.m.

Details

Message ID 20160721044947.14076-7-currojerez@riseup.net
State New
Headers show
Series "Framebuffer fetch." ( rev: 11 10 9 8 7 6 5 4 3 2 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Francisco Jerez July 21, 2016, 4:49 a.m.
---
 src/compiler/glsl/glsl_parser_extras.cpp |  3 +++
 src/compiler/glsl/glsl_parser_extras.h   | 13 +++++++++++++
 2 files changed, 16 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 0077434..a2c1afe 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -647,11 +647,14 @@  static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
    EXT(EXT_clip_cull_distance,         false, true,      ARB_cull_distance),
    EXT(EXT_gpu_shader5,                false, true,      ARB_gpu_shader5),
    EXT(EXT_separate_shader_objects,    false, true,      dummy_true),
+   EXT(EXT_shader_framebuffer_fetch,   false, true,      MESA_shader_framebuffer_fetch),
    EXT(EXT_shader_integer_mix,         true,  true,      EXT_shader_integer_mix),
    EXT(EXT_shader_io_blocks,           false, true,      OES_shader_io_blocks),
    EXT(EXT_shader_samples_identical,   true,  true,      EXT_shader_samples_identical),
    EXT(EXT_texture_array,              true,  false,     EXT_texture_array),
    EXT(EXT_texture_buffer,             false, true,      OES_texture_buffer),
+   EXT(MESA_shader_framebuffer_fetch,  true, true,       MESA_shader_framebuffer_fetch),
+   EXT(MESA_shader_framebuffer_fetch_non_coherent, true, true, MESA_shader_framebuffer_fetch_non_coherent),
    EXT(MESA_shader_integer_functions,  true,  true,      MESA_shader_integer_functions),
 };
 
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index 9548e62..2753069 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -289,6 +289,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);
 
@@ -671,6 +678,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;
@@ -681,6 +690,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;
    /*@}*/