summaryrefslogtreecommitdiffstats
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/glsl/builtin_functions.cpp18
-rw-r--r--src/compiler/glsl/glsl_parser.yy6
-rw-r--r--src/compiler/glsl/glsl_parser_extras.cpp1
-rw-r--r--src/compiler/glsl/glsl_parser_extras.h2
4 files changed, 25 insertions, 2 deletions
diff --git a/src/compiler/glsl/builtin_functions.cpp b/src/compiler/glsl/builtin_functions.cpp
index 7119903795f..e7b78c01587 100644
--- a/src/compiler/glsl/builtin_functions.cpp
+++ b/src/compiler/glsl/builtin_functions.cpp
@@ -520,6 +520,12 @@ supports_arb_fragment_shader_interlock(const _mesa_glsl_parse_state *state)
}
static bool
+supports_nv_fragment_shader_interlock(const _mesa_glsl_parse_state *state)
+{
+ return state->NV_fragment_shader_interlock_enable;
+}
+
+static bool
shader_clock(const _mesa_glsl_parse_state *state)
{
return state->ARB_shader_clock_enable;
@@ -3331,6 +3337,18 @@ builtin_builder::create_builtins()
supports_arb_fragment_shader_interlock),
NULL);
+ add_function("beginInvocationInterlockNV",
+ _invocation_interlock(
+ "__intrinsic_begin_invocation_interlock",
+ supports_nv_fragment_shader_interlock),
+ NULL);
+
+ add_function("endInvocationInterlockNV",
+ _invocation_interlock(
+ "__intrinsic_end_invocation_interlock",
+ supports_nv_fragment_shader_interlock),
+ NULL);
+
add_function("anyInvocationARB",
_vote("__intrinsic_vote_any", vote),
NULL);
diff --git a/src/compiler/glsl/glsl_parser.yy b/src/compiler/glsl/glsl_parser.yy
index cb7376995d2..bc2571b6844 100644
--- a/src/compiler/glsl/glsl_parser.yy
+++ b/src/compiler/glsl/glsl_parser.yy
@@ -1450,10 +1450,12 @@ layout_qualifier_id:
"only valid in fragment shader input layout declaration.");
} else if (pixel_interlock_ordered + pixel_interlock_unordered +
sample_interlock_ordered + sample_interlock_unordered > 0 &&
- !state->ARB_fragment_shader_interlock_enable) {
+ !state->ARB_fragment_shader_interlock_enable &&
+ !state->NV_fragment_shader_interlock_enable) {
_mesa_glsl_error(& @1, state,
"interlock layout qualifier present, but the "
- "GL_ARB_fragment_shader_interlock extension is not "
+ "GL_ARB_fragment_shader_interlock or "
+ "GL_NV_fragment_shader_interlock extension is not "
"enabled.");
} else {
$$.flags.q.pixel_interlock_ordered = pixel_interlock_ordered;
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 6d92f24ea22..393942b62c3 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -724,6 +724,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
EXT_AEP(EXT_texture_cube_map_array),
EXT(INTEL_conservative_rasterization),
EXT(MESA_shader_integer_functions),
+ EXT(NV_fragment_shader_interlock),
EXT(NV_image_formats),
};
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index 59a173418b7..3b17b54f0a2 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -810,6 +810,8 @@ struct _mesa_glsl_parse_state {
bool INTEL_conservative_rasterization_warn;
bool MESA_shader_integer_functions_enable;
bool MESA_shader_integer_functions_warn;
+ bool NV_fragment_shader_interlock_enable;
+ bool NV_fragment_shader_interlock_warn;
bool NV_image_formats_enable;
bool NV_image_formats_warn;
/*@}*/