comp/gl: hack: glFlush() before committing a layer

This works around corruption in layers on several drivers caused by
writes to the OpenGL textures not having finished when used by the
compositor.

This should be properly fixed with external semaphores later.
This commit is contained in:
Christoph Haag 2020-07-17 17:11:35 +02:00
parent eb355f3643
commit 4ec6f46717

View file

@ -204,6 +204,9 @@ client_gl_compositor_layer_quad(struct xrt_compositor *xc,
static xrt_result_t
client_gl_compositor_layer_commit(struct xrt_compositor *xc, int64_t frame_id)
{
//! @hack: The swapchain images should have been externally synchronized
glFlush();
struct client_gl_compositor *c = client_gl_compositor(xc);
return xrt_comp_layer_commit(&c->xcn->base, frame_id);