[Piglit] [PATCH] gl-1.0-simple-renderbuffer: add a protection from test failure when an user fbo is defined

Tapani Pälli tapani.palli at intel.com
Tue Apr 25 11:41:22 UTC 2017


Yep, currently we get GL_INVALID_OPERATION with '-fbo' argument', this 
fixes it.

Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

On 04/25/2017 02:07 PM, Sandra Koroniewska wrote:
> This fixes spec/gl-1.0/simple-readbuffer with the argument "-fbo" according to OpenGL 4.4 spec (page 476).
> ---
>   tests/spec/gl-1.0/simple-readbuffer.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/spec/gl-1.0/simple-readbuffer.c b/tests/spec/gl-1.0/simple-readbuffer.c
> index e5b67bf4d..f85b56d38 100644
> --- a/tests/spec/gl-1.0/simple-readbuffer.c
> +++ b/tests/spec/gl-1.0/simple-readbuffer.c
> @@ -45,7 +45,10 @@ piglit_display(void)
>   void
>   piglit_init(int argc, char **argv)
>   {
> -	glReadBuffer(GL_FRONT);
> +    if (piglit_use_fbo == false)

nitpicking, maybe just !piglit_use_fbo

> +        glReadBuffer(GL_FRONT);
> +    else
> +        glReadBuffer(GL_COLOR_ATTACHMENT0);
>   
>   	if (!piglit_check_gl_error(GL_NO_ERROR)) {
>   		piglit_report_result(PIGLIT_FAIL);
> 


More information about the Piglit mailing list