mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 19:30:11 +01:00
glx: Implement the new flush method
Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19242>
This commit is contained in:
parent
5345c34001
commit
8d55fb54b1
6 changed files with 43 additions and 2 deletions
|
|
@ -929,7 +929,8 @@ static const struct glx_context_vtable dri2_context_vtable = {
|
|||
.wait_gl = dri2_wait_gl,
|
||||
.wait_x = dri2_wait_x,
|
||||
.interop_query_device_info = dri2_interop_query_device_info,
|
||||
.interop_export_object = dri2_interop_export_object
|
||||
.interop_export_object = dri2_interop_export_object,
|
||||
.interop_flush_objects = dri2_interop_flush_objects
|
||||
};
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -77,6 +77,11 @@ dri2_interop_export_object(struct glx_context *ctx,
|
|||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out);
|
||||
|
||||
_X_HIDDEN int
|
||||
dri2_interop_flush_objects(struct glx_context *ctx,
|
||||
unsigned count, struct mesa_glinterop_export_in *objects,
|
||||
GLsync *sync);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -710,7 +710,8 @@ static const struct glx_context_vtable dri3_context_vtable = {
|
|||
.wait_gl = dri3_wait_gl,
|
||||
.wait_x = dri3_wait_x,
|
||||
.interop_query_device_info = dri3_interop_query_device_info,
|
||||
.interop_export_object = dri3_interop_export_object
|
||||
.interop_export_object = dri3_interop_export_object,
|
||||
.interop_flush_objects = dri3_interop_flush_objects
|
||||
};
|
||||
|
||||
/** dri3_bind_extensions
|
||||
|
|
|
|||
|
|
@ -138,3 +138,8 @@ _X_HIDDEN int
|
|||
dri3_interop_export_object(struct glx_context *ctx,
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out);
|
||||
|
||||
_X_HIDDEN int
|
||||
dri3_interop_flush_objects(struct glx_context *ctx,
|
||||
unsigned count, struct mesa_glinterop_export_in *objects,
|
||||
GLsync *sync);
|
||||
|
|
|
|||
|
|
@ -57,6 +57,19 @@ dri2_interop_export_object(struct glx_context *ctx,
|
|||
return psc->interop->export_object(ctx->driContext, in, out);
|
||||
}
|
||||
|
||||
_X_HIDDEN int
|
||||
dri2_interop_flush_objects(struct glx_context *ctx,
|
||||
unsigned count, struct mesa_glinterop_export_in *objects,
|
||||
GLsync *sync)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
#if defined(HAVE_DRI3)
|
||||
|
||||
_X_HIDDEN int
|
||||
|
|
@ -84,5 +97,18 @@ dri3_interop_export_object(struct glx_context *ctx,
|
|||
return psc->interop->export_object(ctx->driContext, in, out);
|
||||
}
|
||||
|
||||
_X_HIDDEN int
|
||||
dri3_interop_flush_objects(struct glx_context *ctx,
|
||||
unsigned count, struct mesa_glinterop_export_in *objects,
|
||||
GLsync *sync)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
#endif /* HAVE_DRI3 */
|
||||
#endif /* defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) */
|
||||
|
|
|
|||
|
|
@ -244,6 +244,9 @@ struct glx_context_vtable {
|
|||
int (*interop_export_object)(struct glx_context *ctx,
|
||||
struct mesa_glinterop_export_in *in,
|
||||
struct mesa_glinterop_export_out *out);
|
||||
int (*interop_flush_objects)(struct glx_context *ctx,
|
||||
unsigned count, struct mesa_glinterop_export_in *objects,
|
||||
GLsync *sync);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue