diff --git a/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp b/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp index 2f03bf517..2648f6fdf 100644 --- a/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp +++ b/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp @@ -1176,6 +1176,18 @@ void WrappedOpenGL::glFramebufferTextureMultiviewOVR(GLenum target, GLenum attac IsBackgroundCapturing(m_State)) return; + // because there's no DSA variant of the OVR framebuffer functions we must ensure that while + // background capturing the correct framebuffer is bound. Normally we don't serialise + // glBindFramebuffer calls. + if(IsBackgroundCapturing(m_State)) + { + USE_SCRATCH_SERIALISER(); + SCOPED_SERIALISE_CHUNK(GLChunk::glBindFramebuffer); + Serialise_glBindFramebuffer(ser, target, record->Resource.name); + + record->AddChunk(scope.Get()); + } + USE_SCRATCH_SERIALISER(); SCOPED_SERIALISE_CHUNK(gl_CurChunk); Serialise_glFramebufferTextureMultiviewOVR(ser, target, attachment, texture, level, @@ -1275,6 +1287,18 @@ void WrappedOpenGL::glFramebufferTextureMultisampleMultiviewOVR(GLenum target, G IsBackgroundCapturing(m_State)) return; + // because there's no DSA variant of the OVR framebuffer functions we must ensure that while + // background capturing the correct framebuffer is bound. Normally we don't serialise + // glBindFramebuffer calls. + if(IsBackgroundCapturing(m_State)) + { + USE_SCRATCH_SERIALISER(); + SCOPED_SERIALISE_CHUNK(GLChunk::glBindFramebuffer); + Serialise_glBindFramebuffer(ser, target, record->Resource.name); + + record->AddChunk(scope.Get()); + } + USE_SCRATCH_SERIALISER(); SCOPED_SERIALISE_CHUNK(gl_CurChunk); Serialise_glFramebufferTextureMultisampleMultiviewOVR(ser, target, attachment, texture, level,