[Mesa-dev] [RFC 2/3] mesa: always return GL_OUT_OF_MEMORY or GL_NO_ERROR when KHR_no_error enabled
Gustaw Smolarczyk
wielkiegie at gmail.com
Tue Mar 28 07:10:00 UTC 2017
28 mar 2017 06:35 "Timothy Arceri" <tarceri at itsqueeze.com> napisaĆ(a):
---
src/mesa/main/getstring.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index 6e90511..50140cf 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -297,17 +297,29 @@ invalid_pname:
*
* Returns __struct gl_contextRec::ErrorValue.
*/
GLenum GLAPIENTRY
_mesa_GetError( void )
{
GET_CURRENT_CONTEXT(ctx);
GLenum e = ctx->ErrorValue;
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
+ /* 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 (ctx->Const.ContextFlags == GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR &&
Shouldn't this be checked using & instead of ==?
Regards,
Gustaw
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170328/e97fec81/attachment.html>
More information about the mesa-dev
mailing list