From 414c4583e815b014816bc51a0eef116ec00870ae Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Wed, 9 Aug 2023 12:57:49 +0200 Subject: [PATCH] glx: Add missing MesaGLInteropGLXFlushObjects All the plumbing was added in 8d55fb54b15381d7fa950f448e5c67d0556088db but for some reason the top level access method was not ... Signed-off-by: Sylvain Munaut Acked-by: Antonio Gomes Reviewed-by: Adam Jackson Part-of: --- src/glx/glxcmds.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index 21537b7e6ff..293ac742c92 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -2449,4 +2449,30 @@ MesaGLInteropGLXExportObject(Display *dpy, GLXContext context, return ret; } +PUBLIC int +MesaGLInteropGLXFlushObjects(Display *dpy, GLXContext context, + unsigned count, + struct mesa_glinterop_export_in *resources, + GLsync *sync) +{ + struct glx_context *gc = (struct glx_context*)context; + int ret; + + __glXLock(); + + if (!gc || gc->xid == None || !gc->isDirect) { + __glXUnlock(); + return MESA_GLINTEROP_INVALID_CONTEXT; + } + + if (!gc->vtable->interop_flush_objects) { + __glXUnlock(); + return MESA_GLINTEROP_UNSUPPORTED; + } + + ret = gc->vtable->interop_flush_objects(gc, count, resources, sync); + __glXUnlock(); + return ret; +} + #endif /* defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) */