<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Aug 2, 2017 6:56 AM, "Samuel Pitoiset" <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Other ones are either unsupported or don't have any helper<br>
function checks.<br>
<br>
Signed-off-by: Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>><br>
---<br>
 src/compiler/glsl/builtin_<wbr>functions.cpp | 6 ++++--<br>
 src/compiler/glsl/builtin_<wbr>variables.cpp | 2 +-<br>
 src/compiler/glsl/glsl_parser_<wbr>extras.h  | 5 +++++<br>
 3 files changed, 10 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/compiler/glsl/builtin_<wbr>functions.cpp b/src/compiler/glsl/builtin_<wbr>functions.cpp<br>
index 84833bdd7d..5a0c78ec4a 100644<br>
--- a/src/compiler/glsl/builtin_<wbr>functions.cpp<br>
+++ b/src/compiler/glsl/builtin_<wbr>functions.cpp<br>
@@ -483,7 +483,8 @@ shader_atomic_counters(const _mesa_glsl_parse_state *state)<br>
 static bool<br>
 shader_atomic_counter_ops(<wbr>const _mesa_glsl_parse_state *state)<br>
 {<br>
-   return state->ARB_shader_atomic_<wbr>counter_ops_enable;<br>
+   return (state->is_version(460, 0) ||<br>
+           state->ARB_shader_atomic_<wbr>counter_ops_enable);<br>
 }<br>
<br>
 static bool<br>
@@ -606,7 +607,8 @@ barrier_supported(const _mesa_glsl_parse_state *state)<br>
 static bool<br>
 vote(const _mesa_glsl_parse_state *state)<br>
 {<br>
-   return state->ARB_shader_group_vote_<wbr>enable;<br>
+   return (state->is_version(460, 0) ||<br>
+           state->ARB_shader_group_vote_<wbr>enable);<br>
 }<br>
<br>
 static bool<br>
diff --git a/src/compiler/glsl/builtin_<wbr>variables.cpp b/src/compiler/glsl/builtin_<wbr>variables.cpp<br>
index 19d427e4bc..572a84785b 100644<br>
--- a/src/compiler/glsl/builtin_<wbr>variables.cpp<br>
+++ b/src/compiler/glsl/builtin_<wbr>variables.cpp<br>
@@ -1021,7 +1021,7 @@ builtin_variable_generator::<wbr>generate_vs_special_vars()<br>
       add_system_value(SYSTEM_VALUE_<wbr>INSTANCE_ID, int_t, "gl_InstanceIDARB");<br>
    if (state->ARB_draw_instanced_<wbr>enable || state->is_version(140, 300))<br>
       add_system_value(SYSTEM_VALUE_<wbr>INSTANCE_ID, int_t, "gl_InstanceID");<br>
-   if (state->ARB_shader_draw_<wbr>parameters_enable) {<br>
+   if (state->has_shader_draw_<wbr>parameters()) {<br>
       add_system_value(SYSTEM_VALUE_<wbr>BASE_VERTEX, int_t, "gl_BaseVertexARB");<br>
       add_system_value(SYSTEM_VALUE_<wbr>BASE_INSTANCE, int_t, "gl_BaseInstanceARB");<br>
       add_system_value(SYSTEM_VALUE_<wbr>DRAW_ID, int_t, "gl_DrawIDARB");<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">I haven't read the spec, but are you sure about those suffixes for the core GL support?</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
diff --git a/src/compiler/glsl/glsl_<wbr>parser_extras.h b/src/compiler/glsl/glsl_<wbr>parser_extras.h<br>
index fb35813087..c229030ef7 100644<br>
--- a/src/compiler/glsl/glsl_<wbr>parser_extras.h<br>
+++ b/src/compiler/glsl/glsl_<wbr>parser_extras.h<br>
@@ -339,6 +339,11 @@ struct _mesa_glsl_parse_state {<br>
       return ARB_bindless_texture_enable;<br>
    }<br>
<br>
+   bool has_shader_draw_parameters() const<br>
+   {<br>
+      return ARB_shader_draw_parameters_<wbr>enable || is_version(460, 0);<br>
+   }<br>
+<br>
    void process_version_directive(<wbr>YYLTYPE *locp, int version,<br>
                                   const char *ident);<br>
<font color="#888888"><br>
--<br>
2.13.3<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">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></blockquote></div><br></div></div></div>