Skip to content

Commit

Permalink
Fix assertion in WebGL debug (#6831)
Browse files Browse the repository at this point in the history
  • Loading branch information
bejado authored May 23, 2023
1 parent fda62e0 commit b2ee4e9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions filament/backend/src/opengl/OpenGLDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2719,9 +2719,8 @@ void OpenGLDriver::endRenderPass(int) {
discardFlags &= ~TargetBufferFlags::STENCIL;
}

if (rt->gl.isDefault) {
assert_invariant(mCurrentDrawSwapChain);
assert_invariant(mCurrentDrawSwapChain->swapChain);
if (rt->gl.isDefault &&

This comment has been minimized.

Copy link
@pixelflinger

pixelflinger May 23, 2023

Collaborator

the correct fix is just to remove the assert on swapChain, the rest is correct.

mCurrentDrawSwapChain && mCurrentDrawSwapChain->swapChain) {
discardFlags &= ~mPlatform.getPreservedFlags(mCurrentDrawSwapChain->swapChain);
}

Expand Down

0 comments on commit b2ee4e9

Please sign in to comment.