• Show log

    Commit

  • Hash : 1e07dba0
    Author : Aaron Plattner
    Date : 2021-06-09T15:26:38

    x11: Use glXChooseFBConfig when available in X11_GL_GetVisual
    
    When choosing an X11 Visual for a window based on its GLX capabilities, first
    try glXChooseFBConfig (if available) before falling back to glXChooseVisual.
    This normally does not make a difference because most GLX drivers create a
    Visual for every GLXFBConfig, exposing all of the same capabilities.
    
    For GLX render offload configurations (also know as "PRIME") where one GPU is
    providing GLX rendering support for windows on an X screen running on a
    different GPU, the GPU doing the offloading needs to use the Visuals that were
    created by the host GPU's driver rather than being able to add its own. This
    means that there may be fewer Visuals available for all of the GLXFBConfigs the
    guest driver wants to expose. In order to handle that situation, the NVIDIA GLX
    driver creates many GLXFBConfigs that map to the same Visual when running in a
    render offload configuration.
    
    This can result in a glXChooseVisual request failing to find a supported Visual
    when there is a GLXFBConfig for that configuration that would have worked. For
    example, when the game "Unnamed SDVX Clone" [1] tries to create a configuration
    with multisample, glXChooseVisual fails because the Visual assigned to the
    multisample GLXFBConfigs is shared with the GLXFBConfigs without multisample.
    
    Avoid this problem by using glXChooseFBConfig, when available, to find a
    GLXFBConfig with the requested capabilities and then using
    glXGetVisualFromFBConfig to find the corresponding X11 Visual. This allows the
    game to run, although it doesn't make me any better at actually playing it...
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Fixes: https://forums.developer.nvidia.com/t/prime-run-cannot-create-window-x-glxcreatecontext/180214
    
    [1] https://github.com/Drewol/unnamed-sdvx-clone
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/SDL.git
    Git SSH git@git.kmx.io:kc3-lang/SDL.git
    Public access ? public
    Description

    Fork of https://github.com/libsdl-org/SDL

    Users
    thodg_m kc3_lang_org thodg_w thodg_l www_kmx_io thodg
    Tags

  • README.md

  • Simple DirectMedia Layer (SDL) Version 2.0

    https://www.libsdl.org/

    Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve’s award winning catalog and many Humble Bundle games.

    More extensive documentation is available in the docs directory, starting with README.md

    Enjoy!

    Sam Lantinga (slouken@libsdl.org)