+ /* From Issue (3) of the KHR_no_error spec:
+ *
+ * "Should glGetError() always return NO_ERROR or have undefined
+ * results?
+ *
+ * RESOLVED: It should for all errors except OUT_OF_MEMORY."
+ */
+ if (_mesa_is_no_error_enabled(ctx) && e != GL_OUT_OF_MEMORY) {
+ e = GL_NO_ERROR;
+ }
+