Problems with pbuffers

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
agruman
Newbie
Newbie
Posts: 2
Joined: Thu Jun 04, 2009 2:52 pm

Problems with pbuffers

Post by agruman »

Heya,

I have the problem that pbuffers works and is reported present in linux, but when running inside wine they are not :(.

Some info:
* glxinfo gives: GLX_SGIX_pbuffer in both server and client glx extensions, the glx version is reported as 1.4
* fgl_glxgears says on start: Using GLX_SGIX_pbuffer and it works as it should.
* the glew visualinfo tool (http://glew.sourceforge.net/) running in wine dont report anything about pbuffers.
* the glew glewinfo tool running in wine says this about pbuffers:
WGL_ARB_pbuffer: MISSING
----------------
wglCreatePbufferARB: MISSING
wglDestroyPbufferARB: MISSING
wglGetPbufferDCARB: MISSING
wglQueryPbufferARB: MISSING
wglReleasePbufferDCARB: MISSING


Im running Ubuntu jaunty 9.04 x86_64 and has a ATI HD4870 card running the latest 9.5 drivers, using wine-1.1.22.

From what ive read there should be a GLX -> WGL bridge for pbuffers working in wine right?

I could really use some help in localizing the point of error here.

BR agru
Thunderbird
Level 5
Level 5
Posts: 336
Joined: Mon Nov 24, 2008 8:10 am

Post by Thunderbird »

ATI is violating the GLX specs. When a extension is listed in the client GLX list it means that libGL.so implements the extension (this doesn't mean that you can use it on a card), when it is in the server list it means that libglx.so (Xorg library) can support the extension. When both support an extension, the extension should be listed in the overall extension list. When that is not the case applications can't expect such an extension to be around and shouldn't use it. ATI needs to fix their drivers and then our pbuffer code will work fine.
agruman
Newbie
Newbie
Posts: 2
Joined: Thu Jun 04, 2009 2:52 pm

Post by agruman »

Hi,

Thanks for the fast answer :)
You are very correct that the extension is missing in the overall extension list (if im correct that you are talking about the "GLX extensions:" field).

Here is the output i get:

Code: Select all

server glx extensions:
    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_OML_swap_method, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group
client glx extensions:
    GLX_ARB_create_context, GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_import_context, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_MESA_allocate_memory, GLX_MESA_swap_control, 
    GLX_MESA_swap_frame_usage, GLX_NV_swap_group, GLX_OML_swap_method, 
    GLX_OML_sync_control, GLX_SGI_make_current_read, GLX_SGI_swap_control, 
    GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_SGIX_swap_barrier, GLX_SGIX_swap_group, 
    GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap
GLX extensions:
    GLX_ARB_create_context, GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    GLX_EXT_import_context, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_MESA_swap_control, GLX_NV_swap_group, GLX_OML_swap_method, 
    GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_swap_barrier, GLX_SGIX_swap_group, GLX_SGIX_visual_select_group
And from what i can tell, all that are present in "GLX extensions" are also present in "client glx extensions" but not all of the ones in "client glx extensions" are present in "GLX extensions".
Perhaps this is normal behaviour (if some need both client and server to work) i wouldnt know.

Can i do some "hack" to make pbuffer appear as present in "GLX extensions" (linux side) or is this embedded inside the binary driver somehow?
Or perhaps its possible to modify the check for this specific extension in Wine so its a bit more "liberal" (as a temporary solution for me).

I understand that the error lies within ATI's driver, but that doesnt help me much ...
Thunderbird
Level 5
Level 5
Posts: 336
Joined: Mon Nov 24, 2008 8:10 am

Post by Thunderbird »

The pbuffer check is done in dlls/winex11.drv/opengl.c:
if ( (glxRequireVersion(3) && glxRequireExtension("GLX_SGIX_pbuffer")) || glxRequireExtension("GLX_ATI_render_texture"))
register_extension(&WGL_ARB_pbuffer);

Just make that if-statement return true or just remove the if-statement. That should do the job.
Locked