[client] egl: remove blocking waits from frame submission

Track PBO fences per upload slot and wait only when a slot is reused,
allowing rendering to proceed without a CPU stall. Use GPU-side waits
for cross-context DMABUF synchronization.

Also propagate KVMFR write-completion failures so incomplete
shared-memory frames are never submitted, while retaining incremental
damage-copy waits to avoid added latency.
This commit is contained in:
Geoffrey McRae
2026-07-17 22:02:05 +10:00
parent e3616ed4b9
commit b2c40a80af
7 changed files with 161 additions and 101 deletions

View File

@@ -35,7 +35,7 @@ typedef struct TextureBuffer
GLuint tex[EGL_TEX_BUFFER_MAX];
EGL_TexBuffer buf[EGL_TEX_BUFFER_MAX];
int bufFree;
GLsync sync;
GLsync sync[EGL_TEX_BUFFER_MAX];
LG_Lock copyLock;
int bufIndex;
int rIndex;
@@ -55,6 +55,8 @@ bool egl_texBufferStreamInit(EGL_Texture ** texture_, EGL_TexType type,
EGLDisplay * display);
bool egl_texBufferStreamSetup(EGL_Texture * texture_,
const EGL_TexSetup * setup);
/* Returns with copyLock held when the current upload buffer is safe to write. */
bool egl_texBufferStreamLock(TextureBuffer * texture);
EGL_TexStatus egl_texBufferStreamProcess(EGL_Texture * texture_);
EGL_TexStatus egl_texBufferStreamGet(EGL_Texture * texture_, GLuint * tex,
EGL_PixelFormat * fmt);