Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into pipe-video
[mesa.git] / src / glx / apple / glx_empty.c
1 #include "glxclient.h"
2 #include "glxextensions.h"
3 #include "glcontextmodes.h"
4
5 /*
6 ** GLX_SGI_swap_control
7 */
8 int
9 glXSwapIntervalSGI(int interval)
10 {
11 (void) interval;
12 return 0;
13 }
14
15
16 /*
17 ** GLX_MESA_swap_control
18 */
19 int
20 glXSwapIntervalMESA(unsigned int interval)
21 {
22 (void) interval;
23 return GLX_BAD_CONTEXT;
24 }
25
26
27 int
28 glXGetSwapIntervalMESA(void)
29 {
30 return 0;
31 }
32
33
34 /*
35 ** GLX_MESA_swap_frame_usage
36 */
37
38 int
39 glXBeginFrameTrackingMESA(Display * dpy, GLXDrawable drawable)
40 {
41 int status = GLX_BAD_CONTEXT;
42 (void) dpy;
43 (void) drawable;
44 return status;
45 }
46
47
48 int
49 glXEndFrameTrackingMESA(Display * dpy, GLXDrawable drawable)
50 {
51 int status = GLX_BAD_CONTEXT;
52 (void) dpy;
53 (void) drawable;
54 return status;
55 }
56
57
58 int
59 glXGetFrameUsageMESA(Display * dpy, GLXDrawable drawable, GLfloat * usage)
60 {
61 int status = GLX_BAD_CONTEXT;
62 (void) dpy;
63 (void) drawable;
64 (void) usage;
65 return status;
66 }
67
68 int
69 glXQueryFrameTrackingMESA(Display * dpy, GLXDrawable drawable,
70 int64_t * sbc, int64_t * missedFrames,
71 GLfloat * lastMissedUsage)
72 {
73 int status = GLX_BAD_CONTEXT;
74 (void) dpy;
75 (void) drawable;
76 (void) sbc;
77 (void) missedFrames;
78 (void) lastMissedUsage;
79 return status;
80 }
81
82 /*
83 ** GLX_SGI_video_sync
84 */
85 int
86 glXGetVideoSyncSGI(unsigned int *count)
87 {
88 (void) count;
89 return GLX_BAD_CONTEXT;
90 }
91
92 int
93 glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
94 {
95 (void) count;
96 return GLX_BAD_CONTEXT;
97 }
98
99
100 /*
101 ** GLX_SGIX_swap_group
102 */
103 void
104 glXJoinSwapGroupSGIX(Display * dpy, GLXDrawable drawable, GLXDrawable member)
105 {
106 (void) dpy;
107 (void) drawable;
108 (void) member;
109 }
110
111
112 /*
113 ** GLX_SGIX_swap_barrier
114 */
115 void
116 glXBindSwapBarrierSGIX(Display * dpy, GLXDrawable drawable, int barrier)
117 {
118 (void) dpy;
119 (void) drawable;
120 (void) barrier;
121 }
122
123 Bool
124 glXQueryMaxSwapBarriersSGIX(Display * dpy, int screen, int *max)
125 {
126 (void) dpy;
127 (void) screen;
128 (void) max;
129 return False;
130 }
131
132
133 /*
134 ** GLX_OML_sync_control
135 */
136 Bool
137 glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable,
138 int64_t * ust, int64_t * msc, int64_t * sbc)
139 {
140 (void) dpy;
141 (void) drawable;
142 (void) ust;
143 (void) msc;
144 (void) sbc;
145 return False;
146 }
147
148 int64_t
149 glXSwapBuffersMscOML(Display * dpy, GLXDrawable drawable,
150 int64_t target_msc, int64_t divisor, int64_t remainder)
151 {
152 (void) dpy;
153 (void) drawable;
154 (void) target_msc;
155 (void) divisor;
156 (void) remainder;
157 return 0;
158 }
159
160
161 Bool
162 glXWaitForMscOML(Display * dpy, GLXDrawable drawable,
163 int64_t target_msc, int64_t divisor,
164 int64_t remainder, int64_t * ust,
165 int64_t * msc, int64_t * sbc)
166 {
167 (void) dpy;
168 (void) drawable;
169 (void) target_msc;
170 (void) divisor;
171 (void) remainder;
172 (void) ust;
173 (void) msc;
174 (void) sbc;
175 return False;
176 }
177
178
179 Bool
180 glXWaitForSbcOML(Display * dpy, GLXDrawable drawable,
181 int64_t target_sbc, int64_t * ust,
182 int64_t * msc, int64_t * sbc)
183 {
184 (void) dpy;
185 (void) drawable;
186 (void) target_sbc;
187 (void) ust;
188 (void) msc;
189 (void) sbc;
190 return False;
191 }
192
193
194 /**
195 * GLX_MESA_allocate_memory
196 */
197 /*@{*/
198
199 PUBLIC void *
200 glXAllocateMemoryMESA(Display * dpy, int scrn,
201 size_t size, float readFreq,
202 float writeFreq, float priority)
203 {
204 (void) dpy;
205 (void) scrn;
206 (void) size;
207 (void) readFreq;
208 (void) writeFreq;
209 (void) priority;
210 return NULL;
211 }
212
213
214 PUBLIC void
215 glXFreeMemoryMESA(Display * dpy, int scrn, void *pointer)
216 {
217 #ifdef __DRI_ALLOCATE
218 __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, scrn);
219
220 if (psc && psc->allocate)
221 (*psc->allocate->freeMemory) (psc->__driScreen, pointer);
222
223 #else
224 (void) dpy;
225 (void) scrn;
226 (void) pointer;
227 #endif /* __DRI_ALLOCATE */
228 }
229
230
231 PUBLIC GLuint
232 glXGetMemoryOffsetMESA(Display * dpy, int scrn, const void *pointer)
233 {
234 (void) dpy;
235 (void) scrn;
236 (void) pointer;
237 return ~0L;
238 }
239
240 Bool
241 glXReleaseBuffersMESA(Display * dpy, GLXDrawable d)
242 {
243 (void) dpy;
244 (void) d;
245 return False;
246 }
247
248
249 PUBLIC GLXPixmap
250 glXCreateGLXPixmapMESA(Display * dpy, XVisualInfo * visual,
251 Pixmap pixmap, Colormap cmap)
252 {
253 (void) dpy;
254 (void) visual;
255 (void) pixmap;
256 (void) cmap;
257 return 0;
258 }
259
260
261 /**
262 * GLX_MESA_copy_sub_buffer
263 */
264 void
265 glXCopySubBufferMESA(Display * dpy, GLXDrawable drawable,
266 int x, int y, int width, int height)
267 {
268 (void) dpy;
269 (void) drawable;
270 (void) x;
271 (void) y;
272 (void) width;
273 (void) height;
274 }
275
276
277 PUBLIC int
278 glXQueryGLXPbufferSGIX(Display * dpy, GLXDrawable drawable,
279 int attribute, unsigned int *value)
280 {
281 (void) dpy;
282 (void) drawable;
283 (void) attribute;
284 (void) value;
285 return 0;
286 }
287
288 PUBLIC GLXDrawable
289 glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfig config,
290 unsigned int width, unsigned int height,
291 int *attrib_list)
292 {
293 (void) dpy;
294 (void) config;
295 (void) width;
296 (void) height;
297 (void) attrib_list;
298 return None;
299 }
300
301 #if 0
302 /* GLX_SGIX_fbconfig */
303 PUBLIC int
304 glXGetFBConfigAttribSGIX(Display * dpy, void *config, int a, int *b)
305 {
306 (void) dpy;
307 (void) config;
308 (void) a;
309 (void) b;
310 return 0;
311 }
312
313 PUBLIC void *
314 glXChooseFBConfigSGIX(Display * dpy, int a, int *b, int *c)
315 {
316 (void) dpy;
317 (void) a;
318 (void) b;
319 (void) c;
320 return NULL;
321 }
322
323 PUBLIC GLXPixmap
324 glXCreateGLXPixmapWithConfigSGIX(Display * dpy, void *config, Pixmap p)
325 {
326 (void) dpy;
327 (void) config;
328 (void) p;
329 return None;
330 }
331
332 PUBLIC GLXContext
333 glXCreateContextWithConfigSGIX(Display * dpy, void *config, int a,
334 GLXContext b, Bool c)
335 {
336 (void) dpy;
337 (void) config;
338 (void) a;
339 (void) b;
340 (void) c;
341 return NULL;
342 }
343
344 PUBLIC XVisualInfo *
345 glXGetVisualFromFBConfigSGIX(Display * dpy, void *config)
346 {
347 (void) dpy;
348 (void) config;
349 return NULL;
350 }
351
352 PUBLIC void *
353 glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * visinfo)
354 {
355 (void) dpy;
356 (void) visinfo;
357 return NULL;
358 }
359 #endif
360
361
362 PUBLIC
363 GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX,
364 (Display * dpy, GLXDrawable pbuf),
365 (dpy, pbuf), glXDestroyPbuffer)
366
367 PUBLIC GLX_ALIAS_VOID(glXSelectEventSGIX,
368 (Display * dpy, GLXDrawable drawable,
369 unsigned long mask), (dpy, drawable, mask),
370 glXSelectEvent)
371
372 PUBLIC GLX_ALIAS_VOID(glXGetSelectedEventSGIX,
373 (Display * dpy, GLXDrawable drawable,
374 unsigned long *mask), (dpy, drawable, mask),
375 glXGetSelectedEvent)