Fix nir shaders memory leak on translator host side, this issue is heavily

increased the memory usage in application created and compile shader
programs frequently
This commit is contained in:
unknown 2018-03-29 15:15:28 +08:00
commit 90c91783fd
2 changed files with 83 additions and 0 deletions

View file

@ -84,8 +84,12 @@ intptr_t RenderThread::main() {
}
} while (progress);
}
threadInfo.m_gl2Dec.freeShader();
threadInfo.m_gl2Dec.freeProgram();
// Release references to the current thread's context/surfaces if any
renderer_->bindContext(0, 0, 0);
if (threadInfo.currContext || threadInfo.currDrawSurf || threadInfo.currReadSurf)