diff options
author | Kevin Rogovin <[email protected]> | 2018-08-15 14:29:28 +0300 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2018-08-20 13:32:43 -0700 |
commit | 7ec308d978019dd9aa0e7a756b5919e34431196d (patch) | |
tree | 19fd9ffcc40041ed33576307e15bb0512cc34e4d /src/compiler/glsl/builtin_functions.cpp | |
parent | 44df06211cf2c301f6ef9520c657ead369f99aeb (diff) |
Add NV_fragment_shader_interlock support.
The main purpose for having NV_fragment_shader_interlock
extension is because that extension is also for GLES31 while
the ARB extension is for GL only.
Reviewed-by: Plamena Manolova <[email protected]>
Diffstat (limited to 'src/compiler/glsl/builtin_functions.cpp')
-rw-r--r-- | src/compiler/glsl/builtin_functions.cpp | 18 |
1 files changed, 18 insertions, 0 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); |