2 * Copyright © 2013 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
24 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
26 #include "glxclient.h"
27 #include "glx_error.h"
28 #include "dri_interface.h"
29 #include "dri2_priv.h"
30 #if defined(HAVE_DRI3)
31 #include "dri3_priv.h"
33 #include "GL/mesa_glinterop.h"
36 dri2_interop_query_device_info(struct glx_context
*ctx
,
37 mesa_glinterop_device_info
*out
)
39 struct dri2_screen
*psc
= (struct dri2_screen
*)ctx
->psc
;
40 struct dri2_context
*drictx
= (struct dri2_context
*)ctx
;
43 return MESA_GLINTEROP_UNSUPPORTED
;
45 return psc
->interop
->query_device_info(drictx
->driContext
, out
);
49 dri2_interop_export_object(struct glx_context
*ctx
,
50 const mesa_glinterop_export_in
*in
,
51 mesa_glinterop_export_out
*out
)
53 struct dri2_screen
*psc
= (struct dri2_screen
*)ctx
->psc
;
54 struct dri2_context
*drictx
= (struct dri2_context
*)ctx
;
57 return MESA_GLINTEROP_UNSUPPORTED
;
59 return psc
->interop
->export_object(drictx
->driContext
, in
, out
);
62 #if defined(HAVE_DRI3)
65 dri3_interop_query_device_info(struct glx_context
*ctx
,
66 mesa_glinterop_device_info
*out
)
68 struct dri3_screen
*psc
= (struct dri3_screen
*)ctx
->psc
;
69 struct dri3_context
*drictx
= (struct dri3_context
*)ctx
;
72 return MESA_GLINTEROP_UNSUPPORTED
;
74 return psc
->interop
->query_device_info(drictx
->driContext
, out
);
78 dri3_interop_export_object(struct glx_context
*ctx
,
79 const mesa_glinterop_export_in
*in
,
80 mesa_glinterop_export_out
*out
)
82 struct dri3_screen
*psc
= (struct dri3_screen
*)ctx
->psc
;
83 struct dri3_context
*drictx
= (struct dri3_context
*)ctx
;
86 return MESA_GLINTEROP_UNSUPPORTED
;
88 return psc
->interop
->export_object(drictx
->driContext
, in
, out
);
91 #endif /* HAVE_DRI3 */
92 #endif /* defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) */