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.
This commit is contained in:
Unknown W. Brackets 2014-12-11 09:42:49 -08:00
parent de2abbed17
commit 029f8c3c3f
2 changed files with 6 additions and 0 deletions

View File

@ -373,6 +373,8 @@ void FramebufferManager::ReinterpretPixelData(unsigned int convtype)
{ {
g_renderer->ResetAPIState(); g_renderer->ResetAPIState();
OpenGL_BindAttributelessVAO();
GLuint src_texture = 0; GLuint src_texture = 0;
// We aren't allowed to render and sample the same texture in one draw call, // We aren't allowed to render and sample the same texture in one draw call,

View File

@ -222,6 +222,8 @@ static void EncodeToRamUsingShader(GLuint srcTexture,
// attach render buffer as color destination // attach render buffer as color destination
FramebufferManager::SetFramebuffer(s_texConvFrameBuffer[0]); FramebufferManager::SetFramebuffer(s_texConvFrameBuffer[0]);
OpenGL_BindAttributelessVAO();
// set source texture // set source texture
glActiveTexture(GL_TEXTURE0+9); glActiveTexture(GL_TEXTURE0+9);
glBindTexture(GL_TEXTURE_2D_ARRAY, srcTexture); 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 g_renderer->ResetAPIState(); // reset any game specific settings
OpenGL_BindAttributelessVAO();
// switch to texture converter frame buffer // switch to texture converter frame buffer
// attach destTexture as color destination // attach destTexture as color destination
FramebufferManager::SetFramebuffer(s_texConvFrameBuffer[1]); FramebufferManager::SetFramebuffer(s_texConvFrameBuffer[1]);