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:
Tom Englund
2025-02-08 01:46:26 +01:00
committed by GitHub
parent a724332eb8
commit f7fcbe32c9
7 changed files with 50 additions and 36 deletions

View File

@@ -233,8 +233,6 @@ class CHyprOpenGLImpl {
SCurrentRenderData m_RenderData;
GLint m_iCurrentOutputFb = 0;
Hyprutils::OS::CFileDescriptor m_iGBMFD;
gbm_device* m_pGbmDevice = nullptr;
EGLContext m_pEglContext = nullptr;