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

Eric Anholt eric at anholt.net
Tue Jun 7 10:09:44 PDT 2011


On Tue, 07 Jun 2011 07:50:28 -0700, Chad Versace <chad at chad-versace.us> wrote:
> 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.

I'm confused about GLX_DOUBLEBUFFER usage, looking at our
tests. glx-swap-exchange, glx-close-display, and
glx-make-current-bad-context all seem to be not providing an argument
for GLX_DOUBLEBUFFER -- the end-of-list sentinel immediately follows
them in 2 cases.
-------------- 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/20110607/e3edbc27/attachment.pgp>


More information about the Piglit mailing list