diff options
Diffstat (limited to 'xorg-server/hw/xwin/glx')
-rw-r--r-- | xorg-server/hw/xwin/glx/gen_gl_wrappers.py | 45 | ||||
-rw-r--r-- | xorg-server/hw/xwin/glx/indirect.c | 2 |
2 files changed, 15 insertions, 32 deletions
diff --git a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py index 683b9d903..cdbba638a 100644 --- a/xorg-server/hw/xwin/glx/gen_gl_wrappers.py +++ b/xorg-server/hw/xwin/glx/gen_gl_wrappers.py @@ -43,35 +43,18 @@ thunkdefs=False staticwrappers=False nodebug=False -#exclude base WGL API -WinGDI={key: 1 for key in [ - "wglCopyContext" - ,"wglCreateContext" - ,"wglCreateLayerContext" - ,"wglDeleteContext" - ,"wglGetCurrentContext" - ,"wglGetCurrentDC" - ,"wglGetProcAddress" - ,"wglMakeCurrent" - ,"wglShareLists" - ,"wglUseFontBitmapsA" - ,"wglUseFontBitmapsW" - ,"wglUseFontBitmaps" - ,"SwapBuffers" - ,"wglUseFontOutlinesA" - ,"wglUseFontOutlinesW" - ,"wglUseFontOutlines" - ,"wglDescribeLayerPlane" - ,"wglSetLayerPaletteEntries" - ,"wglGetLayerPaletteEntries" - ,"wglRealizeLayerPalette" - ,"wglSwapLayerBuffers" - ,"wglSwapMultipleBuffers" - ,"ChoosePixelFormat" - ,"DescribePixelFormat" - ,"GetEnhMetaFilePixelFormat" - ,"GetPixelFormat" - ,"SetPixelFormat" +# list of WGL extension functions we use +used_wgl_ext_fns = {key: 1 for key in [ + "wglSwapIntervalEXT", + "wglGetExtensionsStringARB", + "wglDestroyPbufferARB", + "wglGetPbufferDCARB", + "wglReleasePbufferDCARB", + "wglCreatePbufferARB", + "wglMakeContextCurrentARB", + "wglChoosePixelFormatARB", + "wglGetPixelFormatAttribivARB", + "wglGetPixelFormatAttribivARB" ]} if __name__ == '__main__': @@ -162,7 +145,7 @@ class PreResolveOutputGenerator(OutputGenerator): def genCmd(self, cmd, name): OutputGenerator.genCmd(self, cmd, name) - if name in WinGDI: + if prefix == 'wgl' and not name in used_wgl_ext_fns: return self.outFile.write('RESOLVE_DECL(PFN' + name.upper() + 'PROC);\n') @@ -190,7 +173,7 @@ class WrapperOutputGenerator(OutputGenerator): def genCmd(self, cmd, name): OutputGenerator.genCmd(self, cmd, name) - if name in WinGDI: + if prefix == 'wgl' and not name in used_wgl_ext_fns: return proto=noneStr(cmd.elem.find('proto')) diff --git a/xorg-server/hw/xwin/glx/indirect.c b/xorg-server/hw/xwin/glx/indirect.c index f130651fb..690611428 100644 --- a/xorg-server/hw/xwin/glx/indirect.c +++ b/xorg-server/hw/xwin/glx/indirect.c @@ -1613,7 +1613,7 @@ glxWinCreateContext(__GLXscreen * screen, glxWinReleaseTexImage }; - context = (__GLXWinContext *) calloc(1, sizeof(__GLXWinContext)); + context = calloc(1, sizeof(__GLXWinContext)); if (!context) return NULL; |