mapi: add EXT_external_objects and EXT_external_objects_fd
[mesa.git] / src / mesa / main / externalobjects.h
1 /*
2 * Mesa 3-D graphics library
3 *
4 * Copyright (C) 2017 Red Hat.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 *
24 * Authors: Dave Airlie <airlied@gmail.com>
25 * Andres Rodriguez <andresx7@gmail.com>
26 */
27
28 /**
29 * \file externalobjects.h
30 *
31 * Declarations of functions related to the API interop extensions.
32 */
33
34 #ifndef EXTERNALOBJECTS_H
35 #define EXTERNALOBJECTS_H
36
37 #include "glheader.h"
38
39 extern void GLAPIENTRY
40 _mesa_DeleteMemoryObjectsEXT(GLsizei n, const GLuint *memoryObjects);
41
42 extern GLboolean GLAPIENTRY
43 _mesa_IsMemoryObjectEXT(GLuint memoryObject);
44
45 extern void GLAPIENTRY
46 _mesa_CreateMemoryObjectsEXT(GLsizei n, GLuint *memoryObjects);
47
48 extern void GLAPIENTRY
49 _mesa_MemoryObjectParameterivEXT(GLuint memoryObject,
50 GLenum pname,
51 const GLint *params);
52
53 extern void GLAPIENTRY
54 _mesa_GetMemoryObjectParameterivEXT(GLuint memoryObject,
55 GLenum pname,
56 GLint *params);
57
58 extern void GLAPIENTRY
59 _mesa_TexStorageMem2DEXT(GLenum target,
60 GLsizei levels,
61 GLenum internalFormat,
62 GLsizei width,
63 GLsizei height,
64 GLuint memory,
65 GLuint64 offset);
66
67 extern void GLAPIENTRY
68 _mesa_TexStorageMem2DMultisampleEXT(GLenum target,
69 GLsizei samples,
70 GLenum internalFormat,
71 GLsizei width,
72 GLsizei height,
73 GLboolean fixedSampleLocations,
74 GLuint memory,
75 GLuint64 offset);
76
77 extern void GLAPIENTRY
78 _mesa_TexStorageMem3DEXT(GLenum target,
79 GLsizei levels,
80 GLenum internalFormat,
81 GLsizei width,
82 GLsizei height,
83 GLsizei depth,
84 GLuint memory,
85 GLuint64 offset);
86
87 extern void GLAPIENTRY
88 _mesa_TexStorageMem3DMultisampleEXT(GLenum target,
89 GLsizei samples,
90 GLenum internalFormat,
91 GLsizei width,
92 GLsizei height,
93 GLsizei depth,
94 GLboolean fixedSampleLocations,
95 GLuint memory,
96 GLuint64 offset);
97
98 extern void GLAPIENTRY
99 _mesa_TextureStorageMem2DEXT(GLuint texture,
100 GLsizei levels,
101 GLenum internalFormat,
102 GLsizei width,
103 GLsizei height,
104 GLuint memory,
105 GLuint64 offset);
106
107 extern void GLAPIENTRY
108 _mesa_TextureStorageMem2DMultisampleEXT(GLuint texture,
109 GLsizei samples,
110 GLenum internalFormat,
111 GLsizei width,
112 GLsizei height,
113 GLboolean fixedSampleLocations,
114 GLuint memory,
115 GLuint64 offset);
116
117 extern void GLAPIENTRY
118 _mesa_TextureStorageMem3DEXT(GLuint texture,
119 GLsizei levels,
120 GLenum internalFormat,
121 GLsizei width,
122 GLsizei height,
123 GLsizei depth,
124 GLuint memory,
125 GLuint64 offset);
126
127 extern void GLAPIENTRY
128 _mesa_TextureStorageMem3DMultisampleEXT(GLuint texture,
129 GLsizei samples,
130 GLenum internalFormat,
131 GLsizei width,
132 GLsizei height,
133 GLsizei depth,
134 GLboolean fixedSampleLocations,
135 GLuint memory,
136 GLuint64 offset);
137
138 extern void GLAPIENTRY
139 _mesa_TexStorageMem1DEXT(GLenum target,
140 GLsizei levels,
141 GLenum internalFormat,
142 GLsizei width,
143 GLuint memory,
144 GLuint64 offset);
145
146 extern void GLAPIENTRY
147 _mesa_TextureStorageMem1DEXT(GLuint texture,
148 GLsizei levels,
149 GLenum internalFormat,
150 GLsizei width,
151 GLuint memory,
152 GLuint64 offset);
153
154 extern void GLAPIENTRY
155 _mesa_GenSemaphoresEXT(GLsizei n, GLuint *semaphores);
156
157 extern void GLAPIENTRY
158 _mesa_DeleteSemaphoresEXT(GLsizei n, const GLuint *semaphores);
159
160 extern GLboolean GLAPIENTRY
161 _mesa_IsSemaphoreEXT(GLuint semaphore);
162
163 extern void GLAPIENTRY
164 _mesa_SemaphoreParameterui64vEXT(GLuint semaphore,
165 GLenum pname,
166 const GLuint64 *params);
167
168 extern void GLAPIENTRY
169 _mesa_GetSemaphoreParameterui64vEXT(GLuint semaphore,
170 GLenum pname,
171 GLuint64 *params);
172
173 extern void GLAPIENTRY
174 _mesa_WaitSemaphoreEXT(GLuint semaphore,
175 GLuint numBufferBarriers,
176 const GLuint *buffers,
177 GLuint numTextureBarriers,
178 const GLuint *textures,
179 const GLenum *srcLayouts);
180
181 extern void GLAPIENTRY
182 _mesa_SignalSemaphoreEXT(GLuint semaphore,
183 GLuint numBufferBarriers,
184 const GLuint *buffers,
185 GLuint numTextureBarriers,
186 const GLuint *textures,
187 const GLenum *dstLayouts);
188
189 extern void GLAPIENTRY
190 _mesa_ImportMemoryFdEXT(GLuint memory,
191 GLuint64 size,
192 GLenum handleType,
193 GLint fd);
194
195 extern void GLAPIENTRY
196 _mesa_ImportSemaphoreFdEXT(GLuint semaphore,
197 GLenum handleType,
198 GLint fd);
199
200 #endif