[Piglit] [PATCH] Fix clearbuffer-display-lists test case
Eric Anholt
eric at anholt.net
Tue Feb 7 11:15:17 PST 2012
On Mon, 6 Feb 2012 14:10:40 -0800, Anuj Phogat <anuj.phogat at gmail.com> wrote:
> Do glClear(GL_COLOR_BUFFER_BIT) before probing the color buffer.
> Test occasionally fails without this call.
>
> Reported-by: Eric Anholt <eric at anholt.net>
> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
> Eric, this test was failing on my system once in 10-20 times.
>
> tests/spec/gl-3.0/api/clearbuffer-display-lists.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/tests/spec/gl-3.0/api/clearbuffer-display-lists.c b/tests/spec/gl-3.0/api/clearbuffer-display-lists.c
> index 8595076..8685af1 100644
> --- a/tests/spec/gl-3.0/api/clearbuffer-display-lists.c
> +++ b/tests/spec/gl-3.0/api/clearbuffer-display-lists.c
> @@ -44,6 +44,8 @@ void piglit_init(int argc, char **argv)
> bool pass = true;
>
> piglit_require_gl_version(30);
> + glClear(GL_COLOR_BUFFER_BIT);
> +
> /* Probe the color buffer before creating display list. color buffers
> * are by default cleared to (0.0, 0.0, 0.0, 1.0)
> */
The comment below should probably be fixed, too. Color buffers are not
cleared by default.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20120207/b668173c/attachment.pgp>
More information about the Piglit
mailing list