From 9f9a9785f29395533cc368a0b3b9cb49e31128e0 Mon Sep 17 00:00:00 2001 From: Mark Sibly Date: Wed, 13 Jan 2021 05:09:24 +0000 Subject: [PATCH] Reset scissor reset before presenting in opengl The opengl backend uses glBlitFramebuffer to present frames which is affected by the opengl scissor rect. Bug: dawn:616 Change-Id: I0b8c3eb7139ab22a98eeb60e3ad16678e3afad5d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37101 Reviewed-by: Corentin Wallez Reviewed-by: Stephen White Commit-Queue: Mark Sibly --- src/dawn_native/opengl/NativeSwapChainImplGL.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dawn_native/opengl/NativeSwapChainImplGL.cpp b/src/dawn_native/opengl/NativeSwapChainImplGL.cpp index 3cfdad4f36..330999db6d 100644 --- a/src/dawn_native/opengl/NativeSwapChainImplGL.cpp +++ b/src/dawn_native/opengl/NativeSwapChainImplGL.cpp @@ -72,6 +72,7 @@ namespace dawn_native { namespace opengl { const OpenGLFunctions& gl = mDevice->gl; gl.BindFramebuffer(GL_READ_FRAMEBUFFER, mBackFBO); gl.BindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); + gl.Scissor(0, 0, mWidth, mHeight); gl.BlitFramebuffer(0, 0, mWidth, mHeight, 0, mHeight, mWidth, 0, GL_COLOR_BUFFER_BIT, GL_NEAREST);