From 029f8c3c3f065de723a1a334f70d2882208b7cdf Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Thu, 11 Dec 2014 09:42:49 -0800 Subject: [PATCH] OGL: Ensure a VAO is bound for all attributeless. Unfortunately, some of these cases are not well tested, because I don't know how to reproduce them. --- Source/Core/VideoBackends/OGL/FramebufferManager.cpp | 2 ++ Source/Core/VideoBackends/OGL/TextureConverter.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/Source/Core/VideoBackends/OGL/FramebufferManager.cpp b/Source/Core/VideoBackends/OGL/FramebufferManager.cpp index c458b79dc6..1089884b96 100644 --- a/Source/Core/VideoBackends/OGL/FramebufferManager.cpp +++ b/Source/Core/VideoBackends/OGL/FramebufferManager.cpp @@ -373,6 +373,8 @@ void FramebufferManager::ReinterpretPixelData(unsigned int convtype) { g_renderer->ResetAPIState(); + OpenGL_BindAttributelessVAO(); + GLuint src_texture = 0; // We aren't allowed to render and sample the same texture in one draw call, diff --git a/Source/Core/VideoBackends/OGL/TextureConverter.cpp b/Source/Core/VideoBackends/OGL/TextureConverter.cpp index 8753b58e8a..6384991ceb 100644 --- a/Source/Core/VideoBackends/OGL/TextureConverter.cpp +++ b/Source/Core/VideoBackends/OGL/TextureConverter.cpp @@ -222,6 +222,8 @@ static void EncodeToRamUsingShader(GLuint srcTexture, // attach render buffer as color destination FramebufferManager::SetFramebuffer(s_texConvFrameBuffer[0]); + OpenGL_BindAttributelessVAO(); + // set source texture glActiveTexture(GL_TEXTURE0+9); glBindTexture(GL_TEXTURE_2D_ARRAY, srcTexture); @@ -362,6 +364,8 @@ void DecodeToTexture(u32 xfbAddr, int srcWidth, int srcHeight, GLuint destTextur g_renderer->ResetAPIState(); // reset any game specific settings + OpenGL_BindAttributelessVAO(); + // switch to texture converter frame buffer // attach destTexture as color destination FramebufferManager::SetFramebuffer(s_texConvFrameBuffer[1]);