Announcement

Collapse
No announcement yet.

ATI GLX problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ATI GLX problems

    OpenGL programs use the same info as shown by glxinfo for detecting the OpenGL/GLX capabilities. Roughly speaking GLX is used for setting up OpenGL. Most programs barely use the GLX capabilities (games in general use SDL which handle it) and programs that directly use GLX in general only use its basics. (e.g. creating a GLX context and attaching some X drawable to it for drawing) The problem is that the GLX information reported by the ATI drivers isn't entirely correct which confuses programs like Wine which use GLX to its limits.

    In case of GLX you can get information about what the Xserver supports (version/vendor/extensions; in general this is SGI), you can get information about what the client supports (version/vendor/extensions). The largest common demoninator between the client and server info is then shown as the 'main' GLX version and list of extensions. Programs are only allowed to look at the 'main' GLX information for querying what's available. (For instance client extensions don't have to be available even if they are listed)

    The problem is that ATI's drivers report a recent GLX version (1.3 in the current drivers and 1.4 in the 8.41.x drivers). In GLX version 1.3 GLX extensions like GLX_SGIX_fbconfig and GLX_SGIX_pbuffer became part of GLX. Version number 1.3 implies that both features are supported but because this is neither reflected in the 'main' version (this is because the SGI module is still 1.2) or the 'main' GLX extension list the availability can't be assumed. Other drivers (standard DRI / Nvidia) nicely report the GLX extension names and because of that the functions can be detected. The end-result for the missing extensions is less GLX functionality in programs that try to use GLX correctly. In Wine we are using a very hacky ATI-check to get at least fbconfig support which we require (everything else has reported this for years)

    The main changes that are needed in the drivers are to at least report the GLX extensions in the 'main' extension list until Xorg's GLX is 1.3 or higher too. But even then also advertise the extensions. This will also be needed in the future for GLX_EXT_texture_from_pixmap.

    Hopefully this problem will be addressed in the future. It will make the life of developers easier (no ugly hacks and very strange bugs) but it will also offer users more functionality (on Wine actually some functionality isn't available right now due to the GLX madness; workarounds aren't accepted in Wine and even if we added those they would break for Mesa or other drivers)
    Last edited by Thunderbird; 05 September 2007, 10:02 AM.

  • #2
    Here is the output for others:

    $ glxinfo
    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_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method,
    GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_hyperpipe,
    GLX_SGIX_swap_barrier, GLX_SGIX_fbconfig, GLX_MESA_copy_sub_buffer
    client glx vendor string: ATI
    client glx version string: 1.4
    client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample
    GLX version: 1.2
    GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample
    OpenGL vendor string: ATI Technologies Inc.
    OpenGL renderer string: ATI Mobility Radeon X1400
    OpenGL version string: 2.0.6847 Release
    OpenGL extensions:
    GL_ARB_depth_texture, GL_ARB_draw_buffers, GL_ARB_fragment_program,
    GL_ARB_fragment_shader, GL_ARB_multisample, GL_ARB_multitexture,
    GL_ARB_occlusion_query, GL_ARB_point_parameters, GL_ARB_point_sprite,
    GL_ARB_shader_objects, GL_ARB_shading_language_100, GL_ARB_shadow,
    GL_ARB_shadow_ambient, GL_ARB_texture_border_clamp,
    GL_ARB_texture_compression, GL_ARB_texture_cube_map,
    GL_ARB_texture_env_add, GL_ARB_texture_env_combine,
    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3,
    GL_ARB_texture_float, GL_ARB_texture_mirrored_repeat,
    GL_ARB_texture_rectangle, GL_ARB_transpose_matrix,
    GL_ARB_vertex_buffer_object, GL_ARB_vertex_program, GL_ARB_vertex_shader,
    GL_ARB_window_pos, GL_ATI_draw_buffers, GL_ATI_envmap_bumpmap,
    GL_ATI_fragment_shader, GL_ATI_meminfo, GL_ATI_separate_stencil,
    GL_ATI_texture_compression_3dc, GL_ATI_texture_env_combine3,
    GL_ATI_texture_float, GL_EXT_bgra, GL_EXT_blend_color,
    GL_EXT_blend_func_separate, GL_EXT_blend_minmax, GL_EXT_blend_subtract,
    GL_EXT_compiled_vertex_array, GL_EXT_copy_texture,
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_framebuffer_object,
    GL_EXT_multi_draw_arrays, GL_EXT_packed_depth_stencil,
    GL_EXT_packed_pixels, GL_EXT_point_parameters, GL_EXT_rescale_normal,
    GL_EXT_secondary_color, GL_EXT_separate_specular_color,
    GL_EXT_shadow_funcs, GL_EXT_stencil_wrap, GL_EXT_subtexture,
    GL_EXT_texgen_reflection, GL_EXT_texture3D,
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_cube_map,
    GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add,
    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3,
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod_bias,
    GL_EXT_texture_mirror_clamp, GL_EXT_texture_object,
    GL_EXT_texture_rectangle, GL_EXT_vertex_array, GL_KTX_buffer_region,
    GL_NV_blend_square, GL_NV_texgen_reflection, GL_SGIS_generate_mipmap,
    GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_WIN_swap_hint,
    WGL_EXT_swap_control
    Michael Larabel
    https://www.michaellarabel.com/

    Comment


    • #3
      Further I don't understand why the drivers are exporting WGL functions like WGL_EXT_swap_control / GL_WIN_swap_hint (there's GLX_SGI_swap_control).

      Comment


      • #4
        Code:
        display: :0  screen: 0
        direct rendering: Yes
        server glx vendor string: SGI
        server glx version string: 1.2
        server glx extensions:
            GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
            GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method,
            GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_hyperpipe,
            GLX_SGIX_swap_barrier, GLX_SGIX_fbconfig, GLX_MESA_copy_sub_buffer
        client glx vendor string: ATI
        client glx version string: 1.3
        client glx extensions:
            GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context,
            GLX_ARB_get_proc_address, GLX_SGI_video_sync, GLX_ARB_multisample,
            GLX_ATI_pixel_format_float, GLX_ATI_render_texture
        GLX version: 1.2
        GLX extensions:
            GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context,
            GLX_ARB_multisample
        OpenGL vendor string: ATI Technologies Inc.
        OpenGL renderer string: ATI Radeon 9550 / X1050 Series
        OpenGL version string: 2.0.6747 (8.40.4)
        OpenGL extensions:
            GL_ARB_multitexture, GL_EXT_texture_env_add, GL_EXT_compiled_vertex_array,
            GL_S3_s3tc, GL_ARB_depth_texture, GL_ARB_fragment_program,
            GL_ARB_fragment_program_shadow, GL_ARB_fragment_shader,
            GL_ARB_multisample, GL_ARB_occlusion_query, GL_ARB_point_parameters,
            GL_ARB_point_sprite, GL_ARB_shader_objects, GL_ARB_shading_language_100,
            GL_ARB_shadow, GL_ARB_shadow_ambient, GL_ARB_texture_border_clamp,
            GL_ARB_texture_compression, GL_ARB_texture_cube_map,
            GL_ARB_texture_env_add, GL_ARB_texture_env_combine,
            GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3,
            GL_ARB_texture_float, GL_ARB_texture_mirrored_repeat,
            GL_ARB_texture_rectangle, GL_ARB_transpose_matrix, GL_ARB_vertex_blend,
            GL_ARB_vertex_buffer_object, GL_ARB_pixel_buffer_object,
            GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ARB_window_pos,
            GL_ARB_draw_buffers, GL_ATI_draw_buffers, GL_ATI_element_array,
            GL_ATI_envmap_bumpmap, GL_ATI_fragment_shader, GL_ATI_map_object_buffer,
            GL_ATI_separate_stencil, GL_ATI_texture_env_combine3,
            GL_ATI_texture_float, GL_ATI_texture_mirror_once,
            GL_ATI_vertex_array_object, GL_ATI_vertex_attrib_array_object,
            GL_ATI_vertex_streams, GL_ATIX_texture_env_combine3,
            GL_ATIX_texture_env_route, GL_ATIX_vertex_shader_output_point_size,
            GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_func_separate,
            GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_clip_volume_hint,
            GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_framebuffer_object,
            GL_EXT_multi_draw_arrays, GL_EXT_packed_pixels, GL_EXT_point_parameters,
            GL_EXT_rescale_normal, GL_EXT_secondary_color,
            GL_EXT_separate_specular_color, GL_EXT_shadow_funcs, GL_EXT_stencil_wrap,
            GL_EXT_texgen_reflection, GL_EXT_texture3D,
            GL_EXT_texture_compression_s3tc, GL_EXT_texture_cube_map,
            GL_EXT_texture_edge_clamp, GL_EXT_texture_env_combine,
            GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic,
            GL_EXT_texture_lod_bias, GL_EXT_texture_mirror_clamp,
            GL_EXT_texture_object, GL_EXT_texture_rectangle, GL_EXT_vertex_array,
            GL_EXT_vertex_shader, GL_HP_occlusion_test, GL_NV_blend_square,
            GL_NV_occlusion_query, GL_NV_texgen_reflection, GL_SGI_color_matrix,
            GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp,
            GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays
        Above is my current glxinfo dump ...

        Tbird:
        I play WoW in wine on this card - and mostly its cool - in order to tweak framerates a bit we stomp on GL_ARB_vertex_buffer_object with a registry hack. Turning this extension off with fglrx and wine improves framerates substantially in WoW (usually 5 to 20 fps gain on average on lower end cards)
        I'm going to have to try the new driver without the registry hack to see if the driver update handles Wine's use of that gl call better -- I see the extension is still in the new driver list .. (Thanks Michael) is there anything else I can torture for you guys on the wine side?

        Comment


        • #5
          VBOs are really great the problem is that the way WoW uses them is not very inefficient. It is a problem caused by Blizzard.

          Comment


          • #6
            Originally posted by Thunderbird View Post
            VBOs are really great the problem is that the way WoW uses them is not very inefficient. It is a problem caused by Blizzard.
            I thought ati didn't properly implement VBOs. On my X850 XT PE, when I activate VBOs in Nexuiz, I get slowdowns (down to 1-2fps) whenever an enemy is drawn on screen.

            Of course, it could be Alientrap's implementation that's the problem...
            Last edited by Xipeos; 05 September 2007, 06:28 PM. Reason: comma

            Comment


            • #7
              Originally posted by Thunderbird View Post
              VBOs are really great the problem is that the way WoW uses them is not very inefficient. It is a problem caused by Blizzard.

              Okay - so if I switch the S/O's winxp box installation of wow to opengl I'll see the same affect (i.e. there will be a two to ten percent improvement in opengl rendering) by turning off this GL extension.

              I'll have to try that ... (shes running on a pcie X1350)

              Comment


              • #8
                WoW's OpenGL implementation is a bit poor.

                For example, it uses non-power-of-two textures in OpenGL mode. (Not in Direct3D mode, though!) NPOT textures aren't supported by Mesa's R200 driver, causing things like the Cinematic not to display, and possibly the mini-map not to be drawn indoors. I understand that NPOT textures aren't particularly well accelerated by ATI hardware either, although the driver does support the extension as part of OpenGL 2.0.

                Comment

                Working...
                X