On Mon, Aug 7, 2017 at 5:54 AM, Samuel Pitoiset <[email protected]> wrote: > Other ones are either unsupported or don't have any helper > function checks. > > v5: - do not expose ARB system values for 460
ARB-suffixed functions > v4: - drop ARB suffix for shader_group_vote/arb_shader_atomic_counter_ops > v3: - always add gl_BaseVertex & co when 460 is enabled > v2: - fix ARB_shader_draw_parameters system value names > > Signed-off-by: Samuel Pitoiset <[email protected]> > --- > src/compiler/glsl/builtin_functions.cpp | 99 > +++++++++++++++++++++++++++------ > src/compiler/glsl/builtin_variables.cpp | 5 ++ > 2 files changed, 87 insertions(+), 17 deletions(-) > > diff --git a/src/compiler/glsl/builtin_functions.cpp > b/src/compiler/glsl/builtin_functions.cpp > index 84833bdd7d..0e035320aa 100644 > --- a/src/compiler/glsl/builtin_functions.cpp > +++ b/src/compiler/glsl/builtin_functions.cpp > @@ -150,6 +150,12 @@ v130_desktop(const _mesa_glsl_parse_state *state) > return state->is_version(130, 0); > } > > +static bool > +v460_desktop(const _mesa_glsl_parse_state *state) > +{ > + return state->is_version(460, 0); > +} > + > static bool > v130_fs_only(const _mesa_glsl_parse_state *state) > { > @@ -962,7 +968,8 @@ private: > > ir_function_signature *_vote_intrinsic(builtin_available_predicate avail, > enum ir_intrinsic_id id); > - ir_function_signature *_vote(const char *intrinsic_name); > + ir_function_signature *_vote(const char *intrinsic_name, > + builtin_available_predicate avail); > > #undef B0 > #undef B1 > @@ -1090,7 +1097,7 @@ builtin_builder::create_intrinsics() > _atomic_intrinsic2(buffer_atomics_supported, > glsl_type::int_type, > ir_intrinsic_generic_atomic_add), > - _atomic_counter_intrinsic1(shader_atomic_counter_ops, > + _atomic_counter_intrinsic1(always_available, > ir_intrinsic_atomic_counter_add), > NULL); > add_function("__intrinsic_atomic_min", OK, so your resolution was to make the atomic counter and vote intrinsics (but not the builtins) always available. Seems reasonable enough, although I might have gone with a new availability predicate that did old one || 460. Either way, this is Reviewed-by: Ilia Mirkin <[email protected]> _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
