diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 0d8e7dbae15..6f573849b38 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -820,9 +820,6 @@ static const struct glx_context_vtable dri2_context_vtable = { .unbind = dri2_unbind_context, .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_flush_objects = dri2_interop_flush_objects }; static void diff --git a/src/glx/dri2_priv.h b/src/glx/dri2_priv.h index 041faf3dd58..72a7a031e42 100644 --- a/src/glx/dri2_priv.h +++ b/src/glx/dri2_priv.h @@ -62,20 +62,6 @@ _X_HIDDEN int dri2_query_renderer_string(struct glx_screen *base, int attribute, const char **value); -_X_HIDDEN int -dri2_interop_query_device_info(struct glx_context *ctx, - struct mesa_glinterop_device_info *out); - -_X_HIDDEN int -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, - struct mesa_glinterop_flush_out *out); - #ifdef __cplusplus } #endif diff --git a/src/glx/dri3_glx.c b/src/glx/dri3_glx.c index 1ad25aa5c9c..348d518e1f7 100644 --- a/src/glx/dri3_glx.c +++ b/src/glx/dri3_glx.c @@ -655,9 +655,6 @@ static const struct glx_context_vtable dri3_context_vtable = { .unbind = dri3_unbind_context, .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_flush_objects = dri3_interop_flush_objects }; /** dri3_bind_extensions diff --git a/src/glx/dri3_priv.h b/src/glx/dri3_priv.h index ee1c199e429..69828879b1b 100644 --- a/src/glx/dri3_priv.h +++ b/src/glx/dri3_priv.h @@ -111,17 +111,3 @@ dri3_query_renderer_integer(struct glx_screen *base, int attribute, _X_HIDDEN int dri3_query_renderer_string(struct glx_screen *base, int attribute, const char **value); - -_X_HIDDEN int -dri3_interop_query_device_info(struct glx_context *ctx, - struct mesa_glinterop_device_info *out); - -_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, - struct mesa_glinterop_flush_out *out); diff --git a/src/glx/dri_common_interop.c b/src/glx/dri_common_interop.c deleted file mode 100644 index 68803577828..00000000000 --- a/src/glx/dri_common_interop.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright © 2013 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE)) - -#include "glxclient.h" -#include "glx_error.h" -#include "mesa_interface.h" -#include "dri2_priv.h" -#include "dri_util.h" -#if defined(HAVE_DRI3) -#include "dri3_priv.h" -#endif -#include "GL/mesa_glinterop.h" - -_X_HIDDEN int -dri2_interop_query_device_info(struct glx_context *ctx, - struct mesa_glinterop_device_info *out) -{ - return dri_interop_query_device_info(ctx->driContext, out); -} - -_X_HIDDEN int -dri2_interop_export_object(struct glx_context *ctx, - struct mesa_glinterop_export_in *in, - struct mesa_glinterop_export_out *out) -{ - return dri_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, - struct mesa_glinterop_flush_out *out) -{ - return dri_interop_flush_objects(ctx->driContext, count, objects, out); -} - -#if defined(HAVE_DRI3) - -_X_HIDDEN int -dri3_interop_query_device_info(struct glx_context *ctx, - struct mesa_glinterop_device_info *out) -{ - return dri_interop_query_device_info(ctx->driContext, out); -} - -_X_HIDDEN int -dri3_interop_export_object(struct glx_context *ctx, - struct mesa_glinterop_export_in *in, - struct mesa_glinterop_export_out *out) -{ - return dri_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, - struct mesa_glinterop_flush_out *out) -{ - return dri_interop_flush_objects(ctx->driContext, count, objects, out); -} - -#endif /* HAVE_DRI3 */ -#endif /* defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) */ diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h index f1d7e344e35..3e1d7f2e036 100644 --- a/src/glx/glxclient.h +++ b/src/glx/glxclient.h @@ -235,14 +235,6 @@ struct glx_context_vtable { void (*unbind)(struct glx_context *context); void (*wait_gl)(struct glx_context *ctx); void (*wait_x)(struct glx_context *ctx); - int (*interop_query_device_info)(struct glx_context *ctx, - struct mesa_glinterop_device_info *out); - 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, - struct mesa_glinterop_flush_out *out); }; /** diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index 89ab875aad0..f6f7adb626e 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -32,6 +32,7 @@ #include #include #include "GL/mesa_glinterop.h" +#include "dri_util.h" #if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE)) @@ -2415,7 +2416,7 @@ MesaGLInteropGLXQueryDeviceInfo(Display *dpy, GLXContext context, return MESA_GLINTEROP_INVALID_CONTEXT; } - ret = gc->vtable->interop_query_device_info(gc, out); + ret = dri_interop_query_device_info(gc->driContext, out); __glXUnlock(); return ret; } @@ -2435,7 +2436,7 @@ MesaGLInteropGLXExportObject(Display *dpy, GLXContext context, return MESA_GLINTEROP_INVALID_CONTEXT; } - ret = gc->vtable->interop_export_object(gc, in, out); + ret = dri_interop_export_object(gc->driContext, in, out); __glXUnlock(); return ret; } @@ -2456,7 +2457,7 @@ MesaGLInteropGLXFlushObjects(Display *dpy, GLXContext context, return MESA_GLINTEROP_INVALID_CONTEXT; } - ret = gc->vtable->interop_flush_objects(gc, count, resources, out); + ret = dri_interop_flush_objects(gc->driContext, count, resources, out); __glXUnlock(); return ret; } diff --git a/src/glx/meson.build b/src/glx/meson.build index d2ccabac289..13cacf48dde 100644 --- a/src/glx/meson.build +++ b/src/glx/meson.build @@ -16,7 +16,6 @@ files_libglx = files( 'dri_common.c', 'dri_common.h', 'dri_common_query_renderer.c', - 'dri_common_interop.c', 'drisw_glx.c', 'drisw_priv.h', 'eval.c',