mesa: Extension boilerplate for EXT_demote_to_helper_invocation
[mesa.git] / src / compiler / glsl / glsl_parser_extras.h
index 3294838db4f1246adb2d7c3921eada7d04b19854..2c64e88414d7f66585d8718a34d07d1b039396f5 100644 (file)
@@ -141,7 +141,8 @@ struct _mesa_glsl_parse_state {
 
    bool check_bitwise_operations_allowed(YYLTYPE *locp)
    {
-      return check_version(130, 300, locp, "bit-wise operations are forbidden");
+      return EXT_gpu_shader4_enable ||
+             check_version(130, 300, locp, "bit-wise operations are forbidden");
    }
 
    bool check_explicit_attrib_stream_allowed(YYLTYPE *locp)
@@ -336,7 +337,9 @@ struct _mesa_glsl_parse_state {
 
    bool has_shader_image_load_store() const
    {
-      return ARB_shader_image_load_store_enable || is_version(420, 310);
+      return ARB_shader_image_load_store_enable ||
+             EXT_shader_image_load_store_enable ||
+             is_version(420, 310);
    }
 
    bool has_bindless() const
@@ -604,6 +607,10 @@ struct _mesa_glsl_parse_state {
    /** Have we found a return statement in this function? */
    bool found_return;
 
+   /** Have we found the interlock builtins in this function? */
+   bool found_begin_interlock;
+   bool found_end_interlock;
+
    /** Was there an error during compilation? */
    bool error;
 
@@ -809,6 +816,8 @@ struct _mesa_glsl_parse_state {
    bool EXT_blend_func_extended_warn;
    bool EXT_clip_cull_distance_enable;
    bool EXT_clip_cull_distance_warn;
+   bool EXT_demote_to_helper_invocation_enable;
+   bool EXT_demote_to_helper_invocation_warn;
    bool EXT_draw_buffers_enable;
    bool EXT_draw_buffers_warn;
    bool EXT_frag_depth_enable;
@@ -831,6 +840,8 @@ struct _mesa_glsl_parse_state {
    bool EXT_shader_framebuffer_fetch_non_coherent_warn;
    bool EXT_shader_image_load_formatted_enable;
    bool EXT_shader_image_load_formatted_warn;
+   bool EXT_shader_image_load_store_enable;
+   bool EXT_shader_image_load_store_warn;
    bool EXT_shader_implicit_conversions_enable;
    bool EXT_shader_implicit_conversions_warn;
    bool EXT_shader_integer_mix_enable;
@@ -851,6 +862,8 @@ struct _mesa_glsl_parse_state {
    bool EXT_texture_cube_map_array_warn;
    bool EXT_texture_query_lod_enable;
    bool EXT_texture_query_lod_warn;
+   bool EXT_texture_shadow_lod_enable;
+   bool EXT_texture_shadow_lod_warn;
    bool INTEL_conservative_rasterization_enable;
    bool INTEL_conservative_rasterization_warn;
    bool INTEL_shader_atomic_float_minmax_enable;
@@ -1013,11 +1026,6 @@ extern int glcpp_preprocess(void *ctx, const char **shader, char **info_log,
                             struct _mesa_glsl_parse_state *state,
                             struct gl_context *gl_ctx);
 
-extern void _mesa_init_shader_compiler_types(void);
-extern void _mesa_destroy_shader_compiler_types(void);
-extern void _mesa_destroy_shader_compiler(void);
-extern void _mesa_destroy_shader_compiler_caches(void);
-
 extern void
 _mesa_glsl_copy_symbols_from_table(struct exec_list *shader_ir,
                                    struct glsl_symbol_table *src,