[Piglit] [PATCH 1/2] glx-swap-singlebuffer: New test for no-op glXSwapBuffers().

Chad Versace chad at chad-versace.us
Tue Jun 7 07:50:28 PDT 2011


On Sun,  5 Jun 2011 12:14:48 -0700, Eric Anholt <eric at anholt.net> wrote:
> ---
>  tests/all.tests                   |    1 +
>  tests/glx/CMakeLists.gl.txt       |    1 +
>  tests/glx/glx-swap-singlebuffer.c |  124 +++++++++++++++++++++++++++++++++++++
>  3 files changed, 126 insertions(+), 0 deletions(-)
>  create mode 100644 tests/glx/glx-swap-singlebuffer.c


> +XVisualInfo *
> +get_single_buffer_visual(Display *dpy)
> +{
> +	XVisualInfo *visinfo;
> +	int attrib[] = {
> +		GLX_RGBA,
> +		GLX_RED_SIZE, 1,
> +		GLX_GREEN_SIZE, 1,
> +		GLX_BLUE_SIZE, 1,
> +		GLX_ALPHA_SIZE, 1,
> +		None
> +	};

For the sake of us who are not as familiar with the GLX spec,
the attribs should contain 'GLX_DOUBLEBUFFER, GLX_FALSE'.
Without knowing that the spec declares singlebuffering to be the
default, or spending two minutes to look it up in the spec, it's not evident that
the test actually tests a singlebuffered drawable.

With that,
Reviewed-by: Chad Versace <chad at chad-versace.us>

I've never used pixmaps, so I can't effectively review patch 2.


More information about the Piglit mailing list