[Piglit] [PATCH 1/2] glx-swap-singlebuffer: New test for no-op glXSwapBuffers().
Chad Versace
chad at chad-versace.us
Tue Jun 7 12:36:42 PDT 2011
On Tue, 07 Jun 2011 12:08:55 -0600, Brian Paul <brianp at vmware.com> wrote:
> On 06/07/2011 11:09 AM, Eric Anholt wrote:
> > 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'.
>
> That's incorrect. The GLX_DOUBLEBUFFER token (when used with
> glXChooseVisual) is not followed by a true/false parameter. But with
> glXChooseFBConfig, GLX_DOUBLEBUFFER _is_ followed by a true/false value.
>
> GLX_RGBA, GLX_STEREO and maybe a few others work that way.
Oh, that's easy to remember ;)
For completeness' sake, here's the quotes from the GLX 1.4 spec.
More information about the Piglit
mailing list