diff options
author | Marek Olšák <marek.olsak@amd.com> | 2016-02-29 23:19:18 +0100 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2016-04-20 12:18:47 +0200 |
commit | 5e9ed261ed8ec211ba9bf5aa58d50078304583ff (patch) | |
tree | 4ea222a91f69b948cdc20b843ed77a4610be3dea /include | |
parent | 6eeb729490a7880f8dc17de855d205a7cce5f28c (diff) | |
download | external_mesa3d-5e9ed261ed8ec211ba9bf5aa58d50078304583ff.zip external_mesa3d-5e9ed261ed8ec211ba9bf5aa58d50078304583ff.tar.gz external_mesa3d-5e9ed261ed8ec211ba9bf5aa58d50078304583ff.tar.bz2 |
dri_interface: add interface for GL interop with other APIs (v2)
v2: - use const
Diffstat (limited to 'include')
-rw-r--r-- | include/GL/internal/dri_interface.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 2b49a29..84731a0 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -79,6 +79,7 @@ typedef struct __DRIdri2LoaderExtensionRec __DRIdri2LoaderExtension; typedef struct __DRI2flushExtensionRec __DRI2flushExtension; typedef struct __DRI2throttleExtensionRec __DRI2throttleExtension; typedef struct __DRI2fenceExtensionRec __DRI2fenceExtension; +typedef struct __DRI2interopExtensionRec __DRI2interopExtension; typedef struct __DRIimageLoaderExtensionRec __DRIimageLoaderExtension; @@ -392,6 +393,31 @@ struct __DRI2fenceExtensionRec { }; +/** + * Extension for API interop. + * See GL/mesa_glinterop.h. + */ + +#define __DRI2_INTEROP "DRI2_Interop" +#define __DRI2_INTEROP_VERSION 1 + +typedef struct _mesa_glinterop_device_info mesa_glinterop_device_info; +typedef struct _mesa_glinterop_export_in mesa_glinterop_export_in; +typedef struct _mesa_glinterop_export_out mesa_glinterop_export_out; + +struct __DRI2interopExtensionRec { + __DRIextension base; + + /** Same as MesaGLInterop*QueryDeviceInfo. */ + int (*query_device_info)(__DRIcontext *ctx, + mesa_glinterop_device_info *out); + + /** Same as MesaGLInterop*ExportObject. */ + int (*export_object)(__DRIcontext *ctx, + const mesa_glinterop_export_in *in, + mesa_glinterop_export_out *out); +}; + /*@}*/ /** |