mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Clear fences list in olorBufferReaderWithBufferStorage::_destroyBuffers()
Fixed memory leak on graphics context destroy.
This commit is contained in:
parent
fbd4a9a016
commit
38dc7ff25f
|
@ -37,8 +37,10 @@ void ColorBufferReaderWithBufferStorage::_destroyBuffers()
|
|||
{
|
||||
glDeleteBuffers(_numPBO, m_PBO);
|
||||
|
||||
for (int index = 0; index < _numPBO; ++index)
|
||||
for (int index = 0; index < _numPBO; ++index) {
|
||||
m_PBO[index] = 0;
|
||||
glDeleteSync(m_fence[index]);
|
||||
}
|
||||
}
|
||||
|
||||
const u8 * ColorBufferReaderWithBufferStorage::_readPixels(const ReadColorBufferParams& _params, u32& _heightOffset,
|
||||
|
@ -58,6 +60,7 @@ const u8 * ColorBufferReaderWithBufferStorage::_readPixels(const ReadColorBuffer
|
|||
if (m_fence[m_curIndex] != 0) {
|
||||
glClientWaitSync(m_fence[m_curIndex], 0, 100000000);
|
||||
glDeleteSync(m_fence[m_curIndex]);
|
||||
m_fence[m_curIndex] = 0;
|
||||
}
|
||||
} else {
|
||||
glFinish();
|
||||
|
|
Loading…
Reference in New Issue
Block a user