mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-09 00:21:56 -07:00
renderer: various fixes towards improving gpu calls robustness (#9188)
ensure framebuffer textures are detached and deleted, avoid leaving framebuffers bound when not needed * render: avoid calling glDeleteProgram on no program its safe to do so but it adds a bunch of unnecessery lines in apitrace when tracing. if guard it and return early. * opengl: ensure texture and buffers are unbound ensure bound buffers are unbound after use, also detach textures from framebuffer before deleting it otherwise it will become dangling and essentially leak.
This commit is contained in:
@@ -319,6 +319,12 @@ bool CToplevelExportFrame::copyShm(timespec* now) {
|
||||
g_pPointerManager->damageCursor(PMONITOR->self.lock());
|
||||
}
|
||||
|
||||
outFB.unbind();
|
||||
|
||||
#ifndef GLES2
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user