glx_empty.c revision ad503c41557606d15b0420c824369456f6d20a8f
1#include "glxclient.h"
2#include "glxextensions.h"
3#include "glcontextmodes.h"
4
5/*
6** GLX_SGI_swap_control
7*/
8int
9glXSwapIntervalSGI(int interval)
10{
11   (void) interval;
12   return 0;
13}
14
15
16/*
17** GLX_MESA_swap_control
18*/
19int
20glXSwapIntervalMESA(unsigned int interval)
21{
22   (void) interval;
23   return GLX_BAD_CONTEXT;
24}
25
26
27int
28glXGetSwapIntervalMESA(void)
29{
30   return 0;
31}
32
33
34/*
35** GLX_MESA_swap_frame_usage
36*/
37
38int
39glXBeginFrameTrackingMESA(Display * dpy, GLXDrawable drawable)
40{
41   int status = GLX_BAD_CONTEXT;
42   (void) dpy;
43   (void) drawable;
44   return status;
45}
46
47
48int
49glXEndFrameTrackingMESA(Display * dpy, GLXDrawable drawable)
50{
51   int status = GLX_BAD_CONTEXT;
52   (void) dpy;
53   (void) drawable;
54   return status;
55}
56
57
58int
59glXGetFrameUsageMESA(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
68int
69glXQueryFrameTrackingMESA(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*/
85int
86glXGetVideoSyncSGI(unsigned int *count)
87{
88   (void) count;
89   return GLX_BAD_CONTEXT;
90}
91
92int
93glXWaitVideoSyncSGI(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*/
103void
104glXJoinSwapGroupSGIX(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*/
115void
116glXBindSwapBarrierSGIX(Display * dpy, GLXDrawable drawable, int barrier)
117{
118   (void) dpy;
119   (void) drawable;
120   (void) barrier;
121}
122
123Bool
124glXQueryMaxSwapBarriersSGIX(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*/
136Bool
137glXGetSyncValuesOML(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
148int64_t
149glXSwapBuffersMscOML(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
161Bool
162glXWaitForMscOML(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
179Bool
180glXWaitForSbcOML(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
199PUBLIC void *
200glXAllocateMemoryMESA(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
214PUBLIC void
215glXFreeMemoryMESA(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
231PUBLIC GLuint
232glXGetMemoryOffsetMESA(Display * dpy, int scrn, const void *pointer)
233{
234   (void) dpy;
235   (void) scrn;
236   (void) pointer;
237   return ~0L;
238}
239
240Bool
241glXReleaseBuffersMESA(Display * dpy, GLXDrawable d)
242{
243   (void) dpy;
244   (void) d;
245   return False;
246}
247
248
249PUBLIC GLXPixmap
250glXCreateGLXPixmapMESA(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 */
264void
265glXCopySubBufferMESA(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
277PUBLIC int
278glXQueryGLXPbufferSGIX(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
288PUBLIC GLXDrawable
289glXCreateGLXPbufferSGIX(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 */
303PUBLIC int
304glXGetFBConfigAttribSGIX(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
313PUBLIC void *
314glXChooseFBConfigSGIX(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
323PUBLIC GLXPixmap
324glXCreateGLXPixmapWithConfigSGIX(Display * dpy, void *config, Pixmap p)
325{
326   (void) dpy;
327   (void) config;
328   (void) p;
329   return None;
330}
331
332PUBLIC GLXContext
333glXCreateContextWithConfigSGIX(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
344PUBLIC XVisualInfo *
345glXGetVisualFromFBConfigSGIX(Display * dpy, void *config)
346{
347   (void) dpy;
348   (void) config;
349   return NULL;
350}
351
352PUBLIC void *
353glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * visinfo)
354{
355   (void) dpy;
356   (void) visinfo;
357   return NULL;
358}
359#endif
360
361
362PUBLIC
363GLX_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)
376