summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-02-12 12:56:10 -0500
committerIlia Mirkin <[email protected]>2016-02-12 18:22:49 -0500
commit3a0051bea998dc26feed9ed1468714b89de417c3 (patch)
treef12bb26d0b4bef15ab297f6541b4f7f79299f766 /src/mesa/main
parent758162923b22fcf75ea024f228a2ed96b6e88997 (diff)
mesa/clear: update ClearBufferuiv error handling for GL 4.5 spec
This fixes dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.clear_bufferuiv and brings the logic up to spec with GL 4.5 Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/clear.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
index 568f600a55e..9dbac3ee6a7 100644
--- a/src/mesa/main/clear.c
+++ b/src/mesa/main/clear.c
@@ -445,32 +445,13 @@ _mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
}
}
break;
- case GL_DEPTH:
- case GL_STENCIL:
- /* Page 264 (page 280 of the PDF) of the OpenGL 3.0 spec says:
- *
- * "The result of ClearBuffer is undefined if no conversion between
- * the type of the specified value and the type of the buffer being
- * cleared is defined (for example, if ClearBufferiv is called for a
- * fixed- or floating-point buffer, or if ClearBufferfv is called
- * for a signed or unsigned integer buffer). This is not an error."
- *
- * In this case we take "undefined" and "not an error" to mean "ignore."
- * Even though we could do something sensible for GL_STENCIL, page 263
- * (page 279 of the PDF) says:
- *
- * "Only ClearBufferiv should be used to clear stencil buffers."
+ default:
+ /* Page 498 of the PDF, section '17.4.3.1 Clearing Individual Buffers'
+ * of the OpenGL 4.5 spec states:
*
- * Note that we still need to generate an error for the invalid
- * drawbuffer case (see the GL_STENCIL case in _mesa_ClearBufferiv).
+ * "An INVALID_ENUM error is generated by ClearBufferuiv and
+ * ClearNamedFramebufferuiv if buffer is not COLOR."
*/
- if (drawbuffer != 0) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferuiv(drawbuffer=%d)",
- drawbuffer);
- return;
- }
- return;
- default:
_mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferuiv(buffer=%s)",
_mesa_enum_to_string(buffer));
return;