[Mesa-dev] [PATCH 02/14] mesa: add _mesa_is_no_error_enabled() helper
Timothy Arceri
tarceri at itsqueeze.com
Tue Apr 18 00:09:41 UTC 2017
---
src/mesa/main/context.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 9704a96..ccb5463 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -317,20 +317,27 @@ _mesa_is_gles31(const struct gl_context *ctx)
/**
* Checks if the context is for GLES 3.2 or later
*/
static inline bool
_mesa_is_gles32(const struct gl_context *ctx)
{
return ctx->API == API_OPENGLES2 && ctx->Version >= 32;
}
+static inline bool
+_mesa_is_no_error_enabled(const struct gl_context *ctx)
+{
+ return ctx->Const.ContextFlags & GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR;
+}
+
+
/**
* Checks if the context supports geometry shaders.
*/
static inline bool
_mesa_has_geometry_shaders(const struct gl_context *ctx)
{
return _mesa_has_OES_geometry_shader(ctx) ||
(_mesa_is_desktop_gl(ctx) && ctx->Version >= 32);
}
--
2.9.3
More information about the mesa-dev
mailing list