<div dir="ltr">Hi Kevin,<div>This looks good to me :)</div><div><br></div><div>Reviewed-by: Plamena Manolova <<a href="mailto:plamena.manolova@intel.com" target="_blank">plamena.manolova@intel.com</a>></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 15, 2018 at 2:29 PM, <span dir="ltr"><<a href="mailto:kevin.rogovin@intel.com" target="_blank">kevin.rogovin@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Kevin Rogovin <<a href="mailto:kevin.rogovin@gmail.com" target="_blank">kevin.rogovin@gmail.com</a>><br>
<br>
The main purpose for having NV_fragment_shader_interlock<br>
extension is because that extension is also for GLES31 while<br>
the ARB extension is for GL only.<br>
---<br>
src/compiler/glsl/builtin_fun<wbr>ctions.cpp | 18 ++++++++++++++++++<br>
src/compiler/glsl/glsl_<wbr>parser.yy | 6 ++++--<br>
src/compiler/glsl/glsl_<wbr>parser_extras.cpp | 1 +<br>
src/compiler/glsl/glsl_<wbr>parser_extras.h | 2 ++<br>
src/mesa/main/extensions_tabl<wbr>e.h | 1 +<br>
5 files changed, 26 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/compiler/glsl/builtin_fu<wbr>nctions.cpp b/src/compiler/glsl/builtin_fu<wbr>nctions.cpp<br>
index 7119903795..e7b78c0158 100644<br>
--- a/src/compiler/glsl/builtin_fu<wbr>nctions.cpp<br>
+++ b/src/compiler/glsl/builtin_fu<wbr>nctions.cpp<br>
@@ -519,6 +519,12 @@ supports_arb_fragment_shader_i<wbr>nterlock(const _mesa_glsl_parse_state *state)<br>
return state->ARB_fragment_shader_int<wbr>erlock_enable;<br>
}<br>
<br>
+static bool<br>
+supports_nv_fragment_shader_i<wbr>nterlock(const _mesa_glsl_parse_state *state)<br>
+{<br>
+ return state->NV_fragment_shader_inte<wbr>rlock_enable;<br>
+}<br>
+<br>
static bool<br>
shader_clock(const _mesa_glsl_parse_state *state)<br>
{<br>
@@ -3331,6 +3337,18 @@ builtin_builder::create_builti<wbr>ns()<br>
supports_arb_fragment_shader_i<wbr>nterlock),<br>
NULL);<br>
<br>
+ add_function("beginInvocation<wbr>InterlockNV",<br>
+ _invocation_interlock(<br>
+ "__intrinsic_begin_<wbr>invocation_interlock",<br>
+ supports_nv_fragment_shader_i<wbr>nterlock),<br>
+ NULL);<br>
+<br>
+ add_function("endInvocationIn<wbr>terlockNV",<br>
+ _invocation_interlock(<br>
+ "__intrinsic_end_invocation_i<wbr>nterlock",<br>
+ supports_nv_fragment_shader_i<wbr>nterlock),<br>
+ NULL);<br>
+<br>
add_function("anyInvocationARB<wbr>",<br>
_vote("__intrinsic_vote_any", vote),<br>
NULL);<br>
diff --git a/src/compiler/glsl/glsl_parse<wbr>r.yy b/src/compiler/glsl/glsl_parse<wbr>r.yy<br>
index cb7376995d..bc2571b684 100644<br>
--- a/src/compiler/glsl/glsl_parse<wbr>r.yy<br>
+++ b/src/compiler/glsl/glsl_parse<wbr>r.yy<br>
@@ -1450,10 +1450,12 @@ layout_qualifier_id:<br>
"only valid in fragment shader input layout declaration.");<br>
} else if (pixel_interlock_ordered + pixel_interlock_unordered +<br>
sample_interlock_ordered + sample_interlock_unordered > 0 &&<br>
- !state->ARB_fragment_shader_i<wbr>nterlock_enable) {<br>
+ !state->ARB_fragment_shader_i<wbr>nterlock_enable &&<br>
+ !state->NV_fragment_shader_in<wbr>terlock_enable) {<br>
_mesa_glsl_error(& @1, state,<br>
"interlock layout qualifier present, but the "<br>
- "GL_ARB_fragment_shader_interl<wbr>ock extension is not "<br>
+ "GL_ARB_fragment_shader_interl<wbr>ock or "<br>
+ "GL_NV_fragment_shader_interlo<wbr>ck extension is not "<br>
"enabled.");<br>
} else {<br>
$$.flags.q.pixel_interlock_ord<wbr>ered = pixel_interlock_ordered;<br>
diff --git a/src/compiler/glsl/glsl_parse<wbr>r_extras.cpp b/src/compiler/glsl/glsl_parse<wbr>r_extras.cpp<br>
index 6d92f24ea2..393942b62c 100644<br>
--- a/src/compiler/glsl/glsl_parse<wbr>r_extras.cpp<br>
+++ b/src/compiler/glsl/glsl_parse<wbr>r_extras.cpp<br>
@@ -724,6 +724,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extension<wbr>s[] = {<br>
EXT_AEP(EXT_texture_cube_map_a<wbr>rray),<br>
EXT(INTEL_conservative_rasteri<wbr>zation),<br>
EXT(MESA_shader_integer_functi<wbr>ons),<br>
+ EXT(NV_fragment_shader_interl<wbr>ock),<br>
EXT(NV_image_formats),<br>
};<br>
<br>
diff --git a/src/compiler/glsl/glsl_parse<wbr>r_extras.h b/src/compiler/glsl/glsl_parse<wbr>r_extras.h<br>
index 59a173418b..3b17b54f0a 100644<br>
--- a/src/compiler/glsl/glsl_parse<wbr>r_extras.h<br>
+++ b/src/compiler/glsl/glsl_parse<wbr>r_extras.h<br>
@@ -810,6 +810,8 @@ struct _mesa_glsl_parse_state {<br>
bool INTEL_conservative_rasterizati<wbr>on_warn;<br>
bool MESA_shader_integer_functions_<wbr>enable;<br>
bool MESA_shader_integer_functions_<wbr>warn;<br>
+ bool NV_fragment_shader_interlock_e<wbr>nable;<br>
+ bool NV_fragment_shader_interlock_w<wbr>arn;<br>
bool NV_image_formats_enable;<br>
bool NV_image_formats_warn;<br>
/*@}*/<br>
diff --git a/src/mesa/main/extensions_tab<wbr>le.h b/src/mesa/main/extensions_tab<wbr>le.h<br>
index af5ce118da..746e821886 100644<br>
--- a/src/mesa/main/extensions_tab<wbr>le.h<br>
+++ b/src/mesa/main/extensions_tab<wbr>le.h<br>
@@ -346,6 +346,7 @@ EXT(NV_draw_buffers , dummy_true<br>
EXT(NV_fbo_color_attachments , dummy_true , x , x , x , ES2, 2010)<br>
EXT(NV_fill_rectangle , NV_fill_rectangle , GLL, GLC, x , x , 2015)<br>
EXT(NV_fog_distance , NV_fog_distance , GLL, x , x , x , 2001)<br>
+EXT(NV_fragment_shader_interl<wbr>ock , ARB_fragment_shader_interlock , GLL, GLC, x , 31, 2015)<br>
EXT(NV_image_formats , ARB_shader_image_load_store , x , x , x , 31, 2014)<br>
EXT(NV_light_max_exponent , dummy_true , GLL, x , x , x , 1999)<br>
EXT(NV_packed_depth_stencil , dummy_true , GLL, GLC, x , x , 2000)<br>
<span class="m_-2058014167294803976HOEnZb"><font color="#888888">-- <br>
2.17.1<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>