Unfortunately, my research (using fakerut in the VirtualGL source)
revealed some conformance issues with the AMDGPU driver.  These issues
do not exist with Mesa, Catalyst (the legacy ATI/AMD proprietary
driver), or the nVidia proprietary driver.  At the moment, the AMDGPU
driver is unsupportable until the moderate and show-stopping issues
below are resolved.

------------------------------

Issue #1:
glXGetSelectedEvent() triggers a BadDrawable X11 error rather than a
GLXBadDrawable X11 error when passed an invalid GLX drawable handle.

Severity:
Minor

Temporary workaround:
0001-fakerut-Don-t-test-glXGetSelectedEvent-err-code.patch

Reference:
https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glXGetSelectedEvent.xml
"GLXBadDrawable is generated if draw is not a valid window or a valid
GLX pixel buffer."

------------------------------

Issue #2:
glXSwapBuffers() does not actually swap the buffers of a double-buffered
Pbuffer.

Severity:
Show-stopper (without this functionality, there is no way that VirtualGL
can work properly)

Test program reproducing the issue:
pbdbtest.c

Temporary workaround:
0003-Faker-Buffer-swap-Pbuffers-using-glCopyPixels.patch

Reference:
https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glXCreatePbuffer.xml
"GLXPbuffers contain the color and ancillary buffers specified by
config.  It is possible to create a pixel buffer with back buffers and
to swap those buffers using glXSwapBuffers."

------------------------------

Issue #3:
GLX_DRAWABLE_TYPE is implemented using exclusive rather than inclusive
matching in glXChooseFBConfig().

Description:
If you specify GLX_DRAWABLE_TYPE=GLX_PBUFFER_BIT|GLX_PIXMAP_BIT, then
the AMDGPU implementation of glXChooseFBConfig() will not return any
GLXFBConfigs that support window rendering.  That is incorrect behavior,
since GLX_DRAWABLE_TYPE is supposed to be inclusive, not exclusive.
Because AMDGPU does not return any GLXFBConfigs that have GLX_WINDOW_BIT
set, the set of GLXFBConfigs that VirtualGL is able to obtain from the
driver contains only R/G/B 10/10/10 GLXFBConfigs.

Severity:
Moderate

Temporary workaround:
0002-Faker-Only-choose-FB-configs-w-GLX_WINDOW_BIT-set.patch

Reference:
https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glXChooseFBConfig.xml
"GLX_DRAWABLE_TYPE: Must be followed by a mask indicating which GLX
drawable types the frame buffer configuration must support."
(This language implies inclusive rather than exclusive matching, because
it doesn't say that the frame buffer configuration must *only* support
those GLX drawable types.)

------------------------------

Issue #4:
GLX_X_RENDERABLE is incorrectly implemented.

Description:
All GLXFBConfigs returned by the AMDGPU implementation have
GLX_X_RENDERABLE set, even though only some GLXFBConfigs have an X
visual attached.  That is incorrect behavior, and it makes it difficult
to work around Issue #3 in a robust manner.

Severity:
Moderate

Workaround:
None

Reference:
https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glXChooseFBConfig.xml
"GLX_X_RENDERABLE: Must be followed by True or False. If True is
specified, then only frame buffer configurations that have associated X
visuals (and can be used to render to Windows and/or GLX pixmaps) will
be considered. The default value is GLX_DONT_CARE."

------------------------------

Issue #5:
glXCopyContext() triggers a GLXBadContextTag X11 error.

Description:
This also happens with the legacy Catalyst drivers.

Severity:
Minor

Workaround:
Pass -nocopycontext to fakerut.

Reference:
https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glXCopyContext.xml
does not indicate that a GLXBadContextTag error can occur due to
incorrect input.
https://www.khronos.org/registry/OpenGL/specs/gl/glxencode1.3.pdf
suggests that a GLXBadContextTag error is a low-level failure within the
implementation.

------------------------------

Issue #6:
glXQueryContext(..., GLX_RENDER_TYPE, ...) returns a render type of 0 if
the context was created with a render type of GLX_RGBA_TYPE.

Severity:
Moderate

Test program reproducing the issue:
queryctx.c

Workaround:
None

Reference:
https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glXQueryContext.xml
"GLX_RENDER_TYPE: Returns the rendering type supported by ctx."

------------------------------

DRC



On 5/28/20 9:44 AM, Marcello Blancasio wrote:
> VGL_FORCEALPHA fixed glxgears, while desktop is still uncorrectly
> rendered. Tried also VGL_WM=1.
> 
> Il giorno mercoledì 27 maggio 2020 17:43:19 UTC+2, DRC ha scritto:
> 
>     I finally have a Radeon Pro for testing, and working through some of
>     these issues is on my “things to do” list. In the meantime, try
>     setting VGL_FORCEALPHA=1.
> 
>>     On May 27, 2020, at 8:26 AM, Marcello Blancasio
>>     <[email protected] <javascript:>> wrote:
>>
>>     
>>     Hello.
>>
>>     I received a report claiming there's a problem with Radeon Pro WX
>>     9100.
>>
>>     glxgears fails with X error BadAlloc (insufficient resources for
>>     operation) on operation X_GLXCreatePbuffer.
>>     Gnome desktop appears badly rendered.
>>
>>     Driver xserver-xorg-video-amdgpu 18.1.99+git20190207-1 is
>>     installed. Is AMDGPU "Pro" required? Unfortuantely it is not
>>     provided for Debian 10.
>>
>>     Thanks.
>>
>>     Marcello.
>>
>>     -- 
>>     You received this message because you are subscribed to the Google
>>     Groups "VirtualGL User Discussion/Support" group.
>>     To unsubscribe from this group and stop receiving emails from it,
>>     send an email to [email protected] <javascript:>.
>>     To view this discussion on the web visit
>>     
>> https://groups.google.com/d/msgid/virtualgl-users/0d4b3387-5629-4081-ae60-75c124bf4ba0%40googlegroups.com
>>     
>> <https://groups.google.com/d/msgid/virtualgl-users/0d4b3387-5629-4081-ae60-75c124bf4ba0%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>     <glxgears.txt>
>>     [VGL 0xaec0a780] XOpenDisplay (name=NULL dpy=0x563c2912d960(:1002)
>>     ) 1.027107 ms
>>     [VGL 0xaec0a780] glXChooseVisual (dpy=0x563c2912d960(:1002)
>>     screen=0 attrib_list=[0x0004 0x0005 0x0008=0x0001 0x0009=0x0001
>>     0x000a=0x0001 0x000c=0x0001 ] glxattribs=[0x000c=0x0001
>>     0x0005=0x0001 0x0008=0x0001 0x0009=0x0001 0x000a=0x0001
>>     0x8011=0x0001 0x8010=0x0006 ] [VGL] dlopen
>>     (filename=libGLX_mesa.so.0 flag=1 retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_mesa.so.0 flag=258
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen
>>     (filename=/usr/lib/x86_64-linux-gnu/dri/tls/radeonsi_dri.so
>>     flag=258 retval=0x00000000)
>>     [VGL] dlopen
>>     (filename=/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so flag=258
>>     retval=0x563c291b2030)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     [VGL] dlopen (filename=libGLX_indirect.so.0 flag=1
>>     retval=0x563c2914f8a0)
>>     vis=0x563c29158ed0(0xc4) config=0x563c295ab720(0xc5) ) 97.721100 ms
>>     [VGL 0xaec0a780] XCreateWindow (dpy=0x563c2912d960(:1002)
>>     parent=0x00000103 x=0 y=0 width=300 height=300 depth=24 c_class=1
>>     visual=0x563c2912f8e0(0xc4) win=0x03800002 ) 0.002861 ms
>>     [VGL 0xaec0a780] glXCreateContext (dpy=0x563c2912d960(:1002)
>>     vis=0x563c29158ed0(0xc4) share_list=0x00000000 direct=1
>>     config=0x563c295ab720(0xc5) ctx=0x563c29159240 ) 1.638174 ms
>>     [VGL 0xaec0a780] glXMakeCurrent (dpy=0x563c2912d960(:1002)
>>     drawable=0x03800002 ctx=0x563c29159240 failed to create drawable
>>     X Error of failed request:  BadAlloc (insufficient resources for
>>     operation)
>>      Major opcode of failed request:  152 (GLX)
>>      Minor opcode of failed request:  27 (X_GLXCreatePbuffer)
>>      Serial number of failed request:  29
>>      Current serial number in output stream:  31
>>
>>     -- 
>>     You received this message because you are subscribed to the Google
>>     Groups "VirtualGL User Discussion/Support" group.
>>     To unsubscribe from this group and stop receiving emails from it,
>>     send an email to [email protected] <javascript:>.
>>     To view this discussion on the web visit
>>     
>> https://groups.google.com/d/msgid/virtualgl-users/0d4b3387-5629-4081-ae60-75c124bf4ba0%40googlegroups.com
>>     
>> <https://groups.google.com/d/msgid/virtualgl-users/0d4b3387-5629-4081-ae60-75c124bf4ba0%40googlegroups.com>.
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "VirtualGL User Discussion/Support" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/virtualgl-users/525f497b-df09-4e7a-92f3-7a74e19b6606%40googlegroups.com
> <https://groups.google.com/d/msgid/virtualgl-users/525f497b-df09-4e7a-92f3-7a74e19b6606%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"VirtualGL User Discussion/Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/virtualgl-users/3d12d4c5-3718-b072-475a-d178fb4dcb73%40virtualgl.org.
From 5724f0a04b9f09b324626064a12fd844f68077e2 Mon Sep 17 00:00:00 2001
From: DRC <[email protected]>
Date: Fri, 29 May 2020 14:59:28 -0500
Subject: [PATCH 1/3] fakerut: Don't test glXGetSelectedEvent() err code

... unless -selectevent is specified on the command line.

(This works around a conformance issue in the AMDGPU drivers.)
---
 server/fakerut.cpp | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/server/fakerut.cpp b/server/fakerut.cpp
index 82d3432d..06f224ae 100644
--- a/server/fakerut.cpp
+++ b/server/fakerut.cpp
@@ -2466,7 +2466,7 @@ int xhandler(Display *dpy, XErrorEvent *xe)
                        expectedErrString); \
 }
 
-int extensionQueryTest(void)
+int extensionQueryTest(bool doSelectEvent)
 {
        Display *dpy = NULL;  int retval = 1;
        int majorOpcode = -1, eventBase = -1, errorBase = -1, n;
@@ -2768,12 +2768,15 @@ int extensionQueryTest(void)
                //    glXGetSelectedEvent()
                
//-------------------------------------------------------------------------
 
-               // GLXBadDrawable error thrown if drawable is not valid
-               for(int badValue = 0; badValue <= 1; badValue++)
+               if(doSelectEvent)
                {
-                       XERRTEST_START();
-                       glXGetSelectedEvent(dpy, (GLXDrawable)badValue, 
&dummy3);
-                       XERRTEST_STOP(errorBase + GLXBadDrawable, -1, 
"GLXBadDrawable");
+                       // GLXBadDrawable error thrown if drawable is not valid
+                       for(int badValue = 0; badValue <= 1; badValue++)
+                       {
+                               XERRTEST_START();
+                               glXGetSelectedEvent(dpy, (GLXDrawable)badValue, 
&dummy3);
+                               XERRTEST_STOP(errorBase + GLXBadDrawable, -1, 
"GLXBadDrawable");
+                       }
                }
 
                
//-------------------------------------------------------------------------
@@ -3013,7 +3016,7 @@ int main(int argc, char **argv)
 
        if(!XInitThreads())
                THROW("XInitThreads() failed");
-       if(!extensionQueryTest()) ret = -1;
+       if(!extensionQueryTest(doSelectEvent)) ret = -1;
        printf("\n");
        if(!procAddrTest()) ret = -1;
        printf("\n");
-- 
2.17.2 (Apple Git-113)

From 099bee21dd6bcf8f0d15dfc7142d00d948a23fe5 Mon Sep 17 00:00:00 2001
From: DRC <[email protected]>
Date: Fri, 29 May 2020 15:01:53 -0500
Subject: [PATCH 2/3] Faker: Only choose FB configs w/GLX_WINDOW_BIT set

(This works around a conformance issue in the AMDGPU drivers.)
---
 server/glxvisual.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/glxvisual.cpp b/server/glxvisual.cpp
index 99ccff3c..31b4b9a3 100644
--- a/server/glxvisual.cpp
+++ b/server/glxvisual.cpp
@@ -1,6 +1,6 @@
 // Copyright (C)2004 Landmark Graphics Corporation
 // Copyright (C)2005 Sun Microsystems, Inc.
-// Copyright (C)2009-2016, 2019 D. R. Commander
+// Copyright (C)2009-2016, 2019-2020 D. R. Commander
 //
 // This library is free software and may be redistributed and/or modified under
 // the terms of the wxWindows Library License, Version 3.1 or (at your option)
@@ -262,7 +262,7 @@ GLXFBConfig *configsFromVisAttribs(const int attribs[], int 
&level,
                        drawableType |= GLX_PIXMAP_BIT | GLX_WINDOW_BIT;
                else
                        drawableType |= GLX_PBUFFER_BIT;
-               if(visualType >= 0)
+               if(visualType >= 0 || !glx13)
                        drawableType |= GLX_WINDOW_BIT;
                if(samples >= 0) drawableType &= ~GLX_PIXMAP_BIT;
                renderType = GLX_RGBA_BIT;
-- 
2.17.2 (Apple Git-113)

From 496783ede971d3f96e5e8627a58ca8863af0c32b Mon Sep 17 00:00:00 2001
From: DRC <[email protected]>
Date: Fri, 29 May 2020 15:18:20 -0500
Subject: [PATCH 3/3] Faker: Buffer-swap Pbuffers using glCopyPixels()

... rather than glXSwapBuffers().

(This works around a conformance issue in the AMDGPU drivers.)
---
 server/VirtualDrawable.cpp | 7 ++++---
 server/VirtualDrawable.h   | 5 +++--
 server/VirtualWin.cpp      | 2 ++
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/server/VirtualDrawable.cpp b/server/VirtualDrawable.cpp
index 52167714..cf8c1e80 100644
--- a/server/VirtualDrawable.cpp
+++ b/server/VirtualDrawable.cpp
@@ -500,7 +500,8 @@ void VirtualDrawable::readPixels(GLint x, GLint y, GLint 
width, GLint pitch,
 
 
 void VirtualDrawable::copyPixels(GLint srcX, GLint srcY, GLint width,
-       GLint height, GLint destX, GLint destY, GLXDrawable draw)
+       GLint height, GLint destX, GLint destY, GLXDrawable draw, GLint readBuf,
+       GLint drawBuf)
 {
        if(!ctx)
        {
@@ -512,8 +513,8 @@ void VirtualDrawable::copyPixels(GLint srcX, GLint srcY, 
GLint width,
        }
        TempContext tc(DPY3D, draw, getGLXDrawable(), ctx, config, 
GLX_RGBA_TYPE);
 
-       _glReadBuffer(GL_FRONT);
-       _glDrawBuffer(GL_FRONT_AND_BACK);
+       _glReadBuffer(readBuf);
+       _glDrawBuffer(drawBuf);
 
        _glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
        _glPixelStorei(GL_PACK_ALIGNMENT, 1);
diff --git a/server/VirtualDrawable.h b/server/VirtualDrawable.h
index 4501b35d..7a6ed54b 100644
--- a/server/VirtualDrawable.h
+++ b/server/VirtualDrawable.h
@@ -1,6 +1,6 @@
 // Copyright (C)2004 Landmark Graphics Corporation
 // Copyright (C)2005 Sun Microsystems, Inc.
-// Copyright (C)2009-2015, 2017-2018 D. R. Commander
+// Copyright (C)2009-2015, 2017-2018, 2020 D. R. Commander
 //
 // This library is free software and may be redistributed and/or modified under
 // the terms of the wxWindows Library License, Version 3.1 or (at your option)
@@ -37,7 +37,8 @@ namespace vglserver
                        Drawable getX11Drawable(void);
                        GLXDrawable getGLXDrawable(void);
                        void copyPixels(GLint srcX, GLint srcY, GLint width, 
GLint height,
-                               GLint destX, GLint destY, GLXDrawable draw);
+                               GLint destX, GLint destY, GLXDrawable draw, 
GLint readBuf = GL_FRONT,
+                               GLint drawBuf = GL_FRONT_AND_BACK);
                        int getWidth(void) { return oglDraw ? 
oglDraw->getWidth() : -1; }
                        int getHeight(void) { return oglDraw ? 
oglDraw->getHeight() : -1; }
                        bool isInit(void) { return direct == True || direct == 
False; }
diff --git a/server/VirtualWin.cpp b/server/VirtualWin.cpp
index 8f3bfd1c..6546a313 100644
--- a/server/VirtualWin.cpp
+++ b/server/VirtualWin.cpp
@@ -233,6 +233,8 @@ void VirtualWin::swapBuffers(void)
        CriticalSection::SafeLock l(mutex);
        if(doWMDelete) THROW("Window has been deleted by window manager");
        if(oglDraw) oglDraw->swap();
+       copyPixels(0, 0, oglDraw->getWidth(), oglDraw->getHeight(), 0, 0,
+               getGLXDrawable(), GL_BACK, GL_FRONT);
 }
 
 
-- 
2.17.2 (Apple Git-113)

/* This file contains code borrowed from VirtualGL, which is provided under the
   terms of the wxWindows Library License, Version 3.1. */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <GL/glx.h>
#include <X11/Xlib.h>

#define THROW(m) \
{ \
        fprintf(stderr, "ERROR in line %d: %s\n", __LINE__, m); \
        retval = -1; \
        goto bailout; \
}

int cfgid(Display *dpy, GLXFBConfig config)
{
        int value = 0;
        glXGetFBConfigAttrib(dpy, config, GLX_FBCONFIG_ID, &value);
        return value;
}

unsigned int checkBufferColor(void)
{
        int i, retval = 0, viewport[4];  unsigned int ret = 0;
        unsigned char *buf = NULL;

        viewport[0] = viewport[1] = viewport[2] = viewport[3] = 0;
        glGetIntegerv(GL_VIEWPORT, viewport);
        if(viewport[2] < 1 || viewport[3] < 1)
                THROW("Invalid viewport dimensions");

        if((buf = (unsigned char *)malloc(viewport[2] * viewport[3] * 3)) == 
NULL)
                THROW("Could not allocate buffer");
        memset(buf, 128, viewport[2] * viewport[3] * 3);

        glPixelStorei(GL_PACK_ALIGNMENT, 1);
        glReadPixels(0, 0, viewport[2], viewport[3], GL_RGB, GL_UNSIGNED_BYTE, 
buf);
        for(i = 3; i < viewport[2] * viewport[3] * 3; i += 3)
        {
                if(buf[i] != buf[0] || buf[i + 1] != buf[1] || buf[i + 2] != 
buf[2])
                        THROW("Bogus data read back");
        }
        ret = buf[0] | (buf[1] << 8) | (buf[2] << 16);
        free(buf);
        return ret;

        bailout:
        free(buf);
        return -1;
}

#define VERIFY_BUF_COLOR(buf, colorShouldBe, tag) \
{ \
        if(buf > 0) glReadBuffer(buf); \
        unsigned int color = checkBufferColor(); \
        if(color < 0) goto bailout; \
        if(color != (colorShouldBe)) \
        { \
                fprintf(stderr, "ERROR in line %d: " #buf " " tag " is 0x%.6x, 
should be 0x%.6x\n", \
                        __LINE__, color, (colorShouldBe)); \
                retval = -1; \
                goto bailout; \
        } \
}

int main(void)
{
        Display *dpy = NULL;
        GLXFBConfig *configs = NULL;
        int n = 0, retval = 0;
        GLXPbuffer pb = 0;
        GLXContext ctx = 0;
        int glxattribs[] = { GLX_DOUBLEBUFFER, 1, GLX_RENDER_TYPE, GLX_RGBA_BIT,
                GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT | GLX_WINDOW_BIT, 
GLX_RED_SIZE, 8,
                GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8, None };
        int pbattribs[] = { GLX_PBUFFER_WIDTH, 256, GLX_PBUFFER_HEIGHT, 256,
                GLX_PRESERVED_CONTENTS, True, GLX_LARGEST_PBUFFER, False, None 
};

        if(!(dpy = XOpenDisplay(NULL)))
                THROW("Could not open X display");
        if(!(configs = glXChooseFBConfig(dpy, DefaultScreen(dpy), glxattribs, 
&n))
                || n < 1)
                THROW("Could not obtain FB config");
        fprintf(stderr, "GLXFBConfig ID = 0x%.2x\n", cfgid(dpy, configs[0]));
        if(!(pb = glXCreatePbuffer(dpy, configs[0], pbattribs)))
                THROW("Could not create Pbuffer");
        if(!(ctx = glXCreateNewContext(dpy, configs[0], GLX_RGBA_TYPE, NULL, 
True)))
                THROW("Could not create context");
        if(!glXMakeContextCurrent(dpy, pb, pb, ctx))
                THROW("Could not make context current");
        glDrawBuffer(GL_BACK);
        glClearColor(1.0, 0.0, 0.0, 0.0);  /* red */
        glClear(GL_COLOR_BUFFER_BIT);
        VERIFY_BUF_COLOR(GL_BACK, 0x0000ff, "before swap");
        glDrawBuffer(GL_FRONT);
        glClearColor(0.0, 0.0, 1.0, 0.0);  /* blue */
        glClear(GL_COLOR_BUFFER_BIT);
        VERIFY_BUF_COLOR(GL_FRONT, 0xff0000, "before swap");
        glXSwapBuffers(dpy, pb);
        VERIFY_BUF_COLOR(GL_FRONT, 0x0000ff, "after swap");

        fprintf(stderr, "GREAT SUCCESS!\n");

        bailout:
        if(ctx && dpy) glXDestroyContext(dpy, ctx);
        if(pb && dpy) glXDestroyPbuffer(dpy, pb);
        if(configs) XFree(configs);
        if(dpy) XCloseDisplay(dpy);
        return retval;
}
/* This file contains code borrowed from VirtualGL, which is provided under the
   terms of the wxWindows Library License, Version 3.1. */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <GL/glx.h>
#include <X11/Xlib.h>

#define THROW(m) \
{ \
        fprintf(stderr, "ERROR in line %d: %s\n", __LINE__, m); \
        retval = -1; \
        goto bailout; \
}

int cfgid(Display *dpy, GLXFBConfig config)
{
        int value = 0;
        glXGetFBConfigAttrib(dpy, config, GLX_FBCONFIG_ID, &value);
        return value;
}

int main(void)
{
        Display *dpy = NULL;
        GLXFBConfig *configs = NULL;
        int n = 0, retval = 0;
        GLXContext ctx = 0;
        int glxattribs[] = { GLX_DOUBLEBUFFER, 1, GLX_RENDER_TYPE, GLX_RGBA_BIT,
                GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT | GLX_WINDOW_BIT, 
GLX_RED_SIZE, 8,
                GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8, None };

        if(!(dpy = XOpenDisplay(NULL)))
                THROW("Could not open X display");
        if(!(configs = glXChooseFBConfig(dpy, DefaultScreen(dpy), glxattribs, 
&n))
                || n < 1)
                THROW("Could not obtain FB config");
        fprintf(stderr, "GLXFBConfig ID = 0x%.2x\n", cfgid(dpy, configs[0]));
        if(!(ctx = glXCreateNewContext(dpy, configs[0], GLX_RGBA_TYPE, NULL, 
True)))
                THROW("Could not create context");
        int temp = -20;
        glXQueryContext(dpy, ctx, GLX_RENDER_TYPE, &temp);
        if(temp != GLX_RGBA_TYPE)
        {
                fprintf(stderr, "Context type is 0x%.4x, should be 0x%.4x\n", 
temp,
                        GLX_RGBA_TYPE);
                retval = -1;
                goto bailout;
        }

        fprintf(stderr, "GREAT SUCCESS!\n");

        bailout:
        if(ctx && dpy) glXDestroyContext(dpy, ctx);
        if(configs) XFree(configs);
        if(dpy) XCloseDisplay(dpy);
        return retval;
}

Reply via email to