1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file is auto-generated from
6 // ui/gl/generate_bindings.py
7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename
13 #include "base/trace_event/trace_event.h"
14 #include "ui/gl/gl_bindings.h"
15 #include "ui/gl/gl_context.h"
16 #include "ui/gl/gl_enums.h"
17 #include "ui/gl/gl_glx_api_implementation.h"
18 #include "ui/gl/gl_implementation.h"
19 #include "ui/gl/gl_version_info.h"
23 static bool g_debugBindingsInitialized
;
24 DriverGLX g_driver_glx
;
26 void DriverGLX::InitializeStaticBindings() {
27 fn
.glXBindTexImageEXTFn
= 0;
28 fn
.glXChooseFBConfigFn
= reinterpret_cast<glXChooseFBConfigProc
>(
29 GetGLProcAddress("glXChooseFBConfig"));
30 fn
.glXChooseVisualFn
= reinterpret_cast<glXChooseVisualProc
>(
31 GetGLProcAddress("glXChooseVisual"));
33 reinterpret_cast<glXCopyContextProc
>(GetGLProcAddress("glXCopyContext"));
34 fn
.glXCopySubBufferMESAFn
= 0;
35 fn
.glXCreateContextFn
= reinterpret_cast<glXCreateContextProc
>(
36 GetGLProcAddress("glXCreateContext"));
37 fn
.glXCreateContextAttribsARBFn
= 0;
38 fn
.glXCreateGLXPixmapFn
= reinterpret_cast<glXCreateGLXPixmapProc
>(
39 GetGLProcAddress("glXCreateGLXPixmap"));
40 fn
.glXCreateNewContextFn
= reinterpret_cast<glXCreateNewContextProc
>(
41 GetGLProcAddress("glXCreateNewContext"));
42 fn
.glXCreatePbufferFn
= reinterpret_cast<glXCreatePbufferProc
>(
43 GetGLProcAddress("glXCreatePbuffer"));
44 fn
.glXCreatePixmapFn
= reinterpret_cast<glXCreatePixmapProc
>(
45 GetGLProcAddress("glXCreatePixmap"));
46 fn
.glXCreateWindowFn
= reinterpret_cast<glXCreateWindowProc
>(
47 GetGLProcAddress("glXCreateWindow"));
48 fn
.glXDestroyContextFn
= reinterpret_cast<glXDestroyContextProc
>(
49 GetGLProcAddress("glXDestroyContext"));
50 fn
.glXDestroyGLXPixmapFn
= reinterpret_cast<glXDestroyGLXPixmapProc
>(
51 GetGLProcAddress("glXDestroyGLXPixmap"));
52 fn
.glXDestroyPbufferFn
= reinterpret_cast<glXDestroyPbufferProc
>(
53 GetGLProcAddress("glXDestroyPbuffer"));
54 fn
.glXDestroyPixmapFn
= reinterpret_cast<glXDestroyPixmapProc
>(
55 GetGLProcAddress("glXDestroyPixmap"));
56 fn
.glXDestroyWindowFn
= reinterpret_cast<glXDestroyWindowProc
>(
57 GetGLProcAddress("glXDestroyWindow"));
58 fn
.glXGetClientStringFn
= reinterpret_cast<glXGetClientStringProc
>(
59 GetGLProcAddress("glXGetClientString"));
61 reinterpret_cast<glXGetConfigProc
>(GetGLProcAddress("glXGetConfig"));
62 fn
.glXGetCurrentContextFn
= reinterpret_cast<glXGetCurrentContextProc
>(
63 GetGLProcAddress("glXGetCurrentContext"));
64 fn
.glXGetCurrentDisplayFn
= reinterpret_cast<glXGetCurrentDisplayProc
>(
65 GetGLProcAddress("glXGetCurrentDisplay"));
66 fn
.glXGetCurrentDrawableFn
= reinterpret_cast<glXGetCurrentDrawableProc
>(
67 GetGLProcAddress("glXGetCurrentDrawable"));
68 fn
.glXGetCurrentReadDrawableFn
=
69 reinterpret_cast<glXGetCurrentReadDrawableProc
>(
70 GetGLProcAddress("glXGetCurrentReadDrawable"));
71 fn
.glXGetFBConfigAttribFn
= reinterpret_cast<glXGetFBConfigAttribProc
>(
72 GetGLProcAddress("glXGetFBConfigAttrib"));
73 fn
.glXGetFBConfigFromVisualSGIXFn
= 0;
74 fn
.glXGetFBConfigsFn
= reinterpret_cast<glXGetFBConfigsProc
>(
75 GetGLProcAddress("glXGetFBConfigs"));
76 fn
.glXGetMscRateOMLFn
= 0;
77 fn
.glXGetSelectedEventFn
= reinterpret_cast<glXGetSelectedEventProc
>(
78 GetGLProcAddress("glXGetSelectedEvent"));
79 fn
.glXGetSyncValuesOMLFn
= 0;
80 fn
.glXGetVisualFromFBConfigFn
=
81 reinterpret_cast<glXGetVisualFromFBConfigProc
>(
82 GetGLProcAddress("glXGetVisualFromFBConfig"));
84 reinterpret_cast<glXIsDirectProc
>(GetGLProcAddress("glXIsDirect"));
85 fn
.glXMakeContextCurrentFn
= reinterpret_cast<glXMakeContextCurrentProc
>(
86 GetGLProcAddress("glXMakeContextCurrent"));
88 reinterpret_cast<glXMakeCurrentProc
>(GetGLProcAddress("glXMakeCurrent"));
89 fn
.glXQueryContextFn
= reinterpret_cast<glXQueryContextProc
>(
90 GetGLProcAddress("glXQueryContext"));
91 fn
.glXQueryDrawableFn
= reinterpret_cast<glXQueryDrawableProc
>(
92 GetGLProcAddress("glXQueryDrawable"));
93 fn
.glXQueryExtensionFn
= reinterpret_cast<glXQueryExtensionProc
>(
94 GetGLProcAddress("glXQueryExtension"));
95 fn
.glXQueryExtensionsStringFn
=
96 reinterpret_cast<glXQueryExtensionsStringProc
>(
97 GetGLProcAddress("glXQueryExtensionsString"));
98 fn
.glXQueryServerStringFn
= reinterpret_cast<glXQueryServerStringProc
>(
99 GetGLProcAddress("glXQueryServerString"));
100 fn
.glXQueryVersionFn
= reinterpret_cast<glXQueryVersionProc
>(
101 GetGLProcAddress("glXQueryVersion"));
102 fn
.glXReleaseTexImageEXTFn
= 0;
103 fn
.glXSelectEventFn
=
104 reinterpret_cast<glXSelectEventProc
>(GetGLProcAddress("glXSelectEvent"));
105 fn
.glXSwapBuffersFn
=
106 reinterpret_cast<glXSwapBuffersProc
>(GetGLProcAddress("glXSwapBuffers"));
107 fn
.glXSwapIntervalEXTFn
= 0;
108 fn
.glXSwapIntervalMESAFn
= 0;
110 reinterpret_cast<glXUseXFontProc
>(GetGLProcAddress("glXUseXFont"));
112 reinterpret_cast<glXWaitGLProc
>(GetGLProcAddress("glXWaitGL"));
113 fn
.glXWaitVideoSyncSGIFn
= 0;
114 fn
.glXWaitXFn
= reinterpret_cast<glXWaitXProc
>(GetGLProcAddress("glXWaitX"));
117 void DriverGLX::InitializeExtensionBindings() {
118 std::string
extensions(GetPlatformExtensions());
120 ALLOW_UNUSED_LOCAL(extensions
);
122 ext
.b_GLX_ARB_create_context
=
123 extensions
.find("GLX_ARB_create_context ") != std::string::npos
;
124 ext
.b_GLX_EXT_swap_control
=
125 extensions
.find("GLX_EXT_swap_control ") != std::string::npos
;
126 ext
.b_GLX_EXT_texture_from_pixmap
=
127 extensions
.find("GLX_EXT_texture_from_pixmap ") != std::string::npos
;
128 ext
.b_GLX_MESA_copy_sub_buffer
=
129 extensions
.find("GLX_MESA_copy_sub_buffer ") != std::string::npos
;
130 ext
.b_GLX_MESA_swap_control
=
131 extensions
.find("GLX_MESA_swap_control ") != std::string::npos
;
132 ext
.b_GLX_OML_sync_control
=
133 extensions
.find("GLX_OML_sync_control ") != std::string::npos
;
134 ext
.b_GLX_SGIX_fbconfig
=
135 extensions
.find("GLX_SGIX_fbconfig ") != std::string::npos
;
136 ext
.b_GLX_SGI_video_sync
=
137 extensions
.find("GLX_SGI_video_sync ") != std::string::npos
;
139 debug_fn
.glXBindTexImageEXTFn
= 0;
140 if (ext
.b_GLX_EXT_texture_from_pixmap
) {
141 fn
.glXBindTexImageEXTFn
= reinterpret_cast<glXBindTexImageEXTProc
>(
142 GetGLProcAddress("glXBindTexImageEXT"));
143 DCHECK(fn
.glXBindTexImageEXTFn
);
146 debug_fn
.glXCopySubBufferMESAFn
= 0;
147 if (ext
.b_GLX_MESA_copy_sub_buffer
) {
148 fn
.glXCopySubBufferMESAFn
= reinterpret_cast<glXCopySubBufferMESAProc
>(
149 GetGLProcAddress("glXCopySubBufferMESA"));
150 DCHECK(fn
.glXCopySubBufferMESAFn
);
153 debug_fn
.glXCreateContextAttribsARBFn
= 0;
154 if (ext
.b_GLX_ARB_create_context
) {
155 fn
.glXCreateContextAttribsARBFn
=
156 reinterpret_cast<glXCreateContextAttribsARBProc
>(
157 GetGLProcAddress("glXCreateContextAttribsARB"));
158 DCHECK(fn
.glXCreateContextAttribsARBFn
);
161 debug_fn
.glXGetFBConfigFromVisualSGIXFn
= 0;
162 if (ext
.b_GLX_SGIX_fbconfig
) {
163 fn
.glXGetFBConfigFromVisualSGIXFn
=
164 reinterpret_cast<glXGetFBConfigFromVisualSGIXProc
>(
165 GetGLProcAddress("glXGetFBConfigFromVisualSGIX"));
166 DCHECK(fn
.glXGetFBConfigFromVisualSGIXFn
);
169 debug_fn
.glXGetMscRateOMLFn
= 0;
170 if (ext
.b_GLX_OML_sync_control
) {
171 fn
.glXGetMscRateOMLFn
= reinterpret_cast<glXGetMscRateOMLProc
>(
172 GetGLProcAddress("glXGetMscRateOML"));
173 DCHECK(fn
.glXGetMscRateOMLFn
);
176 debug_fn
.glXGetSyncValuesOMLFn
= 0;
177 if (ext
.b_GLX_OML_sync_control
) {
178 fn
.glXGetSyncValuesOMLFn
= reinterpret_cast<glXGetSyncValuesOMLProc
>(
179 GetGLProcAddress("glXGetSyncValuesOML"));
180 DCHECK(fn
.glXGetSyncValuesOMLFn
);
183 debug_fn
.glXReleaseTexImageEXTFn
= 0;
184 if (ext
.b_GLX_EXT_texture_from_pixmap
) {
185 fn
.glXReleaseTexImageEXTFn
= reinterpret_cast<glXReleaseTexImageEXTProc
>(
186 GetGLProcAddress("glXReleaseTexImageEXT"));
187 DCHECK(fn
.glXReleaseTexImageEXTFn
);
190 debug_fn
.glXSwapIntervalEXTFn
= 0;
191 if (ext
.b_GLX_EXT_swap_control
) {
192 fn
.glXSwapIntervalEXTFn
= reinterpret_cast<glXSwapIntervalEXTProc
>(
193 GetGLProcAddress("glXSwapIntervalEXT"));
194 DCHECK(fn
.glXSwapIntervalEXTFn
);
197 debug_fn
.glXSwapIntervalMESAFn
= 0;
198 if (ext
.b_GLX_MESA_swap_control
) {
199 fn
.glXSwapIntervalMESAFn
= reinterpret_cast<glXSwapIntervalMESAProc
>(
200 GetGLProcAddress("glXSwapIntervalMESA"));
201 DCHECK(fn
.glXSwapIntervalMESAFn
);
204 debug_fn
.glXWaitVideoSyncSGIFn
= 0;
205 if (ext
.b_GLX_SGI_video_sync
) {
206 fn
.glXWaitVideoSyncSGIFn
= reinterpret_cast<glXWaitVideoSyncSGIProc
>(
207 GetGLProcAddress("glXWaitVideoSyncSGI"));
208 DCHECK(fn
.glXWaitVideoSyncSGIFn
);
211 if (g_debugBindingsInitialized
)
212 InitializeDebugBindings();
217 static void GL_BINDING_CALL
Debug_glXBindTexImageEXT(Display
* dpy
,
218 GLXDrawable drawable
,
221 GL_SERVICE_LOG("glXBindTexImageEXT"
222 << "(" << static_cast<const void*>(dpy
) << ", " << drawable
223 << ", " << buffer
<< ", "
224 << static_cast<const void*>(attribList
) << ")");
225 g_driver_glx
.debug_fn
.glXBindTexImageEXTFn(dpy
, drawable
, buffer
, attribList
);
228 static GLXFBConfig
* GL_BINDING_CALL
229 Debug_glXChooseFBConfig(Display
* dpy
,
231 const int* attribList
,
233 GL_SERVICE_LOG("glXChooseFBConfig"
234 << "(" << static_cast<const void*>(dpy
) << ", " << screen
235 << ", " << static_cast<const void*>(attribList
) << ", "
236 << static_cast<const void*>(nitems
) << ")");
237 GLXFBConfig
* result
= g_driver_glx
.debug_fn
.glXChooseFBConfigFn(
238 dpy
, screen
, attribList
, nitems
);
239 GL_SERVICE_LOG("GL_RESULT: " << result
);
243 static XVisualInfo
* GL_BINDING_CALL
244 Debug_glXChooseVisual(Display
* dpy
, int screen
, int* attribList
) {
245 GL_SERVICE_LOG("glXChooseVisual"
246 << "(" << static_cast<const void*>(dpy
) << ", " << screen
247 << ", " << static_cast<const void*>(attribList
) << ")");
248 XVisualInfo
* result
=
249 g_driver_glx
.debug_fn
.glXChooseVisualFn(dpy
, screen
, attribList
);
250 GL_SERVICE_LOG("GL_RESULT: " << result
);
254 static void GL_BINDING_CALL
Debug_glXCopyContext(Display
* dpy
,
257 unsigned long mask
) {
258 GL_SERVICE_LOG("glXCopyContext"
259 << "(" << static_cast<const void*>(dpy
) << ", " << src
<< ", "
260 << dst
<< ", " << mask
<< ")");
261 g_driver_glx
.debug_fn
.glXCopyContextFn(dpy
, src
, dst
, mask
);
264 static void GL_BINDING_CALL
Debug_glXCopySubBufferMESA(Display
* dpy
,
265 GLXDrawable drawable
,
270 GL_SERVICE_LOG("glXCopySubBufferMESA"
271 << "(" << static_cast<const void*>(dpy
) << ", " << drawable
272 << ", " << x
<< ", " << y
<< ", " << width
<< ", " << height
274 g_driver_glx
.debug_fn
.glXCopySubBufferMESAFn(dpy
, drawable
, x
, y
, width
,
278 static GLXContext GL_BINDING_CALL
Debug_glXCreateContext(Display
* dpy
,
280 GLXContext shareList
,
282 GL_SERVICE_LOG("glXCreateContext"
283 << "(" << static_cast<const void*>(dpy
) << ", "
284 << static_cast<const void*>(vis
) << ", " << shareList
<< ", "
287 g_driver_glx
.debug_fn
.glXCreateContextFn(dpy
, vis
, shareList
, direct
);
288 GL_SERVICE_LOG("GL_RESULT: " << result
);
292 static GLXContext GL_BINDING_CALL
293 Debug_glXCreateContextAttribsARB(Display
* dpy
,
295 GLXContext share_context
,
297 const int* attrib_list
) {
298 GL_SERVICE_LOG("glXCreateContextAttribsARB"
299 << "(" << static_cast<const void*>(dpy
) << ", " << config
300 << ", " << share_context
<< ", " << direct
<< ", "
301 << static_cast<const void*>(attrib_list
) << ")");
302 GLXContext result
= g_driver_glx
.debug_fn
.glXCreateContextAttribsARBFn(
303 dpy
, config
, share_context
, direct
, attrib_list
);
304 GL_SERVICE_LOG("GL_RESULT: " << result
);
308 static GLXPixmap GL_BINDING_CALL
309 Debug_glXCreateGLXPixmap(Display
* dpy
, XVisualInfo
* visual
, Pixmap pixmap
) {
310 GL_SERVICE_LOG("glXCreateGLXPixmap"
311 << "(" << static_cast<const void*>(dpy
) << ", "
312 << static_cast<const void*>(visual
) << ", " << pixmap
<< ")");
314 g_driver_glx
.debug_fn
.glXCreateGLXPixmapFn(dpy
, visual
, pixmap
);
315 GL_SERVICE_LOG("GL_RESULT: " << result
);
319 static GLXContext GL_BINDING_CALL
320 Debug_glXCreateNewContext(Display
* dpy
,
323 GLXContext shareList
,
325 GL_SERVICE_LOG("glXCreateNewContext"
326 << "(" << static_cast<const void*>(dpy
) << ", " << config
327 << ", " << renderType
<< ", " << shareList
<< ", " << direct
329 GLXContext result
= g_driver_glx
.debug_fn
.glXCreateNewContextFn(
330 dpy
, config
, renderType
, shareList
, direct
);
331 GL_SERVICE_LOG("GL_RESULT: " << result
);
335 static GLXPbuffer GL_BINDING_CALL
336 Debug_glXCreatePbuffer(Display
* dpy
,
338 const int* attribList
) {
339 GL_SERVICE_LOG("glXCreatePbuffer"
340 << "(" << static_cast<const void*>(dpy
) << ", " << config
341 << ", " << static_cast<const void*>(attribList
) << ")");
343 g_driver_glx
.debug_fn
.glXCreatePbufferFn(dpy
, config
, attribList
);
344 GL_SERVICE_LOG("GL_RESULT: " << result
);
348 static GLXPixmap GL_BINDING_CALL
Debug_glXCreatePixmap(Display
* dpy
,
351 const int* attribList
) {
352 GL_SERVICE_LOG("glXCreatePixmap"
353 << "(" << static_cast<const void*>(dpy
) << ", " << config
354 << ", " << pixmap
<< ", "
355 << static_cast<const void*>(attribList
) << ")");
357 g_driver_glx
.debug_fn
.glXCreatePixmapFn(dpy
, config
, pixmap
, attribList
);
358 GL_SERVICE_LOG("GL_RESULT: " << result
);
362 static GLXWindow GL_BINDING_CALL
Debug_glXCreateWindow(Display
* dpy
,
365 const int* attribList
) {
366 GL_SERVICE_LOG("glXCreateWindow"
367 << "(" << static_cast<const void*>(dpy
) << ", " << config
368 << ", " << win
<< ", " << static_cast<const void*>(attribList
)
371 g_driver_glx
.debug_fn
.glXCreateWindowFn(dpy
, config
, win
, attribList
);
372 GL_SERVICE_LOG("GL_RESULT: " << result
);
376 static void GL_BINDING_CALL
377 Debug_glXDestroyContext(Display
* dpy
, GLXContext ctx
) {
378 GL_SERVICE_LOG("glXDestroyContext"
379 << "(" << static_cast<const void*>(dpy
) << ", " << ctx
<< ")");
380 g_driver_glx
.debug_fn
.glXDestroyContextFn(dpy
, ctx
);
383 static void GL_BINDING_CALL
384 Debug_glXDestroyGLXPixmap(Display
* dpy
, GLXPixmap pixmap
) {
385 GL_SERVICE_LOG("glXDestroyGLXPixmap"
386 << "(" << static_cast<const void*>(dpy
) << ", " << pixmap
388 g_driver_glx
.debug_fn
.glXDestroyGLXPixmapFn(dpy
, pixmap
);
391 static void GL_BINDING_CALL
392 Debug_glXDestroyPbuffer(Display
* dpy
, GLXPbuffer pbuf
) {
393 GL_SERVICE_LOG("glXDestroyPbuffer"
394 << "(" << static_cast<const void*>(dpy
) << ", " << pbuf
396 g_driver_glx
.debug_fn
.glXDestroyPbufferFn(dpy
, pbuf
);
399 static void GL_BINDING_CALL
400 Debug_glXDestroyPixmap(Display
* dpy
, GLXPixmap pixmap
) {
401 GL_SERVICE_LOG("glXDestroyPixmap"
402 << "(" << static_cast<const void*>(dpy
) << ", " << pixmap
404 g_driver_glx
.debug_fn
.glXDestroyPixmapFn(dpy
, pixmap
);
407 static void GL_BINDING_CALL
408 Debug_glXDestroyWindow(Display
* dpy
, GLXWindow window
) {
409 GL_SERVICE_LOG("glXDestroyWindow"
410 << "(" << static_cast<const void*>(dpy
) << ", " << window
412 g_driver_glx
.debug_fn
.glXDestroyWindowFn(dpy
, window
);
415 static const char* GL_BINDING_CALL
416 Debug_glXGetClientString(Display
* dpy
, int name
) {
417 GL_SERVICE_LOG("glXGetClientString"
418 << "(" << static_cast<const void*>(dpy
) << ", " << name
420 const char* result
= g_driver_glx
.debug_fn
.glXGetClientStringFn(dpy
, name
);
421 GL_SERVICE_LOG("GL_RESULT: " << result
);
425 static int GL_BINDING_CALL
426 Debug_glXGetConfig(Display
* dpy
, XVisualInfo
* visual
, int attrib
, int* value
) {
427 GL_SERVICE_LOG("glXGetConfig"
428 << "(" << static_cast<const void*>(dpy
) << ", "
429 << static_cast<const void*>(visual
) << ", " << attrib
<< ", "
430 << static_cast<const void*>(value
) << ")");
431 int result
= g_driver_glx
.debug_fn
.glXGetConfigFn(dpy
, visual
, attrib
, value
);
432 GL_SERVICE_LOG("GL_RESULT: " << result
);
436 static GLXContext GL_BINDING_CALL
Debug_glXGetCurrentContext(void) {
437 GL_SERVICE_LOG("glXGetCurrentContext"
440 GLXContext result
= g_driver_glx
.debug_fn
.glXGetCurrentContextFn();
441 GL_SERVICE_LOG("GL_RESULT: " << result
);
445 static Display
* GL_BINDING_CALL
Debug_glXGetCurrentDisplay(void) {
446 GL_SERVICE_LOG("glXGetCurrentDisplay"
449 Display
* result
= g_driver_glx
.debug_fn
.glXGetCurrentDisplayFn();
450 GL_SERVICE_LOG("GL_RESULT: " << result
);
454 static GLXDrawable GL_BINDING_CALL
Debug_glXGetCurrentDrawable(void) {
455 GL_SERVICE_LOG("glXGetCurrentDrawable"
458 GLXDrawable result
= g_driver_glx
.debug_fn
.glXGetCurrentDrawableFn();
459 GL_SERVICE_LOG("GL_RESULT: " << result
);
463 static GLXDrawable GL_BINDING_CALL
Debug_glXGetCurrentReadDrawable(void) {
464 GL_SERVICE_LOG("glXGetCurrentReadDrawable"
467 GLXDrawable result
= g_driver_glx
.debug_fn
.glXGetCurrentReadDrawableFn();
468 GL_SERVICE_LOG("GL_RESULT: " << result
);
472 static int GL_BINDING_CALL
Debug_glXGetFBConfigAttrib(Display
* dpy
,
476 GL_SERVICE_LOG("glXGetFBConfigAttrib"
477 << "(" << static_cast<const void*>(dpy
) << ", " << config
478 << ", " << attribute
<< ", " << static_cast<const void*>(value
)
480 int result
= g_driver_glx
.debug_fn
.glXGetFBConfigAttribFn(dpy
, config
,
482 GL_SERVICE_LOG("GL_RESULT: " << result
);
486 static GLXFBConfig GL_BINDING_CALL
487 Debug_glXGetFBConfigFromVisualSGIX(Display
* dpy
, XVisualInfo
* visualInfo
) {
488 GL_SERVICE_LOG("glXGetFBConfigFromVisualSGIX"
489 << "(" << static_cast<const void*>(dpy
) << ", "
490 << static_cast<const void*>(visualInfo
) << ")");
492 g_driver_glx
.debug_fn
.glXGetFBConfigFromVisualSGIXFn(dpy
, visualInfo
);
493 GL_SERVICE_LOG("GL_RESULT: " << result
);
497 static GLXFBConfig
* GL_BINDING_CALL
498 Debug_glXGetFBConfigs(Display
* dpy
, int screen
, int* nelements
) {
499 GL_SERVICE_LOG("glXGetFBConfigs"
500 << "(" << static_cast<const void*>(dpy
) << ", " << screen
501 << ", " << static_cast<const void*>(nelements
) << ")");
502 GLXFBConfig
* result
=
503 g_driver_glx
.debug_fn
.glXGetFBConfigsFn(dpy
, screen
, nelements
);
504 GL_SERVICE_LOG("GL_RESULT: " << result
);
508 static bool GL_BINDING_CALL
Debug_glXGetMscRateOML(Display
* dpy
,
509 GLXDrawable drawable
,
511 int32
* denominator
) {
512 GL_SERVICE_LOG("glXGetMscRateOML"
513 << "(" << static_cast<const void*>(dpy
) << ", " << drawable
514 << ", " << static_cast<const void*>(numerator
) << ", "
515 << static_cast<const void*>(denominator
) << ")");
516 bool result
= g_driver_glx
.debug_fn
.glXGetMscRateOMLFn(
517 dpy
, drawable
, numerator
, denominator
);
518 GL_SERVICE_LOG("GL_RESULT: " << result
);
522 static void GL_BINDING_CALL
Debug_glXGetSelectedEvent(Display
* dpy
,
523 GLXDrawable drawable
,
524 unsigned long* mask
) {
525 GL_SERVICE_LOG("glXGetSelectedEvent"
526 << "(" << static_cast<const void*>(dpy
) << ", " << drawable
527 << ", " << static_cast<const void*>(mask
) << ")");
528 g_driver_glx
.debug_fn
.glXGetSelectedEventFn(dpy
, drawable
, mask
);
531 static bool GL_BINDING_CALL
Debug_glXGetSyncValuesOML(Display
* dpy
,
532 GLXDrawable drawable
,
536 GL_SERVICE_LOG("glXGetSyncValuesOML"
537 << "(" << static_cast<const void*>(dpy
) << ", " << drawable
538 << ", " << static_cast<const void*>(ust
) << ", "
539 << static_cast<const void*>(msc
) << ", "
540 << static_cast<const void*>(sbc
) << ")");
542 g_driver_glx
.debug_fn
.glXGetSyncValuesOMLFn(dpy
, drawable
, ust
, msc
, sbc
);
543 GL_SERVICE_LOG("GL_RESULT: " << result
);
547 static XVisualInfo
* GL_BINDING_CALL
548 Debug_glXGetVisualFromFBConfig(Display
* dpy
, GLXFBConfig config
) {
549 GL_SERVICE_LOG("glXGetVisualFromFBConfig"
550 << "(" << static_cast<const void*>(dpy
) << ", " << config
552 XVisualInfo
* result
=
553 g_driver_glx
.debug_fn
.glXGetVisualFromFBConfigFn(dpy
, config
);
554 GL_SERVICE_LOG("GL_RESULT: " << result
);
558 static int GL_BINDING_CALL
Debug_glXIsDirect(Display
* dpy
, GLXContext ctx
) {
559 GL_SERVICE_LOG("glXIsDirect"
560 << "(" << static_cast<const void*>(dpy
) << ", " << ctx
<< ")");
561 int result
= g_driver_glx
.debug_fn
.glXIsDirectFn(dpy
, ctx
);
562 GL_SERVICE_LOG("GL_RESULT: " << result
);
566 static int GL_BINDING_CALL
Debug_glXMakeContextCurrent(Display
* dpy
,
570 GL_SERVICE_LOG("glXMakeContextCurrent"
571 << "(" << static_cast<const void*>(dpy
) << ", " << draw
<< ", "
572 << read
<< ", " << ctx
<< ")");
574 g_driver_glx
.debug_fn
.glXMakeContextCurrentFn(dpy
, draw
, read
, ctx
);
575 GL_SERVICE_LOG("GL_RESULT: " << result
);
579 static int GL_BINDING_CALL
580 Debug_glXMakeCurrent(Display
* dpy
, GLXDrawable drawable
, GLXContext ctx
) {
581 GL_SERVICE_LOG("glXMakeCurrent"
582 << "(" << static_cast<const void*>(dpy
) << ", " << drawable
583 << ", " << ctx
<< ")");
584 int result
= g_driver_glx
.debug_fn
.glXMakeCurrentFn(dpy
, drawable
, ctx
);
585 GL_SERVICE_LOG("GL_RESULT: " << result
);
589 static int GL_BINDING_CALL
590 Debug_glXQueryContext(Display
* dpy
, GLXContext ctx
, int attribute
, int* value
) {
591 GL_SERVICE_LOG("glXQueryContext"
592 << "(" << static_cast<const void*>(dpy
) << ", " << ctx
<< ", "
593 << attribute
<< ", " << static_cast<const void*>(value
)
596 g_driver_glx
.debug_fn
.glXQueryContextFn(dpy
, ctx
, attribute
, value
);
597 GL_SERVICE_LOG("GL_RESULT: " << result
);
601 static void GL_BINDING_CALL
Debug_glXQueryDrawable(Display
* dpy
,
604 unsigned int* value
) {
605 GL_SERVICE_LOG("glXQueryDrawable"
606 << "(" << static_cast<const void*>(dpy
) << ", " << draw
<< ", "
607 << attribute
<< ", " << static_cast<const void*>(value
)
609 g_driver_glx
.debug_fn
.glXQueryDrawableFn(dpy
, draw
, attribute
, value
);
612 static int GL_BINDING_CALL
613 Debug_glXQueryExtension(Display
* dpy
, int* errorb
, int* event
) {
614 GL_SERVICE_LOG("glXQueryExtension"
615 << "(" << static_cast<const void*>(dpy
) << ", "
616 << static_cast<const void*>(errorb
) << ", "
617 << static_cast<const void*>(event
) << ")");
618 int result
= g_driver_glx
.debug_fn
.glXQueryExtensionFn(dpy
, errorb
, event
);
619 GL_SERVICE_LOG("GL_RESULT: " << result
);
623 static const char* GL_BINDING_CALL
624 Debug_glXQueryExtensionsString(Display
* dpy
, int screen
) {
625 GL_SERVICE_LOG("glXQueryExtensionsString"
626 << "(" << static_cast<const void*>(dpy
) << ", " << screen
629 g_driver_glx
.debug_fn
.glXQueryExtensionsStringFn(dpy
, screen
);
630 GL_SERVICE_LOG("GL_RESULT: " << result
);
634 static const char* GL_BINDING_CALL
635 Debug_glXQueryServerString(Display
* dpy
, int screen
, int name
) {
636 GL_SERVICE_LOG("glXQueryServerString"
637 << "(" << static_cast<const void*>(dpy
) << ", " << screen
638 << ", " << name
<< ")");
640 g_driver_glx
.debug_fn
.glXQueryServerStringFn(dpy
, screen
, name
);
641 GL_SERVICE_LOG("GL_RESULT: " << result
);
645 static int GL_BINDING_CALL
646 Debug_glXQueryVersion(Display
* dpy
, int* maj
, int* min
) {
647 GL_SERVICE_LOG("glXQueryVersion"
648 << "(" << static_cast<const void*>(dpy
) << ", "
649 << static_cast<const void*>(maj
) << ", "
650 << static_cast<const void*>(min
) << ")");
651 int result
= g_driver_glx
.debug_fn
.glXQueryVersionFn(dpy
, maj
, min
);
652 GL_SERVICE_LOG("GL_RESULT: " << result
);
656 static void GL_BINDING_CALL
657 Debug_glXReleaseTexImageEXT(Display
* dpy
, GLXDrawable drawable
, int buffer
) {
658 GL_SERVICE_LOG("glXReleaseTexImageEXT"
659 << "(" << static_cast<const void*>(dpy
) << ", " << drawable
660 << ", " << buffer
<< ")");
661 g_driver_glx
.debug_fn
.glXReleaseTexImageEXTFn(dpy
, drawable
, buffer
);
664 static void GL_BINDING_CALL
665 Debug_glXSelectEvent(Display
* dpy
, GLXDrawable drawable
, unsigned long mask
) {
666 GL_SERVICE_LOG("glXSelectEvent"
667 << "(" << static_cast<const void*>(dpy
) << ", " << drawable
668 << ", " << mask
<< ")");
669 g_driver_glx
.debug_fn
.glXSelectEventFn(dpy
, drawable
, mask
);
672 static void GL_BINDING_CALL
673 Debug_glXSwapBuffers(Display
* dpy
, GLXDrawable drawable
) {
674 GL_SERVICE_LOG("glXSwapBuffers"
675 << "(" << static_cast<const void*>(dpy
) << ", " << drawable
677 g_driver_glx
.debug_fn
.glXSwapBuffersFn(dpy
, drawable
);
680 static void GL_BINDING_CALL
681 Debug_glXSwapIntervalEXT(Display
* dpy
, GLXDrawable drawable
, int interval
) {
682 GL_SERVICE_LOG("glXSwapIntervalEXT"
683 << "(" << static_cast<const void*>(dpy
) << ", " << drawable
684 << ", " << interval
<< ")");
685 g_driver_glx
.debug_fn
.glXSwapIntervalEXTFn(dpy
, drawable
, interval
);
688 static void GL_BINDING_CALL
Debug_glXSwapIntervalMESA(unsigned int interval
) {
689 GL_SERVICE_LOG("glXSwapIntervalMESA"
690 << "(" << interval
<< ")");
691 g_driver_glx
.debug_fn
.glXSwapIntervalMESAFn(interval
);
694 static void GL_BINDING_CALL
695 Debug_glXUseXFont(Font font
, int first
, int count
, int list
) {
696 GL_SERVICE_LOG("glXUseXFont"
697 << "(" << font
<< ", " << first
<< ", " << count
<< ", "
699 g_driver_glx
.debug_fn
.glXUseXFontFn(font
, first
, count
, list
);
702 static void GL_BINDING_CALL
Debug_glXWaitGL(void) {
703 GL_SERVICE_LOG("glXWaitGL"
706 g_driver_glx
.debug_fn
.glXWaitGLFn();
709 static int GL_BINDING_CALL
710 Debug_glXWaitVideoSyncSGI(int divisor
, int remainder
, unsigned int* count
) {
711 GL_SERVICE_LOG("glXWaitVideoSyncSGI"
712 << "(" << divisor
<< ", " << remainder
<< ", "
713 << static_cast<const void*>(count
) << ")");
715 g_driver_glx
.debug_fn
.glXWaitVideoSyncSGIFn(divisor
, remainder
, count
);
716 GL_SERVICE_LOG("GL_RESULT: " << result
);
720 static void GL_BINDING_CALL
Debug_glXWaitX(void) {
721 GL_SERVICE_LOG("glXWaitX"
724 g_driver_glx
.debug_fn
.glXWaitXFn();
728 void DriverGLX::InitializeDebugBindings() {
729 if (!debug_fn
.glXBindTexImageEXTFn
) {
730 debug_fn
.glXBindTexImageEXTFn
= fn
.glXBindTexImageEXTFn
;
731 fn
.glXBindTexImageEXTFn
= Debug_glXBindTexImageEXT
;
733 if (!debug_fn
.glXChooseFBConfigFn
) {
734 debug_fn
.glXChooseFBConfigFn
= fn
.glXChooseFBConfigFn
;
735 fn
.glXChooseFBConfigFn
= Debug_glXChooseFBConfig
;
737 if (!debug_fn
.glXChooseVisualFn
) {
738 debug_fn
.glXChooseVisualFn
= fn
.glXChooseVisualFn
;
739 fn
.glXChooseVisualFn
= Debug_glXChooseVisual
;
741 if (!debug_fn
.glXCopyContextFn
) {
742 debug_fn
.glXCopyContextFn
= fn
.glXCopyContextFn
;
743 fn
.glXCopyContextFn
= Debug_glXCopyContext
;
745 if (!debug_fn
.glXCopySubBufferMESAFn
) {
746 debug_fn
.glXCopySubBufferMESAFn
= fn
.glXCopySubBufferMESAFn
;
747 fn
.glXCopySubBufferMESAFn
= Debug_glXCopySubBufferMESA
;
749 if (!debug_fn
.glXCreateContextFn
) {
750 debug_fn
.glXCreateContextFn
= fn
.glXCreateContextFn
;
751 fn
.glXCreateContextFn
= Debug_glXCreateContext
;
753 if (!debug_fn
.glXCreateContextAttribsARBFn
) {
754 debug_fn
.glXCreateContextAttribsARBFn
= fn
.glXCreateContextAttribsARBFn
;
755 fn
.glXCreateContextAttribsARBFn
= Debug_glXCreateContextAttribsARB
;
757 if (!debug_fn
.glXCreateGLXPixmapFn
) {
758 debug_fn
.glXCreateGLXPixmapFn
= fn
.glXCreateGLXPixmapFn
;
759 fn
.glXCreateGLXPixmapFn
= Debug_glXCreateGLXPixmap
;
761 if (!debug_fn
.glXCreateNewContextFn
) {
762 debug_fn
.glXCreateNewContextFn
= fn
.glXCreateNewContextFn
;
763 fn
.glXCreateNewContextFn
= Debug_glXCreateNewContext
;
765 if (!debug_fn
.glXCreatePbufferFn
) {
766 debug_fn
.glXCreatePbufferFn
= fn
.glXCreatePbufferFn
;
767 fn
.glXCreatePbufferFn
= Debug_glXCreatePbuffer
;
769 if (!debug_fn
.glXCreatePixmapFn
) {
770 debug_fn
.glXCreatePixmapFn
= fn
.glXCreatePixmapFn
;
771 fn
.glXCreatePixmapFn
= Debug_glXCreatePixmap
;
773 if (!debug_fn
.glXCreateWindowFn
) {
774 debug_fn
.glXCreateWindowFn
= fn
.glXCreateWindowFn
;
775 fn
.glXCreateWindowFn
= Debug_glXCreateWindow
;
777 if (!debug_fn
.glXDestroyContextFn
) {
778 debug_fn
.glXDestroyContextFn
= fn
.glXDestroyContextFn
;
779 fn
.glXDestroyContextFn
= Debug_glXDestroyContext
;
781 if (!debug_fn
.glXDestroyGLXPixmapFn
) {
782 debug_fn
.glXDestroyGLXPixmapFn
= fn
.glXDestroyGLXPixmapFn
;
783 fn
.glXDestroyGLXPixmapFn
= Debug_glXDestroyGLXPixmap
;
785 if (!debug_fn
.glXDestroyPbufferFn
) {
786 debug_fn
.glXDestroyPbufferFn
= fn
.glXDestroyPbufferFn
;
787 fn
.glXDestroyPbufferFn
= Debug_glXDestroyPbuffer
;
789 if (!debug_fn
.glXDestroyPixmapFn
) {
790 debug_fn
.glXDestroyPixmapFn
= fn
.glXDestroyPixmapFn
;
791 fn
.glXDestroyPixmapFn
= Debug_glXDestroyPixmap
;
793 if (!debug_fn
.glXDestroyWindowFn
) {
794 debug_fn
.glXDestroyWindowFn
= fn
.glXDestroyWindowFn
;
795 fn
.glXDestroyWindowFn
= Debug_glXDestroyWindow
;
797 if (!debug_fn
.glXGetClientStringFn
) {
798 debug_fn
.glXGetClientStringFn
= fn
.glXGetClientStringFn
;
799 fn
.glXGetClientStringFn
= Debug_glXGetClientString
;
801 if (!debug_fn
.glXGetConfigFn
) {
802 debug_fn
.glXGetConfigFn
= fn
.glXGetConfigFn
;
803 fn
.glXGetConfigFn
= Debug_glXGetConfig
;
805 if (!debug_fn
.glXGetCurrentContextFn
) {
806 debug_fn
.glXGetCurrentContextFn
= fn
.glXGetCurrentContextFn
;
807 fn
.glXGetCurrentContextFn
= Debug_glXGetCurrentContext
;
809 if (!debug_fn
.glXGetCurrentDisplayFn
) {
810 debug_fn
.glXGetCurrentDisplayFn
= fn
.glXGetCurrentDisplayFn
;
811 fn
.glXGetCurrentDisplayFn
= Debug_glXGetCurrentDisplay
;
813 if (!debug_fn
.glXGetCurrentDrawableFn
) {
814 debug_fn
.glXGetCurrentDrawableFn
= fn
.glXGetCurrentDrawableFn
;
815 fn
.glXGetCurrentDrawableFn
= Debug_glXGetCurrentDrawable
;
817 if (!debug_fn
.glXGetCurrentReadDrawableFn
) {
818 debug_fn
.glXGetCurrentReadDrawableFn
= fn
.glXGetCurrentReadDrawableFn
;
819 fn
.glXGetCurrentReadDrawableFn
= Debug_glXGetCurrentReadDrawable
;
821 if (!debug_fn
.glXGetFBConfigAttribFn
) {
822 debug_fn
.glXGetFBConfigAttribFn
= fn
.glXGetFBConfigAttribFn
;
823 fn
.glXGetFBConfigAttribFn
= Debug_glXGetFBConfigAttrib
;
825 if (!debug_fn
.glXGetFBConfigFromVisualSGIXFn
) {
826 debug_fn
.glXGetFBConfigFromVisualSGIXFn
= fn
.glXGetFBConfigFromVisualSGIXFn
;
827 fn
.glXGetFBConfigFromVisualSGIXFn
= Debug_glXGetFBConfigFromVisualSGIX
;
829 if (!debug_fn
.glXGetFBConfigsFn
) {
830 debug_fn
.glXGetFBConfigsFn
= fn
.glXGetFBConfigsFn
;
831 fn
.glXGetFBConfigsFn
= Debug_glXGetFBConfigs
;
833 if (!debug_fn
.glXGetMscRateOMLFn
) {
834 debug_fn
.glXGetMscRateOMLFn
= fn
.glXGetMscRateOMLFn
;
835 fn
.glXGetMscRateOMLFn
= Debug_glXGetMscRateOML
;
837 if (!debug_fn
.glXGetSelectedEventFn
) {
838 debug_fn
.glXGetSelectedEventFn
= fn
.glXGetSelectedEventFn
;
839 fn
.glXGetSelectedEventFn
= Debug_glXGetSelectedEvent
;
841 if (!debug_fn
.glXGetSyncValuesOMLFn
) {
842 debug_fn
.glXGetSyncValuesOMLFn
= fn
.glXGetSyncValuesOMLFn
;
843 fn
.glXGetSyncValuesOMLFn
= Debug_glXGetSyncValuesOML
;
845 if (!debug_fn
.glXGetVisualFromFBConfigFn
) {
846 debug_fn
.glXGetVisualFromFBConfigFn
= fn
.glXGetVisualFromFBConfigFn
;
847 fn
.glXGetVisualFromFBConfigFn
= Debug_glXGetVisualFromFBConfig
;
849 if (!debug_fn
.glXIsDirectFn
) {
850 debug_fn
.glXIsDirectFn
= fn
.glXIsDirectFn
;
851 fn
.glXIsDirectFn
= Debug_glXIsDirect
;
853 if (!debug_fn
.glXMakeContextCurrentFn
) {
854 debug_fn
.glXMakeContextCurrentFn
= fn
.glXMakeContextCurrentFn
;
855 fn
.glXMakeContextCurrentFn
= Debug_glXMakeContextCurrent
;
857 if (!debug_fn
.glXMakeCurrentFn
) {
858 debug_fn
.glXMakeCurrentFn
= fn
.glXMakeCurrentFn
;
859 fn
.glXMakeCurrentFn
= Debug_glXMakeCurrent
;
861 if (!debug_fn
.glXQueryContextFn
) {
862 debug_fn
.glXQueryContextFn
= fn
.glXQueryContextFn
;
863 fn
.glXQueryContextFn
= Debug_glXQueryContext
;
865 if (!debug_fn
.glXQueryDrawableFn
) {
866 debug_fn
.glXQueryDrawableFn
= fn
.glXQueryDrawableFn
;
867 fn
.glXQueryDrawableFn
= Debug_glXQueryDrawable
;
869 if (!debug_fn
.glXQueryExtensionFn
) {
870 debug_fn
.glXQueryExtensionFn
= fn
.glXQueryExtensionFn
;
871 fn
.glXQueryExtensionFn
= Debug_glXQueryExtension
;
873 if (!debug_fn
.glXQueryExtensionsStringFn
) {
874 debug_fn
.glXQueryExtensionsStringFn
= fn
.glXQueryExtensionsStringFn
;
875 fn
.glXQueryExtensionsStringFn
= Debug_glXQueryExtensionsString
;
877 if (!debug_fn
.glXQueryServerStringFn
) {
878 debug_fn
.glXQueryServerStringFn
= fn
.glXQueryServerStringFn
;
879 fn
.glXQueryServerStringFn
= Debug_glXQueryServerString
;
881 if (!debug_fn
.glXQueryVersionFn
) {
882 debug_fn
.glXQueryVersionFn
= fn
.glXQueryVersionFn
;
883 fn
.glXQueryVersionFn
= Debug_glXQueryVersion
;
885 if (!debug_fn
.glXReleaseTexImageEXTFn
) {
886 debug_fn
.glXReleaseTexImageEXTFn
= fn
.glXReleaseTexImageEXTFn
;
887 fn
.glXReleaseTexImageEXTFn
= Debug_glXReleaseTexImageEXT
;
889 if (!debug_fn
.glXSelectEventFn
) {
890 debug_fn
.glXSelectEventFn
= fn
.glXSelectEventFn
;
891 fn
.glXSelectEventFn
= Debug_glXSelectEvent
;
893 if (!debug_fn
.glXSwapBuffersFn
) {
894 debug_fn
.glXSwapBuffersFn
= fn
.glXSwapBuffersFn
;
895 fn
.glXSwapBuffersFn
= Debug_glXSwapBuffers
;
897 if (!debug_fn
.glXSwapIntervalEXTFn
) {
898 debug_fn
.glXSwapIntervalEXTFn
= fn
.glXSwapIntervalEXTFn
;
899 fn
.glXSwapIntervalEXTFn
= Debug_glXSwapIntervalEXT
;
901 if (!debug_fn
.glXSwapIntervalMESAFn
) {
902 debug_fn
.glXSwapIntervalMESAFn
= fn
.glXSwapIntervalMESAFn
;
903 fn
.glXSwapIntervalMESAFn
= Debug_glXSwapIntervalMESA
;
905 if (!debug_fn
.glXUseXFontFn
) {
906 debug_fn
.glXUseXFontFn
= fn
.glXUseXFontFn
;
907 fn
.glXUseXFontFn
= Debug_glXUseXFont
;
909 if (!debug_fn
.glXWaitGLFn
) {
910 debug_fn
.glXWaitGLFn
= fn
.glXWaitGLFn
;
911 fn
.glXWaitGLFn
= Debug_glXWaitGL
;
913 if (!debug_fn
.glXWaitVideoSyncSGIFn
) {
914 debug_fn
.glXWaitVideoSyncSGIFn
= fn
.glXWaitVideoSyncSGIFn
;
915 fn
.glXWaitVideoSyncSGIFn
= Debug_glXWaitVideoSyncSGI
;
917 if (!debug_fn
.glXWaitXFn
) {
918 debug_fn
.glXWaitXFn
= fn
.glXWaitXFn
;
919 fn
.glXWaitXFn
= Debug_glXWaitX
;
921 g_debugBindingsInitialized
= true;
924 void DriverGLX::ClearBindings() {
925 memset(this, 0, sizeof(*this));
928 void GLXApiBase::glXBindTexImageEXTFn(Display
* dpy
,
929 GLXDrawable drawable
,
932 driver_
->fn
.glXBindTexImageEXTFn(dpy
, drawable
, buffer
, attribList
);
935 GLXFBConfig
* GLXApiBase::glXChooseFBConfigFn(Display
* dpy
,
937 const int* attribList
,
939 return driver_
->fn
.glXChooseFBConfigFn(dpy
, screen
, attribList
, nitems
);
942 XVisualInfo
* GLXApiBase::glXChooseVisualFn(Display
* dpy
,
945 return driver_
->fn
.glXChooseVisualFn(dpy
, screen
, attribList
);
948 void GLXApiBase::glXCopyContextFn(Display
* dpy
,
951 unsigned long mask
) {
952 driver_
->fn
.glXCopyContextFn(dpy
, src
, dst
, mask
);
955 void GLXApiBase::glXCopySubBufferMESAFn(Display
* dpy
,
956 GLXDrawable drawable
,
961 driver_
->fn
.glXCopySubBufferMESAFn(dpy
, drawable
, x
, y
, width
, height
);
964 GLXContext
GLXApiBase::glXCreateContextFn(Display
* dpy
,
966 GLXContext shareList
,
968 return driver_
->fn
.glXCreateContextFn(dpy
, vis
, shareList
, direct
);
971 GLXContext
GLXApiBase::glXCreateContextAttribsARBFn(Display
* dpy
,
973 GLXContext share_context
,
975 const int* attrib_list
) {
976 return driver_
->fn
.glXCreateContextAttribsARBFn(dpy
, config
, share_context
,
977 direct
, attrib_list
);
980 GLXPixmap
GLXApiBase::glXCreateGLXPixmapFn(Display
* dpy
,
983 return driver_
->fn
.glXCreateGLXPixmapFn(dpy
, visual
, pixmap
);
986 GLXContext
GLXApiBase::glXCreateNewContextFn(Display
* dpy
,
989 GLXContext shareList
,
991 return driver_
->fn
.glXCreateNewContextFn(dpy
, config
, renderType
, shareList
,
995 GLXPbuffer
GLXApiBase::glXCreatePbufferFn(Display
* dpy
,
997 const int* attribList
) {
998 return driver_
->fn
.glXCreatePbufferFn(dpy
, config
, attribList
);
1001 GLXPixmap
GLXApiBase::glXCreatePixmapFn(Display
* dpy
,
1004 const int* attribList
) {
1005 return driver_
->fn
.glXCreatePixmapFn(dpy
, config
, pixmap
, attribList
);
1008 GLXWindow
GLXApiBase::glXCreateWindowFn(Display
* dpy
,
1011 const int* attribList
) {
1012 return driver_
->fn
.glXCreateWindowFn(dpy
, config
, win
, attribList
);
1015 void GLXApiBase::glXDestroyContextFn(Display
* dpy
, GLXContext ctx
) {
1016 driver_
->fn
.glXDestroyContextFn(dpy
, ctx
);
1019 void GLXApiBase::glXDestroyGLXPixmapFn(Display
* dpy
, GLXPixmap pixmap
) {
1020 driver_
->fn
.glXDestroyGLXPixmapFn(dpy
, pixmap
);
1023 void GLXApiBase::glXDestroyPbufferFn(Display
* dpy
, GLXPbuffer pbuf
) {
1024 driver_
->fn
.glXDestroyPbufferFn(dpy
, pbuf
);
1027 void GLXApiBase::glXDestroyPixmapFn(Display
* dpy
, GLXPixmap pixmap
) {
1028 driver_
->fn
.glXDestroyPixmapFn(dpy
, pixmap
);
1031 void GLXApiBase::glXDestroyWindowFn(Display
* dpy
, GLXWindow window
) {
1032 driver_
->fn
.glXDestroyWindowFn(dpy
, window
);
1035 const char* GLXApiBase::glXGetClientStringFn(Display
* dpy
, int name
) {
1036 return driver_
->fn
.glXGetClientStringFn(dpy
, name
);
1039 int GLXApiBase::glXGetConfigFn(Display
* dpy
,
1040 XVisualInfo
* visual
,
1043 return driver_
->fn
.glXGetConfigFn(dpy
, visual
, attrib
, value
);
1046 GLXContext
GLXApiBase::glXGetCurrentContextFn(void) {
1047 return driver_
->fn
.glXGetCurrentContextFn();
1050 Display
* GLXApiBase::glXGetCurrentDisplayFn(void) {
1051 return driver_
->fn
.glXGetCurrentDisplayFn();
1054 GLXDrawable
GLXApiBase::glXGetCurrentDrawableFn(void) {
1055 return driver_
->fn
.glXGetCurrentDrawableFn();
1058 GLXDrawable
GLXApiBase::glXGetCurrentReadDrawableFn(void) {
1059 return driver_
->fn
.glXGetCurrentReadDrawableFn();
1062 int GLXApiBase::glXGetFBConfigAttribFn(Display
* dpy
,
1066 return driver_
->fn
.glXGetFBConfigAttribFn(dpy
, config
, attribute
, value
);
1069 GLXFBConfig
GLXApiBase::glXGetFBConfigFromVisualSGIXFn(
1071 XVisualInfo
* visualInfo
) {
1072 return driver_
->fn
.glXGetFBConfigFromVisualSGIXFn(dpy
, visualInfo
);
1075 GLXFBConfig
* GLXApiBase::glXGetFBConfigsFn(Display
* dpy
,
1078 return driver_
->fn
.glXGetFBConfigsFn(dpy
, screen
, nelements
);
1081 bool GLXApiBase::glXGetMscRateOMLFn(Display
* dpy
,
1082 GLXDrawable drawable
,
1084 int32
* denominator
) {
1085 return driver_
->fn
.glXGetMscRateOMLFn(dpy
, drawable
, numerator
, denominator
);
1088 void GLXApiBase::glXGetSelectedEventFn(Display
* dpy
,
1089 GLXDrawable drawable
,
1090 unsigned long* mask
) {
1091 driver_
->fn
.glXGetSelectedEventFn(dpy
, drawable
, mask
);
1094 bool GLXApiBase::glXGetSyncValuesOMLFn(Display
* dpy
,
1095 GLXDrawable drawable
,
1099 return driver_
->fn
.glXGetSyncValuesOMLFn(dpy
, drawable
, ust
, msc
, sbc
);
1102 XVisualInfo
* GLXApiBase::glXGetVisualFromFBConfigFn(Display
* dpy
,
1103 GLXFBConfig config
) {
1104 return driver_
->fn
.glXGetVisualFromFBConfigFn(dpy
, config
);
1107 int GLXApiBase::glXIsDirectFn(Display
* dpy
, GLXContext ctx
) {
1108 return driver_
->fn
.glXIsDirectFn(dpy
, ctx
);
1111 int GLXApiBase::glXMakeContextCurrentFn(Display
* dpy
,
1115 return driver_
->fn
.glXMakeContextCurrentFn(dpy
, draw
, read
, ctx
);
1118 int GLXApiBase::glXMakeCurrentFn(Display
* dpy
,
1119 GLXDrawable drawable
,
1121 return driver_
->fn
.glXMakeCurrentFn(dpy
, drawable
, ctx
);
1124 int GLXApiBase::glXQueryContextFn(Display
* dpy
,
1128 return driver_
->fn
.glXQueryContextFn(dpy
, ctx
, attribute
, value
);
1131 void GLXApiBase::glXQueryDrawableFn(Display
* dpy
,
1134 unsigned int* value
) {
1135 driver_
->fn
.glXQueryDrawableFn(dpy
, draw
, attribute
, value
);
1138 int GLXApiBase::glXQueryExtensionFn(Display
* dpy
, int* errorb
, int* event
) {
1139 return driver_
->fn
.glXQueryExtensionFn(dpy
, errorb
, event
);
1142 const char* GLXApiBase::glXQueryExtensionsStringFn(Display
* dpy
, int screen
) {
1143 return driver_
->fn
.glXQueryExtensionsStringFn(dpy
, screen
);
1146 const char* GLXApiBase::glXQueryServerStringFn(Display
* dpy
,
1149 return driver_
->fn
.glXQueryServerStringFn(dpy
, screen
, name
);
1152 int GLXApiBase::glXQueryVersionFn(Display
* dpy
, int* maj
, int* min
) {
1153 return driver_
->fn
.glXQueryVersionFn(dpy
, maj
, min
);
1156 void GLXApiBase::glXReleaseTexImageEXTFn(Display
* dpy
,
1157 GLXDrawable drawable
,
1159 driver_
->fn
.glXReleaseTexImageEXTFn(dpy
, drawable
, buffer
);
1162 void GLXApiBase::glXSelectEventFn(Display
* dpy
,
1163 GLXDrawable drawable
,
1164 unsigned long mask
) {
1165 driver_
->fn
.glXSelectEventFn(dpy
, drawable
, mask
);
1168 void GLXApiBase::glXSwapBuffersFn(Display
* dpy
, GLXDrawable drawable
) {
1169 driver_
->fn
.glXSwapBuffersFn(dpy
, drawable
);
1172 void GLXApiBase::glXSwapIntervalEXTFn(Display
* dpy
,
1173 GLXDrawable drawable
,
1175 driver_
->fn
.glXSwapIntervalEXTFn(dpy
, drawable
, interval
);
1178 void GLXApiBase::glXSwapIntervalMESAFn(unsigned int interval
) {
1179 driver_
->fn
.glXSwapIntervalMESAFn(interval
);
1182 void GLXApiBase::glXUseXFontFn(Font font
, int first
, int count
, int list
) {
1183 driver_
->fn
.glXUseXFontFn(font
, first
, count
, list
);
1186 void GLXApiBase::glXWaitGLFn(void) {
1187 driver_
->fn
.glXWaitGLFn();
1190 int GLXApiBase::glXWaitVideoSyncSGIFn(int divisor
,
1192 unsigned int* count
) {
1193 return driver_
->fn
.glXWaitVideoSyncSGIFn(divisor
, remainder
, count
);
1196 void GLXApiBase::glXWaitXFn(void) {
1197 driver_
->fn
.glXWaitXFn();
1200 void TraceGLXApi::glXBindTexImageEXTFn(Display
* dpy
,
1201 GLXDrawable drawable
,
1204 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXBindTexImageEXT")
1205 glx_api_
->glXBindTexImageEXTFn(dpy
, drawable
, buffer
, attribList
);
1208 GLXFBConfig
* TraceGLXApi::glXChooseFBConfigFn(Display
* dpy
,
1210 const int* attribList
,
1212 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXChooseFBConfig")
1213 return glx_api_
->glXChooseFBConfigFn(dpy
, screen
, attribList
, nitems
);
1216 XVisualInfo
* TraceGLXApi::glXChooseVisualFn(Display
* dpy
,
1219 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXChooseVisual")
1220 return glx_api_
->glXChooseVisualFn(dpy
, screen
, attribList
);
1223 void TraceGLXApi::glXCopyContextFn(Display
* dpy
,
1226 unsigned long mask
) {
1227 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCopyContext")
1228 glx_api_
->glXCopyContextFn(dpy
, src
, dst
, mask
);
1231 void TraceGLXApi::glXCopySubBufferMESAFn(Display
* dpy
,
1232 GLXDrawable drawable
,
1237 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCopySubBufferMESA")
1238 glx_api_
->glXCopySubBufferMESAFn(dpy
, drawable
, x
, y
, width
, height
);
1241 GLXContext
TraceGLXApi::glXCreateContextFn(Display
* dpy
,
1243 GLXContext shareList
,
1245 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCreateContext")
1246 return glx_api_
->glXCreateContextFn(dpy
, vis
, shareList
, direct
);
1249 GLXContext
TraceGLXApi::glXCreateContextAttribsARBFn(Display
* dpy
,
1251 GLXContext share_context
,
1253 const int* attrib_list
) {
1254 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCreateContextAttribsARB")
1255 return glx_api_
->glXCreateContextAttribsARBFn(dpy
, config
, share_context
,
1256 direct
, attrib_list
);
1259 GLXPixmap
TraceGLXApi::glXCreateGLXPixmapFn(Display
* dpy
,
1260 XVisualInfo
* visual
,
1262 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCreateGLXPixmap")
1263 return glx_api_
->glXCreateGLXPixmapFn(dpy
, visual
, pixmap
);
1266 GLXContext
TraceGLXApi::glXCreateNewContextFn(Display
* dpy
,
1269 GLXContext shareList
,
1271 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCreateNewContext")
1272 return glx_api_
->glXCreateNewContextFn(dpy
, config
, renderType
, shareList
,
1276 GLXPbuffer
TraceGLXApi::glXCreatePbufferFn(Display
* dpy
,
1278 const int* attribList
) {
1279 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCreatePbuffer")
1280 return glx_api_
->glXCreatePbufferFn(dpy
, config
, attribList
);
1283 GLXPixmap
TraceGLXApi::glXCreatePixmapFn(Display
* dpy
,
1286 const int* attribList
) {
1287 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCreatePixmap")
1288 return glx_api_
->glXCreatePixmapFn(dpy
, config
, pixmap
, attribList
);
1291 GLXWindow
TraceGLXApi::glXCreateWindowFn(Display
* dpy
,
1294 const int* attribList
) {
1295 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXCreateWindow")
1296 return glx_api_
->glXCreateWindowFn(dpy
, config
, win
, attribList
);
1299 void TraceGLXApi::glXDestroyContextFn(Display
* dpy
, GLXContext ctx
) {
1300 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXDestroyContext")
1301 glx_api_
->glXDestroyContextFn(dpy
, ctx
);
1304 void TraceGLXApi::glXDestroyGLXPixmapFn(Display
* dpy
, GLXPixmap pixmap
) {
1305 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXDestroyGLXPixmap")
1306 glx_api_
->glXDestroyGLXPixmapFn(dpy
, pixmap
);
1309 void TraceGLXApi::glXDestroyPbufferFn(Display
* dpy
, GLXPbuffer pbuf
) {
1310 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXDestroyPbuffer")
1311 glx_api_
->glXDestroyPbufferFn(dpy
, pbuf
);
1314 void TraceGLXApi::glXDestroyPixmapFn(Display
* dpy
, GLXPixmap pixmap
) {
1315 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXDestroyPixmap")
1316 glx_api_
->glXDestroyPixmapFn(dpy
, pixmap
);
1319 void TraceGLXApi::glXDestroyWindowFn(Display
* dpy
, GLXWindow window
) {
1320 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXDestroyWindow")
1321 glx_api_
->glXDestroyWindowFn(dpy
, window
);
1324 const char* TraceGLXApi::glXGetClientStringFn(Display
* dpy
, int name
) {
1325 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetClientString")
1326 return glx_api_
->glXGetClientStringFn(dpy
, name
);
1329 int TraceGLXApi::glXGetConfigFn(Display
* dpy
,
1330 XVisualInfo
* visual
,
1333 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetConfig")
1334 return glx_api_
->glXGetConfigFn(dpy
, visual
, attrib
, value
);
1337 GLXContext
TraceGLXApi::glXGetCurrentContextFn(void) {
1338 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetCurrentContext")
1339 return glx_api_
->glXGetCurrentContextFn();
1342 Display
* TraceGLXApi::glXGetCurrentDisplayFn(void) {
1343 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetCurrentDisplay")
1344 return glx_api_
->glXGetCurrentDisplayFn();
1347 GLXDrawable
TraceGLXApi::glXGetCurrentDrawableFn(void) {
1348 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetCurrentDrawable")
1349 return glx_api_
->glXGetCurrentDrawableFn();
1352 GLXDrawable
TraceGLXApi::glXGetCurrentReadDrawableFn(void) {
1353 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetCurrentReadDrawable")
1354 return glx_api_
->glXGetCurrentReadDrawableFn();
1357 int TraceGLXApi::glXGetFBConfigAttribFn(Display
* dpy
,
1361 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetFBConfigAttrib")
1362 return glx_api_
->glXGetFBConfigAttribFn(dpy
, config
, attribute
, value
);
1365 GLXFBConfig
TraceGLXApi::glXGetFBConfigFromVisualSGIXFn(
1367 XVisualInfo
* visualInfo
) {
1368 TRACE_EVENT_BINARY_EFFICIENT0("gpu",
1369 "TraceGLAPI::glXGetFBConfigFromVisualSGIX")
1370 return glx_api_
->glXGetFBConfigFromVisualSGIXFn(dpy
, visualInfo
);
1373 GLXFBConfig
* TraceGLXApi::glXGetFBConfigsFn(Display
* dpy
,
1376 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetFBConfigs")
1377 return glx_api_
->glXGetFBConfigsFn(dpy
, screen
, nelements
);
1380 bool TraceGLXApi::glXGetMscRateOMLFn(Display
* dpy
,
1381 GLXDrawable drawable
,
1383 int32
* denominator
) {
1384 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetMscRateOML")
1385 return glx_api_
->glXGetMscRateOMLFn(dpy
, drawable
, numerator
, denominator
);
1388 void TraceGLXApi::glXGetSelectedEventFn(Display
* dpy
,
1389 GLXDrawable drawable
,
1390 unsigned long* mask
) {
1391 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetSelectedEvent")
1392 glx_api_
->glXGetSelectedEventFn(dpy
, drawable
, mask
);
1395 bool TraceGLXApi::glXGetSyncValuesOMLFn(Display
* dpy
,
1396 GLXDrawable drawable
,
1400 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetSyncValuesOML")
1401 return glx_api_
->glXGetSyncValuesOMLFn(dpy
, drawable
, ust
, msc
, sbc
);
1404 XVisualInfo
* TraceGLXApi::glXGetVisualFromFBConfigFn(Display
* dpy
,
1405 GLXFBConfig config
) {
1406 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXGetVisualFromFBConfig")
1407 return glx_api_
->glXGetVisualFromFBConfigFn(dpy
, config
);
1410 int TraceGLXApi::glXIsDirectFn(Display
* dpy
, GLXContext ctx
) {
1411 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXIsDirect")
1412 return glx_api_
->glXIsDirectFn(dpy
, ctx
);
1415 int TraceGLXApi::glXMakeContextCurrentFn(Display
* dpy
,
1419 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXMakeContextCurrent")
1420 return glx_api_
->glXMakeContextCurrentFn(dpy
, draw
, read
, ctx
);
1423 int TraceGLXApi::glXMakeCurrentFn(Display
* dpy
,
1424 GLXDrawable drawable
,
1426 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXMakeCurrent")
1427 return glx_api_
->glXMakeCurrentFn(dpy
, drawable
, ctx
);
1430 int TraceGLXApi::glXQueryContextFn(Display
* dpy
,
1434 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXQueryContext")
1435 return glx_api_
->glXQueryContextFn(dpy
, ctx
, attribute
, value
);
1438 void TraceGLXApi::glXQueryDrawableFn(Display
* dpy
,
1441 unsigned int* value
) {
1442 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXQueryDrawable")
1443 glx_api_
->glXQueryDrawableFn(dpy
, draw
, attribute
, value
);
1446 int TraceGLXApi::glXQueryExtensionFn(Display
* dpy
, int* errorb
, int* event
) {
1447 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXQueryExtension")
1448 return glx_api_
->glXQueryExtensionFn(dpy
, errorb
, event
);
1451 const char* TraceGLXApi::glXQueryExtensionsStringFn(Display
* dpy
, int screen
) {
1452 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXQueryExtensionsString")
1453 return glx_api_
->glXQueryExtensionsStringFn(dpy
, screen
);
1456 const char* TraceGLXApi::glXQueryServerStringFn(Display
* dpy
,
1459 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXQueryServerString")
1460 return glx_api_
->glXQueryServerStringFn(dpy
, screen
, name
);
1463 int TraceGLXApi::glXQueryVersionFn(Display
* dpy
, int* maj
, int* min
) {
1464 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXQueryVersion")
1465 return glx_api_
->glXQueryVersionFn(dpy
, maj
, min
);
1468 void TraceGLXApi::glXReleaseTexImageEXTFn(Display
* dpy
,
1469 GLXDrawable drawable
,
1471 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXReleaseTexImageEXT")
1472 glx_api_
->glXReleaseTexImageEXTFn(dpy
, drawable
, buffer
);
1475 void TraceGLXApi::glXSelectEventFn(Display
* dpy
,
1476 GLXDrawable drawable
,
1477 unsigned long mask
) {
1478 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXSelectEvent")
1479 glx_api_
->glXSelectEventFn(dpy
, drawable
, mask
);
1482 void TraceGLXApi::glXSwapBuffersFn(Display
* dpy
, GLXDrawable drawable
) {
1483 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXSwapBuffers")
1484 glx_api_
->glXSwapBuffersFn(dpy
, drawable
);
1487 void TraceGLXApi::glXSwapIntervalEXTFn(Display
* dpy
,
1488 GLXDrawable drawable
,
1490 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXSwapIntervalEXT")
1491 glx_api_
->glXSwapIntervalEXTFn(dpy
, drawable
, interval
);
1494 void TraceGLXApi::glXSwapIntervalMESAFn(unsigned int interval
) {
1495 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXSwapIntervalMESA")
1496 glx_api_
->glXSwapIntervalMESAFn(interval
);
1499 void TraceGLXApi::glXUseXFontFn(Font font
, int first
, int count
, int list
) {
1500 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXUseXFont")
1501 glx_api_
->glXUseXFontFn(font
, first
, count
, list
);
1504 void TraceGLXApi::glXWaitGLFn(void) {
1505 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXWaitGL")
1506 glx_api_
->glXWaitGLFn();
1509 int TraceGLXApi::glXWaitVideoSyncSGIFn(int divisor
,
1511 unsigned int* count
) {
1512 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXWaitVideoSyncSGI")
1513 return glx_api_
->glXWaitVideoSyncSGIFn(divisor
, remainder
, count
);
1516 void TraceGLXApi::glXWaitXFn(void) {
1517 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::glXWaitX")
1518 glx_api_
->glXWaitXFn();