[Piglit] [PATCH] fbo-getframebufferattachmentparameter-01: fix DEPTH_SIZE query
Chad Versace
chad at chad-versace.us
Mon May 30 12:14:18 PDT 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 05/30/2011 02:14 AM, Marek Olšák wrote:
> Mesa returns 0. It seems correct to me.
> ---
> .../fbo/fbo-getframebufferattachmentparameter-01.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tests/fbo/fbo-getframebufferattachmentparameter-01.c b/tests/fbo/fbo-getframebufferattachmentparameter-01.c
> index 551a03d..b813b51 100644
> --- a/tests/fbo/fbo-getframebufferattachmentparameter-01.c
> +++ b/tests/fbo/fbo-getframebufferattachmentparameter-01.c
> @@ -148,8 +148,9 @@ piglit_init(int argc, char **argv)
> pass = try_GetAttachmentParam(GL_DEPTH_ATTACHMENT,
> GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE,
> 0,
> - GL_INVALID_ENUM,
> - "")
> + 0,
> + "Expected depth size of depth attachment to be "
> + "%d, got %d instead.\n")
> && pass;
>
> piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
It looks like the test *and* Mesa is wrong. The spec says
GL_INVALID_OPERATION should be raised.
- From section 6.1.12 "Framebuffer Object Queries" of the OpenGL 3.3 spec:
Upon successful return from GetFramebufferAttachmentParameteriv, if
pname is FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, then param will contain
one of NONE, FRAMEBUFFER_DEFAULT, TEXTURE, or RENDERBUFFER, [...].
If the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is NONE, no
framebuffer is bound to target. In this case querying pname
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME will return zero, and all other
queries will generate an INVALID_OPERATION error.
- --
Chad Versace
chad at chad-versace.us
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJN4+yJAAoJEAIvNt057x8iGosQAIcNv2cWvcN9merXVkA1NPzA
o+95ufXLusWp4F7Rn+R7WtT09glS860WMlySwbjdYM3GyymHoDtRAZUSYMHuI3Mt
3MDaHZxwE3o3TOIWnbT2M2kvAtY5wwS8Oh6s4BcG0dNWpdlj5UCKZXj21pLC26kI
Dv013aia3QuAkkKaxW42sYLA9n9pTjQbhP70xsCyEtmrmbudGEvRbodj/TAZYffV
KQmFaOrYfoxZh1YJcIeqqbjW/WqCTKoZLSb64EqDr9xuP+QRGIQj9Ax3ZF3x6mZP
7Dn4PzKg1QCv+CrwSQfbTY9YzCNpUiEbTOh5A1kECFxPALtpsapIobKZoidX20YD
+8j7LfDKoz7KetK7Up74oKID6moZazxdInRikGb7cfOj/o8UyVdIz8aSSWvY0BRe
Fa/a5TzNvZunUNdQb0Dl0UTIWr/hi+7/u7XYxgSMXmHuXmlbNVg0G33w7j1X12fL
vh9jcF4eTPlJz/Sa29v2n5Q06Dc+Pl/KO/gZx8lp8QYmKSrjEQg/sfLos6kV7HPW
jvyLL6ZQ0aA4HMwqrUa+uJuqrlBX2X9bOTNNrVCORItpOyUFrTawl/kfcmjSFoNC
xdYYwdDjjq8M7iECUhMBL4VZhA/+CLgzmaTLM0W9xyp//gEG/I3useym4kEMr9FH
EFzbpoFhSiy9XSFS1RwJ
=4sfq
-----END PGP SIGNATURE-----
More information about the Piglit
mailing list