Skip to content
  • Nicholas Miell's avatar
    glean: Release GLX context before destroying the window · b4d2195e
    Nicholas Miell authored and Brian Paul's avatar Brian Paul committed
    
    
    GLEAN::Window::~Window was calling XDestroyWindow on the currently
    bound GLX drawable, which would cause the subsequent test to explode
    when it called glXMakeCurrent and Mesa attempted to flush the
    outstanding state to the now destroyed window.
    
    Now the Window destructor checks if the window being destroyed is
    bound to the current GLX context, and if so, releases the current GLX
    context before destroying the window.
    
    I also included the equivalent WGL change, but that is untested.
    The AGL and BeOS versions are untouched, but probably needs something
    similar.
    
    With this change, the glean basic sanity test now passes on Mesa swrast.
    
    Signed-off-by: default avatarNicholas Miell <nmiell@gmail.com>
    Signed-off-by: default avatarBrian Paul <brianp@vmware.com>
    b4d2195e