OGL: Don't leave staging texture buffer bound after mapping
This could cause glReadPixels() calls which assume no buffer is bound (e.g. CPU EFB access) to fail. The problem was limited to devices which don't support persistent mapping, as the map path is not otherwise.
This commit is contained in:
parent
c30ac55cf4
commit
4b96db8fc9
|
@ -511,10 +511,8 @@ bool OGLStagingTexture::Map()
|
|||
flags = GL_MAP_READ_BIT | GL_MAP_WRITE_BIT;
|
||||
glBindBuffer(m_target, m_buffer_name);
|
||||
m_map_pointer = reinterpret_cast<char*>(glMapBufferRange(m_target, 0, m_buffer_size, flags));
|
||||
if (!m_map_pointer)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
glBindBuffer(m_target, 0);
|
||||
return m_map_pointer != nullptr;
|
||||
}
|
||||
|
||||
void OGLStagingTexture::Unmap()
|
||||
|
|
Loading…
Reference in New Issue