diff options
author | Kevin Rogovin <[email protected]> | 2015-06-17 13:29:56 +0300 |
---|---|---|
committer | Martin Peres <[email protected]> | 2015-06-17 14:39:03 +0300 |
commit | bbb700967e9991a03ed6e8073c9bdc2ca0d1381d (patch) | |
tree | 8456724044118e3a5eb04203f9926beb67898efb /src/mesa | |
parent | 41b6db225f42a5d81beec1b4455ec7b504e2416d (diff) |
mesa: function for testing if current frag-shader has atomics
Add helper function that checks if current fragment shader active
of gl_context has atomic buffer access.
Reviewed-by: Ian Romanick <[email protected]>
Signed-off-by: Kevin Rogovin <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/mtypes.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index a10e49434bc..ffa7f0cd704 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -4448,7 +4448,12 @@ enum _debug DEBUG_INCOMPLETE_FBO = (1 << 3) }; - +static inline bool +_mesa_active_fragment_shader_has_atomic_ops(const struct gl_context *ctx) +{ + return ctx->Shader._CurrentFragmentProgram != NULL && + ctx->Shader._CurrentFragmentProgram->NumAtomicBuffers > 0; +} #ifdef __cplusplus } |