Revert "mesa: unreference current winsys buffers when unbinding winsys buffers"
authorDave Airlie <airlied@redhat.com>
Sun, 26 May 2019 23:36:28 +0000 (09:36 +1000)
committerDave Airlie <airlied@redhat.com>
Sun, 26 May 2019 23:36:28 +0000 (09:36 +1000)
This reverts commit 12bf7cfecf52083c484602f971738475edfe497e.

This commits caused lots of problems:
https://bugs.freedesktop.org/show_bug.cgi?id=110721
https://bugs.freedesktop.org/show_bug.cgi?id=110761

Fixes: 12bf7cfecf52 ("mesa: unreference current winsys buffers when unbinding winsys buffers")
Pushing without review as we need to get it into next stable.

src/mesa/main/context.c

index 04ef4d500d858211b3a4b3a866c8a047965d6306..34da16b88f4f8439e716d2ce18d5b45181988a74 100644 (file)
@@ -1765,10 +1765,6 @@ _mesa_make_current( struct gl_context *newCtx,
 
          check_init_viewport(newCtx, drawBuffer->Width, drawBuffer->Height);
       }
-      else {
-         _mesa_reference_framebuffer(&newCtx->WinSysDrawBuffer, NULL);
-         _mesa_reference_framebuffer(&newCtx->WinSysReadBuffer, NULL);
-      }
 
       if (newCtx->FirstTimeCurrent) {
          handle_first_current(newCtx);