mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-21 14:52:04 +00:00
[client] egl: add cached uniforms and multipass effects
Replace the per-frame uniform list with stable, name-cached handles that retain their values across shader recompilation. Track dirty uniforms so only changed values are uploaded, reducing redundant GL calls and buffer management. Add a reusable effect-pass pipeline with per-pass shaders, samplers, formats, resolutions, and intermediate render targets. This makes external effects easier to integrate and supports arbitrary multipass chains. Migrate the desktop, cursor, damage, 24-bit, downscale, CAS, and FSR rendering paths to the new APIs. Also ensure framebuffer objects are released correctly.
This commit is contained in:
@@ -49,7 +49,7 @@ struct EGL_Damage
|
||||
LG_RendererRotate rotate;
|
||||
|
||||
// uniforms
|
||||
GLint uTransform;
|
||||
EGL_Uniform * uTransform;
|
||||
};
|
||||
|
||||
void egl_damageConfigUI(EGL_Damage * damage)
|
||||
@@ -143,8 +143,8 @@ bool egl_damageRender(EGL_Damage * damage, LG_RendererRotate rotate, const struc
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
egl_uniformMatrix3x2fv(damage->uTransform, 1, GL_FALSE, damage->transform);
|
||||
egl_shaderUse(damage->shader);
|
||||
glUniformMatrix3x2fv(damage->uTransform, 1, GL_FALSE, damage->transform);
|
||||
|
||||
if (data && data->count != 0)
|
||||
egl_desktopRectsUpdate(damage->mesh, (const struct DamageRects *) data,
|
||||
|
||||
Reference in New Issue
Block a user