1 | /* $Id: fakedri_drv.h 56294 2015-06-09 14:26:20Z vboxsync $ */
|
---|
2 |
|
---|
3 | /** @file
|
---|
4 | *
|
---|
5 | * VirtualBox guest OpenGL DRI header
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2009-2015 Oracle Corporation
|
---|
10 | *
|
---|
11 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
12 | * available from http://www.virtualbox.org. This file is free software;
|
---|
13 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
14 | * General Public License (GPL) as published by the Free Software
|
---|
15 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
16 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
17 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
18 | */
|
---|
19 |
|
---|
20 | #ifndef ___CROPENGL_FAKEDRIDRV_H
|
---|
21 | #define ___CROPENGL_FAKEDRIDRV_H
|
---|
22 |
|
---|
23 | #include "src/mesa/main/mtypes.h"
|
---|
24 | #include "src/mesa/main/dd.h"
|
---|
25 | #include "src/mesa/glapi/dispatch.h"
|
---|
26 | #include "src/mesa/glapi/glapi.h"
|
---|
27 | #include "src/mesa/glapi/glapitable.h"
|
---|
28 | #include "src/mesa/glapi/glapioffsets.h"
|
---|
29 | #include "src/mesa/drivers/dri/common/dri_util.h"
|
---|
30 | #include "GL/internal/dri_interface.h"
|
---|
31 |
|
---|
32 | #include "glx_proto.h"
|
---|
33 |
|
---|
34 | #ifdef VBOX_OGL_GLX_USE_CSTUBS
|
---|
35 | # include "dri_glx.h"
|
---|
36 | #endif
|
---|
37 |
|
---|
38 | typedef struct _vbox_glxapi_table
|
---|
39 | {
|
---|
40 | #define GLXAPI_ENTRY(Func) PGLXFUNC_##Func Func;
|
---|
41 | #include "fakedri_glxfuncsList.h"
|
---|
42 | #undef GLXAPI_ENTRY
|
---|
43 | } fakedri_glxapi_table;
|
---|
44 |
|
---|
45 | extern fakedri_glxapi_table glxim;
|
---|
46 |
|
---|
47 | #ifdef VBOX_OGL_GLX_USE_CSTUBS
|
---|
48 | /* Extern declarations for our C stubs */
|
---|
49 | extern void VBOXGLXENTRYTAG(glXFreeMemoryMESA)(Display *dpy, int scrn, void *pointer) ;
|
---|
50 | extern GLXContext VBOXGLXENTRYTAG(glXImportContextEXT)(Display *dpy, GLXContextID contextID) ;
|
---|
51 | extern GLXContextID VBOXGLXENTRYTAG(glXGetContextIDEXT)(const GLXContext ctx) ;
|
---|
52 | extern Bool VBOXGLXENTRYTAG(glXMakeCurrentReadSGI)(Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx) ;
|
---|
53 | extern Display * VBOXGLXENTRYTAG(glXGetCurrentDisplayEXT)(void) ;
|
---|
54 | extern void VBOXGLXENTRYTAG(glXFreeContextEXT)(Display *dpy, GLXContext ctx) ;
|
---|
55 | extern int VBOXGLXENTRYTAG(glXQueryContextInfoEXT)(Display *dpy, GLXContext ctx) ;
|
---|
56 | extern void * VBOXGLXENTRYTAG(glXAllocateMemoryMESA)(Display *dpy, int scrn,
|
---|
57 | size_t size, float readFreq,
|
---|
58 | float writeFreq, float priority);
|
---|
59 | extern GLuint VBOXGLXENTRYTAG(glXGetMemoryOffsetMESA)(Display *dpy, int scrn, const void *pointer ) ;
|
---|
60 | extern GLXPixmap VBOXGLXENTRYTAG(glXCreateGLXPixmapMESA)(Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap) ;
|
---|
61 | extern void VBOXGLXENTRYTAG(glXCopyContext)( Display *dpy, GLXContext src, GLXContext dst, unsigned long mask);
|
---|
62 | extern void VBOXGLXENTRYTAG(glXUseXFont)(Font font, int first, int count, int listBase) ;
|
---|
63 | extern CR_GLXFuncPtr VBOXGLXENTRYTAG(glXGetProcAddress)(const GLubyte *name) ;
|
---|
64 | extern Bool VBOXGLXENTRYTAG(glXQueryExtension)(Display *dpy, int *errorBase, int *eventBase) ;
|
---|
65 | extern Bool VBOXGLXENTRYTAG(glXIsDirect)(Display *dpy, GLXContext ctx) ;
|
---|
66 | extern GLXPixmap VBOXGLXENTRYTAG(glXCreateGLXPixmap)(Display *dpy, XVisualInfo *vis, Pixmap pixmap) ;
|
---|
67 | extern void VBOXGLXENTRYTAG(glXSwapBuffers)(Display *dpy, GLXDrawable drawable) ;
|
---|
68 | extern GLXDrawable VBOXGLXENTRYTAG(glXGetCurrentDrawable)(void) ;
|
---|
69 | extern void VBOXGLXENTRYTAG(glXWaitGL)(void) ;
|
---|
70 | extern Display * VBOXGLXENTRYTAG(glXGetCurrentDisplay)(void) ;
|
---|
71 | extern const char * VBOXGLXENTRYTAG(glXQueryServerString)(Display *dpy, int screen, int name) ;
|
---|
72 | extern GLXContext VBOXGLXENTRYTAG(glXCreateContext)(Display *dpy, XVisualInfo *vis, GLXContext share, Bool direct) ;
|
---|
73 | extern int VBOXGLXENTRYTAG(glXGetConfig)(Display *dpy, XVisualInfo *vis, int attrib, int *value) ;
|
---|
74 | extern void VBOXGLXENTRYTAG(glXWaitX)(void) ;
|
---|
75 | extern GLXContext VBOXGLXENTRYTAG(glXGetCurrentContext)(void) ;
|
---|
76 | extern const char * VBOXGLXENTRYTAG(glXGetClientString)(Display *dpy, int name) ;
|
---|
77 | extern Bool VBOXGLXENTRYTAG(glXMakeCurrent)(Display *dpy, GLXDrawable drawable, GLXContext ctx) ;
|
---|
78 | extern void VBOXGLXENTRYTAG(glXDestroyContext)(Display *dpy, GLXContext ctx) ;
|
---|
79 | extern CR_GLXFuncPtr VBOXGLXENTRYTAG(glXGetProcAddressARB)(const GLubyte *name) ;
|
---|
80 | extern void VBOXGLXENTRYTAG(glXDestroyGLXPixmap)(Display *dpy, GLXPixmap pix) ;
|
---|
81 | extern Bool VBOXGLXENTRYTAG(glXQueryVersion)(Display *dpy, int *major, int *minor) ;
|
---|
82 | extern XVisualInfo * VBOXGLXENTRYTAG(glXChooseVisual)(Display *dpy, int screen, int *attribList) ;
|
---|
83 | extern const char * VBOXGLXENTRYTAG(glXQueryExtensionsString)(Display *dpy, int screen) ;
|
---|
84 | extern GLXPbufferSGIX VBOXGLXENTRYTAG(glXCreateGLXPbufferSGIX)(Display *dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int *attrib_list);
|
---|
85 | extern int VBOXGLXENTRYTAG(glXQueryGLXPbufferSGIX)(Display *dpy, GLXPbuffer pbuf, int attribute, unsigned int *value);
|
---|
86 | extern GLXFBConfigSGIX * VBOXGLXENTRYTAG(glXChooseFBConfigSGIX)(Display *dpy, int screen, int *attrib_list, int *nelements);
|
---|
87 | extern void VBOXGLXENTRYTAG(glXDestroyGLXPbufferSGIX)(Display *dpy, GLXPbuffer pbuf) ;
|
---|
88 | extern void VBOXGLXENTRYTAG(glXSelectEventSGIX)(Display *dpy, GLXDrawable drawable, unsigned long mask) ;
|
---|
89 | extern void VBOXGLXENTRYTAG(glXGetSelectedEventSGIX)(Display *dpy, GLXDrawable drawable, unsigned long *mask) ;
|
---|
90 | extern GLXFBConfigSGIX VBOXGLXENTRYTAG(glXGetFBConfigFromVisualSGIX)(Display *dpy, XVisualInfo *vis) ;
|
---|
91 | extern XVisualInfo * VBOXGLXENTRYTAG(glXGetVisualFromFBConfigSGIX)(Display *dpy, GLXFBConfig config) ;
|
---|
92 | extern GLXContext VBOXGLXENTRYTAG(glXCreateContextWithConfigSGIX)(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
---|
93 | extern GLXPixmap VBOXGLXENTRYTAG(glXCreateGLXPixmapWithConfigSGIX)(Display *dpy, GLXFBConfig config, Pixmap pixmap) ;
|
---|
94 | extern int VBOXGLXENTRYTAG(glXGetFBConfigAttribSGIX)(Display *dpy, GLXFBConfig config, int attribute, int *value) ;
|
---|
95 | extern GLXFBConfig * VBOXGLXENTRYTAG(glXChooseFBConfig)(Display *dpy, int screen, ATTRIB_TYPE *attrib_list, int *nelements) ;
|
---|
96 | extern GLXPbuffer VBOXGLXENTRYTAG(glXCreatePbuffer)(Display *dpy, GLXFBConfig config, ATTRIB_TYPE *attrib_list) ;
|
---|
97 | extern GLXPixmap VBOXGLXENTRYTAG(glXCreatePixmap)(Display *dpy, GLXFBConfig config, Pixmap pixmap, const ATTRIB_TYPE *attrib_list) ;
|
---|
98 | extern GLXWindow VBOXGLXENTRYTAG(glXCreateWindow)(Display *dpy, GLXFBConfig config, Window win, ATTRIB_TYPE *attrib_list) ;
|
---|
99 | extern GLXContext VBOXGLXENTRYTAG(glXCreateNewContext)(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
---|
100 | extern void VBOXGLXENTRYTAG(glXDestroyPbuffer)(Display *dpy, GLXPbuffer pbuf) ;
|
---|
101 | extern void VBOXGLXENTRYTAG(glXDestroyPixmap)(Display *dpy, GLXPixmap pixmap) ;
|
---|
102 | extern void VBOXGLXENTRYTAG(glXDestroyWindow)(Display *dpy, GLXWindow win) ;
|
---|
103 | extern GLXDrawable VBOXGLXENTRYTAG(glXGetCurrentReadDrawable)(void) ;
|
---|
104 | extern int VBOXGLXENTRYTAG(glXGetFBConfigAttrib)(Display *dpy, GLXFBConfig config, int attribute, int *value) ;
|
---|
105 | extern GLXFBConfig * VBOXGLXENTRYTAG(glXGetFBConfigs)(Display *dpy, int screen, int *nelements) ;
|
---|
106 | extern void VBOXGLXENTRYTAG(glXGetSelectedEvent)(Display *dpy, GLXDrawable draw, unsigned long *event_mask) ;
|
---|
107 | extern XVisualInfo * VBOXGLXENTRYTAG(glXGetVisualFromFBConfig)(Display *dpy, GLXFBConfig config) ;
|
---|
108 | extern Bool VBOXGLXENTRYTAG(glXMakeContextCurrent)(Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx) ;
|
---|
109 | extern int VBOXGLXENTRYTAG(glXQueryContext)(Display *dpy, GLXContext ctx, int attribute, int *value) ;
|
---|
110 | extern void VBOXGLXENTRYTAG(glXQueryDrawable)(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value) ;
|
---|
111 | extern void VBOXGLXENTRYTAG(glXSelectEvent)(Display *dpy, GLXDrawable draw, unsigned long event_mask) ;
|
---|
112 | #else
|
---|
113 | /* Extern declarations for our asm stubs */
|
---|
114 | # define GLXAPI_ENTRY(Func) \
|
---|
115 | extern void vbox_glX##Func;\
|
---|
116 | extern void vbox_glX##Func##_EndProc;
|
---|
117 | # include "fakedri_glxfuncsList.h"
|
---|
118 | # undef GLXAPI_ENTRY
|
---|
119 | #endif
|
---|
120 |
|
---|
121 | #endif /* ___CROPENGL_FAKEDRIDRV_H */
|
---|
122 |
|
---|