Subject: Re: using glXGetProcAddressARB

Daniel Skorka skorka at gmx.net
Wed Nov 19 14:31:07 CST 2003


Hi all,

first of all thanks for your comments on this.

Lionel: Just noticed I accidentially forgot to CC the list.

On Wed, Nov 19, 2003 at 11:04:00AM +0100, Lionel Ulmer wrote:
> 
> It's a bug in the DRI libraries that I reported some time ago and should be
> fixed in the XFree 4.4 (or 4.5) release of the library part of the DRI.

What are you referring to by "4.4 (or 4.5)"? XFree86 4.4.0 isn't out
yet, so I'm assuming you do not mean XFree86.

> For that, could you send me the output of your 'glxinfo' ?

---snip---
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
client glx vendor string: SGI
client glx version string: 1.2
client glx extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
GLX extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context
OpenGL vendor string: Gareth Hughes, Leif Delgass, José Fonseca
OpenGL renderer string: Mesa DRI Mach64 20020227 [Rage Pro] x86/MMX
OpenGL version string: 1.2 Mesa 4.0.3
OpenGL extensions:
    GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_transpose_matrix, 
    GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_minmax, 
    GL_EXT_blend_subtract, GL_EXT_clip_volume_hint, GL_EXT_convolution, 
    GL_EXT_compiled_vertex_array, GL_EXT_histogram, GL_EXT_packed_pixels, 
    GL_EXT_polygon_offset, GL_EXT_rescale_normal, GL_EXT_texture3D, 
    GL_EXT_texture_object, GL_EXT_vertex_array, GL_IBM_rasterpos_clip, 
    GL_MESA_window_pos, GL_NV_texgen_reflection, GL_SGI_color_matrix, 
    GL_SGI_color_table
glu version: 1.3
glu extensions:
    GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------
0x23 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x24 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow
0x25 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow
0x26 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow
0x27 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None
0x28 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow
0x29 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow
0x2a 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow
---snip---

As you can see, it is reporting GLX version 1.2. However, <GL/glx.h>
on my system mentions something about GLX 1.4. Go figure...

So, what is the fix to this problem? It would be trivial to have
process_attach (in $(TOPDIR)/dlls/opengl32/wgl.c) to call wine_dlsym() for
"glXGetProcAddressARB" without checking whether it is listed as an
extension or not and to then check whether an error occured.

BTW, I think I have just found a potential (though unlikely) problem
with the code in wglGetProcAddress. It checks whether
p_glXGetProcAddressARB (the return value of wine_dlsym) != NULL.
However, according to dlsym(3), the value of a symbol may be NULL.

Daniel



More information about the wine-devel mailing list