mesa: add _mesa_is_no_error_enabled() helper
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 30 Mar 2017 12:11:34 +0000 (23:11 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Wed, 19 Apr 2017 06:53:25 +0000 (16:53 +1000)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/main/context.h

index 9704a96e11f77cd940ba5d845eea428b35f7cbe7..ccb54635defc47f8eb552e18202bb7c22acf7ece 100644 (file)
@@ -324,6 +324,13 @@ _mesa_is_gles32(const struct gl_context *ctx)
 }
 
 
+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.
  */