Skip to content
  • Kyle Brenneman's avatar
    GLdispatch: Don't unpatch entrypoints in __glDispatchLoseCurrent. · 1b30d153
    Kyle Brenneman authored
    
    
    In __glDispatchLoseCurrent, don't try to restore the default entrypoints.
    Instead, __glDispatchMakeCurrent will check if it's using a different vendor
    library, and if so, it will unpatch and repatch the entrypoints then. If it's
    using the same vendor library (which will usually be the case), then it can
    leave them patched and skip the patch overhead.
    
    Some applications will call glXMakeCurrent to release and bind the same context
    every frame, sometimes multiples times. Each patch and unpatch sequnce can chew
    up 1-2 milliseconds. That's enough to significantly reduce the framerate of
    some applications.
    
    Reviewed-by: default avatarJames Jones <jajones@nvidia.com>
    1b30d153