[Mesa-dev] [PATCH 4/4] mesa/clear: update ClearBufferfv error handling for GL 4.5 spec
Brian Paul
brianp at vmware.com
Fri Feb 12 20:11:23 UTC 2016
On 02/12/2016 11:01 AM, Ilia Mirkin wrote:
> This fixes
>
> dEQP-GLES31.functional.debug.negative_coverage.get_error.buffer.clear_bufferfv
>
> and brings the logic up to spec with GL 4.5
>
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
> src/mesa/main/clear.c | 23 +++++------------------
> 1 file changed, 5 insertions(+), 18 deletions(-)
>
> diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
> index 9dbac3e..92f69ab 100644
> --- a/src/mesa/main/clear.c
> +++ b/src/mesa/main/clear.c
> @@ -543,26 +543,13 @@ _mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
> }
> }
> break;
> - 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."
> + default:
> + /* Page 498 of the PDF, section '17.4.3.1 Clearing Individual Buffers'
> + * of the OpenGL 4.5 spec states:
> *
> - * In this case we take "undefined" and "not an error" to mean "ignore."
> - * Note that we still need to generate an error for the invalid
> - * drawbuffer case (see the GL_DEPTH case above).
> + * "An INVALID_ENUM error is generated by ClearBufferfv and
> + * ClearNamedFramebufferfv if buffer is not COLOR or DEPTH."
> */
> - if (drawbuffer != 0) {
> - _mesa_error(ctx, GL_INVALID_VALUE, "glClearBufferfv(drawbuffer=%d)",
> - drawbuffer);
> - return;
> - }
> - return;
> - default:
> _mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferfv(buffer=%s)",
> _mesa_enum_to_string(buffer));
> return;
>
Series LGTM.
Reviewed-by: Brian Paul <brianp at vmware.com>
More information about the mesa-dev
mailing list