[client] egl: cache renderer GL state

Track context-local GL bindings to avoid redundant program, framebuffer,
buffer, texture, sampler, viewport, blend, and scissor state changes.

Invalidate the cache across context switches, ImGui rendering, and
shared object changes. Preserve CPU-backed texture upload correctness by
explicitly clearing pixel unpack buffer bindings where required.

This reduces hot-path driver overhead without adding waits or GPU
synchronization.
This commit is contained in:
Geoffrey McRae
2026-07-17 22:38:46 +10:00
parent b60fa8756f
commit cd0d668076
17 changed files with 439 additions and 68 deletions

View File

@@ -73,6 +73,7 @@ make_defines(
add_library(renderer_EGL STATIC
egl.c
egldebug.c
state.c
shader.c
texture_util.c
texture.c