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 <ian.d.romanick@intel.com>
Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com>
This commit is contained in:
Kevin Rogovin
2015-06-17 13:29:56 +03:00
committed by Martin Peres
parent 41b6db225f
commit bbb700967e
+6 -1
View File
@@ -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
}