[Piglit] [PATCH] fbo-getframebufferattachmentparameter-01: fix for a test failure

Tapani Pälli tapani.palli at intel.com
Fri Apr 21 10:30:43 UTC 2017



On 04/12/2017 05:21 PM, Sandra Koroniewska wrote:
> This fixes the test fbo-getframebufferattachmentparameter-01 on Intel OpenGL driver. The test is expecting GL_INVALID_OPERATION in some cases, but this behaviour is problematic and is not mentioned in the specification.

The framebuffer in this test does not have depth attachment, therefore 
these queries set GL_INVALID_OPERATION error as specified below.

from OpenGL 4.5 Core spec, 9.2. BINDING AND MANAGING FRAMEBUFFER OBJECTS 
page 295:

"An INVALID_OPERATION error is generated if the value of 
FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is NONE and pname is not 
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME or FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE."

situation also referenced before errors section in page 293:

"If the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is NONE , then 
either no framebuffer is bound to target; or the default framebuffer is 
bound, attachment is DEPTH or STENCIL , and the number of depth or 
stencil bits, respectively, is zero. In this case querying pname 
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME will return zero, and all other 
queries will generate an INVALID_OPERATION error."

(same paragraphs can be found in compatibility spec)

> ---
>   tests/fbo/fbo-getframebufferattachmentparameter-01.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/fbo/fbo-getframebufferattachmentparameter-01.c b/tests/fbo/fbo-getframebufferattachmentparameter-01.c
> index e365d5fa0..3cc5699e6 100644
> --- a/tests/fbo/fbo-getframebufferattachmentparameter-01.c
> +++ b/tests/fbo/fbo-getframebufferattachmentparameter-01.c
> @@ -127,7 +127,7 @@ piglit_init(int argc, char **argv)
>   	pass = try_GetAttachmentParam(GL_DEPTH_ATTACHMENT,
>   				      GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE,
>   				      0,
> -				      GL_INVALID_OPERATION,
> +				      GL_NONE,
>   				      "")
>   		&& pass;
>   	pass = try_GetAttachmentParam(GL_DEPTH_ATTACHMENT,
> @@ -147,7 +147,7 @@ piglit_init(int argc, char **argv)
>   	pass = try_GetAttachmentParam(GL_DEPTH_ATTACHMENT,
>   				      GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE,
>   				      0,
> -				      GL_INVALID_OPERATION,
> +				      GL_NONE,
>   				      "")
>   		&& pass;
>   
> 


More information about the Piglit mailing list