diff options
author | Antonio Gomes <antoniospg100@gmail.com> | 2023-10-24 17:31:15 -0300 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-11-04 01:28:42 +0000 |
commit | 1396dc1c387a9f9a8b16ad358ee12a025159cc98 (patch) | |
tree | 7bc01f53a79019a9e9fd228454189547ddb7cd30 /src/glx | |
parent | 663cef26d0ba93dc3237b950046bc7fa48a879d8 (diff) |
mesa/st, dri2, wgl, glx: Modify flush_objects interop func to export a fence_fd
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21305>
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/dri2_priv.h | 2 | ||||
-rw-r--r-- | src/glx/dri3_priv.h | 2 | ||||
-rw-r--r-- | src/glx/dri_common_interop.c | 8 | ||||
-rw-r--r-- | src/glx/g_glxglvnddispatchfuncs.c | 4 | ||||
-rw-r--r-- | src/glx/glxclient.h | 4 | ||||
-rw-r--r-- | src/glx/glxcmds.c | 8 |
6 files changed, 14 insertions, 14 deletions
diff --git a/src/glx/dri2_priv.h b/src/glx/dri2_priv.h index 837709fa5ec..2c26b544d12 100644 --- a/src/glx/dri2_priv.h +++ b/src/glx/dri2_priv.h @@ -83,7 +83,7 @@ dri2_interop_export_object(struct glx_context *ctx, _X_HIDDEN int dri2_interop_flush_objects(struct glx_context *ctx, unsigned count, struct mesa_glinterop_export_in *objects, - GLsync *sync); + GLsync *sync, int *fence_fd); #ifdef __cplusplus } diff --git a/src/glx/dri3_priv.h b/src/glx/dri3_priv.h index c76fdf7df5a..6f523742f67 100644 --- a/src/glx/dri3_priv.h +++ b/src/glx/dri3_priv.h @@ -143,4 +143,4 @@ dri3_interop_export_object(struct glx_context *ctx, _X_HIDDEN int dri3_interop_flush_objects(struct glx_context *ctx, unsigned count, struct mesa_glinterop_export_in *objects, - GLsync *sync); + GLsync *sync, int *fence_fd); diff --git a/src/glx/dri_common_interop.c b/src/glx/dri_common_interop.c index cce3776a35c..e1c0fb928b7 100644 --- a/src/glx/dri_common_interop.c +++ b/src/glx/dri_common_interop.c @@ -60,14 +60,14 @@ dri2_interop_export_object(struct glx_context *ctx, _X_HIDDEN int dri2_interop_flush_objects(struct glx_context *ctx, unsigned count, struct mesa_glinterop_export_in *objects, - GLsync *sync) + GLsync *sync, int *fence_fd) { struct dri2_screen *psc = (struct dri2_screen*)ctx->psc; if (!psc->interop || psc->interop->base.version < 2) return MESA_GLINTEROP_UNSUPPORTED; - return psc->interop->flush_objects(ctx->driContext, count, objects, sync); + return psc->interop->flush_objects(ctx->driContext, count, objects, sync, fence_fd); } #if defined(HAVE_DRI3) @@ -100,14 +100,14 @@ dri3_interop_export_object(struct glx_context *ctx, _X_HIDDEN int dri3_interop_flush_objects(struct glx_context *ctx, unsigned count, struct mesa_glinterop_export_in *objects, - GLsync *sync) + GLsync *sync, int *fence_fd) { struct dri3_screen *psc = (struct dri3_screen*)ctx->psc; if (!psc->interop || psc->interop->base.version < 2) return MESA_GLINTEROP_UNSUPPORTED; - return psc->interop->flush_objects(ctx->driContext, count, objects, sync); + return psc->interop->flush_objects(ctx->driContext, count, objects, sync, fence_fd); } #endif /* HAVE_DRI3 */ diff --git a/src/glx/g_glxglvnddispatchfuncs.c b/src/glx/g_glxglvnddispatchfuncs.c index bafe41cc337..b583f838c82 100644 --- a/src/glx/g_glxglvnddispatchfuncs.c +++ b/src/glx/g_glxglvnddispatchfuncs.c @@ -333,7 +333,7 @@ static int dispatch_GLInteropExportObjectMESA(Display *dpy, GLXContext ctx, static int dispatch_GLInteropFlushObjectsMESA(Display *dpy, GLXContext ctx, unsigned count, struct mesa_glinterop_export_in *resources, - GLsync *sync) + GLsync *sync, int *fence_fd) { PFNMESAGLINTEROPGLXFLUSHOBJECTSPROC pGLInteropFlushObjectsMESA; __GLXvendorInfo *dd; @@ -346,7 +346,7 @@ static int dispatch_GLInteropFlushObjectsMESA(Display *dpy, GLXContext ctx, if (pGLInteropFlushObjectsMESA == NULL) return 0; - return pGLInteropFlushObjectsMESA(dpy, ctx, count, resources, sync); + return pGLInteropFlushObjectsMESA(dpy, ctx, count, resources, sync, fence_fd); } diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h index f884a18f205..b1c1fe574cf 100644 --- a/src/glx/glxclient.h +++ b/src/glx/glxclient.h @@ -222,7 +222,7 @@ struct glx_context_vtable { struct mesa_glinterop_export_out *out); int (*interop_flush_objects)(struct glx_context *ctx, unsigned count, struct mesa_glinterop_export_in *objects, - GLsync *sync); + GLsync *sync, int *fence_fd); }; /** @@ -457,7 +457,7 @@ struct glx_screen_vtable { /* The error outparameter abuses the fact that the only possible errors are * GLXBadContext (0), GLXBadFBConfig (9), GLXBadProfileARB (13), BadValue * (2), BadMatch (8), and BadAlloc (11). Since those don't collide we just - * use them directly rather than try to offset or use a sign convention. + * use them directly rather than try to offset or use a sign convention. */ struct glx_context *(*create_context_attribs)(struct glx_screen *psc, struct glx_config *config, diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index 7ce8aba22f9..7ecf5daef96 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -596,7 +596,7 @@ glXCopyContext(Display * dpy, GLXContext source_user, mask, &errorcode, &x11error)) { __glXSendError(dpy, errorcode, 0, X_GLXCopyContext, x11error); } - + #else xGLXCopyContextReq *req; struct glx_context *gc = __glXGetCurrentContext(); @@ -1756,7 +1756,7 @@ glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count) /* ** GLX_SGIX_fbconfig -** Many of these functions are aliased to GLX 1.3 entry points in the +** Many of these functions are aliased to GLX 1.3 entry points in the ** GLX_functions table. */ @@ -2458,7 +2458,7 @@ PUBLIC int MesaGLInteropGLXFlushObjects(Display *dpy, GLXContext context, unsigned count, struct mesa_glinterop_export_in *resources, - GLsync *sync) + GLsync *sync, int *fence_fd) { struct glx_context *gc = (struct glx_context*)context; int ret; @@ -2475,7 +2475,7 @@ MesaGLInteropGLXFlushObjects(Display *dpy, GLXContext context, return MESA_GLINTEROP_UNSUPPORTED; } - ret = gc->vtable->interop_flush_objects(gc, count, resources, sync); + ret = gc->vtable->interop_flush_objects(gc, count, resources, sync, fence_fd); __glXUnlock(); return ret; } |