google / filament

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
https://google.github.io/filament/
Apache License 2.0
17.36k stars 1.84k forks source link

Fix mixed up FBO targets in status check code in OpenGLDriver::blit() #7825

Closed palver123 closed 2 months ago

palver123 commented 2 months ago

While using Filament with ANGLE on Windows (using D3D11 backend of ANGLE) we noticed getting lots of warnings like this:

OpenGL framebuffer error 0x8219 (GL_FRAMEBUFFER_UNDEFINED) in "blit" at line 3581

We use Filament v1.50.3 and there the problematic driver calls comes from here. Looking at the implementation of OpenGLDriver::blit() it seemed to me there was a bug (fix me if I am wrong). It:

I couldn't reproduce it with gltf_viewer + Windows OpenGL driver but it can be that ANGLE is more chatty on the debug output than the Windows OpenGL driver. And regardless of this, the FBO checks still seem to be mixed up