mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
mesa: always return GL_OUT_OF_MEMORY or GL_NO_ERROR when KHR_no_error enabled
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
3ff1fce6c9
commit
2c9ac0bc63
1 changed files with 11 additions and 0 deletions
|
|
@ -304,6 +304,17 @@ _mesa_GetError( void )
|
|||
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 (_mesa_is_no_error_enabled(ctx) && e != GL_OUT_OF_MEMORY) {
|
||||
e = GL_NO_ERROR;
|
||||
}
|
||||
|
||||
if (MESA_VERBOSE & VERBOSE_API)
|
||||
_mesa_debug(ctx, "glGetError <-- %s\n", _mesa_enum_to_string(e));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue