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:
committed by
Martin Peres
parent
41b6db225f
commit
bbb700967e
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user