diff options
author | Francisco Jerez <[email protected]> | 2013-10-20 12:39:16 -0700 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2013-10-29 12:40:55 -0700 |
commit | bbded5b5feb40ee69717dc113fb4be1dc4807227 (patch) | |
tree | 71cd80b64c4ce653db02e9af1e203c91fc722f23 /src/glsl/builtin_variables.cpp | |
parent | 95629223761e076323faab93f72c955e61a38a75 (diff) |
glsl: Add built-in functions and constants required for ARB_shader_atomic_counters.
v2: Represent atomics as GLSL intrinsics.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/builtin_variables.cpp')
-rw-r--r-- | src/glsl/builtin_variables.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index 018daf67fec..7a3505ace12 100644 --- a/src/glsl/builtin_variables.cpp +++ b/src/glsl/builtin_variables.cpp @@ -638,6 +638,21 @@ builtin_variable_generator::generate_constants() */ add_const("gl_MaxTextureCoords", state->Const.MaxTextureCoords); } + + if (state->ARB_shader_atomic_counters_enable) { + add_const("gl_MaxVertexAtomicCounters", + state->Const.MaxVertexAtomicCounters); + add_const("gl_MaxGeometryAtomicCounters", + state->Const.MaxGeometryAtomicCounters); + add_const("gl_MaxFragmentAtomicCounters", + state->Const.MaxFragmentAtomicCounters); + add_const("gl_MaxCombinedAtomicCounters", + state->Const.MaxCombinedAtomicCounters); + add_const("gl_MaxAtomicCounterBindings", + state->Const.MaxAtomicBufferBindings); + add_const("gl_MaxTessControlAtomicCounters", 0); + add_const("gl_MaxTessEvaluationAtomicCounters", 0); + } } |