[43111] | 1 | """
|
---|
[62520] | 2 | Copyright (C) 2009-2016 Oracle Corporation
|
---|
[18882] | 3 |
|
---|
[43111] | 4 | This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
| 5 | available from http://www.virtualbox.org. This file is free software;
|
---|
| 6 | you can redistribute it and/or modify it under the terms of the GNU
|
---|
| 7 | General Public License (GPL) as published by the Free Software
|
---|
| 8 | Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
| 9 | VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
| 10 | hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
| 11 | """
|
---|
| 12 |
|
---|
[18882] | 13 | import sys
|
---|
| 14 |
|
---|
| 15 | #Note, this should match the fakedri_glxfuncsList.h order
|
---|
| 16 | glx_functions = [
|
---|
| 17 | "CopyContext",
|
---|
| 18 | "UseXFont",
|
---|
| 19 | #"GetDriverConfig",
|
---|
| 20 | "GetProcAddress",
|
---|
| 21 | "QueryExtension",
|
---|
| 22 | "IsDirect",
|
---|
| 23 | "DestroyGLXPbufferSGIX",
|
---|
| 24 | "QueryGLXPbufferSGIX",
|
---|
| 25 | "CreateGLXPixmap",
|
---|
| 26 | "CreateGLXPixmapWithConfigSGIX",
|
---|
| 27 | "QueryContext",
|
---|
| 28 | "CreateContextWithConfigSGIX",
|
---|
| 29 | "SwapBuffers",
|
---|
| 30 | "CreateNewContext",
|
---|
| 31 | "SelectEventSGIX",
|
---|
| 32 | "GetCurrentDrawable",
|
---|
| 33 | "ChooseFBConfig",
|
---|
| 34 | "WaitGL",
|
---|
| 35 | "GetFBConfigs",
|
---|
| 36 | "CreatePixmap",
|
---|
| 37 | "GetSelectedEventSGIX",
|
---|
| 38 | "GetCurrentReadDrawable",
|
---|
| 39 | "GetCurrentDisplay",
|
---|
| 40 | "QueryServerString",
|
---|
| 41 | "CreateWindow",
|
---|
| 42 | "SelectEvent",
|
---|
| 43 | "GetVisualFromFBConfigSGIX",
|
---|
| 44 | "GetFBConfigFromVisualSGIX",
|
---|
| 45 | "QueryDrawable",
|
---|
| 46 | "CreateContext",
|
---|
| 47 | "GetConfig",
|
---|
| 48 | "CreateGLXPbufferSGIX",
|
---|
| 49 | "CreatePbuffer",
|
---|
| 50 | "ChooseFBConfigSGIX",
|
---|
| 51 | "WaitX",
|
---|
| 52 | "GetVisualFromFBConfig",
|
---|
| 53 | #"GetScreenDriver",
|
---|
| 54 | "GetFBConfigAttrib",
|
---|
| 55 | "GetCurrentContext",
|
---|
| 56 | "GetClientString",
|
---|
| 57 | "DestroyPixmap",
|
---|
| 58 | "MakeCurrent",
|
---|
| 59 | "DestroyContext",
|
---|
| 60 | "GetProcAddressARB",
|
---|
| 61 | "GetSelectedEvent",
|
---|
| 62 | "DestroyPbuffer",
|
---|
| 63 | "DestroyWindow",
|
---|
| 64 | "DestroyGLXPixmap",
|
---|
| 65 | "QueryVersion",
|
---|
| 66 | "ChooseVisual",
|
---|
| 67 | "MakeContextCurrent",
|
---|
| 68 | "QueryExtensionsString",
|
---|
[21248] | 69 | "GetFBConfigAttribSGIX",
|
---|
| 70 | "FreeMemoryMESA",
|
---|
| 71 | "QueryContextInfoEXT",
|
---|
| 72 | "ImportContextEXT",
|
---|
| 73 | "GetContextIDEXT",
|
---|
| 74 | "MakeCurrentReadSGI",
|
---|
| 75 | "AllocateMemoryMESA",
|
---|
| 76 | "GetMemoryOffsetMESA",
|
---|
| 77 | "CreateGLXPixmapMESA",
|
---|
| 78 | "GetCurrentDisplayEXT",
|
---|
| 79 | "FreeContextEXT"
|
---|
[18882] | 80 | ];
|
---|
| 81 |
|
---|
| 82 | print '%include "iprt/asmdefs.mac"'
|
---|
| 83 | print ""
|
---|
| 84 | print "%ifdef RT_ARCH_AMD64"
|
---|
| 85 | print "extern glxim"
|
---|
| 86 | print "%else ; X86"
|
---|
| 87 | print "extern glxim"
|
---|
| 88 | print "%endif"
|
---|
| 89 | print ""
|
---|
| 90 |
|
---|
| 91 | for index in range(len(glx_functions)):
|
---|
| 92 | func_name = glx_functions[index]
|
---|
| 93 |
|
---|
| 94 | print "BEGINPROC_EXPORTED vbox_glX%s" % func_name
|
---|
| 95 | print "%ifdef RT_ARCH_AMD64"
|
---|
| 96 | print "\tmov \trax, qword glxim+%d" % (8*index)
|
---|
| 97 | print "\tjmp \t[rax]"
|
---|
| 98 | print "%else ; X86"
|
---|
| 99 | print "\tmov \teax, dword glxim+%d" % (4*index)
|
---|
| 100 | print "\tjmp \t[eax]"
|
---|
| 101 | print "%endif"
|
---|
| 102 | print "ENDPROC vbox_glX%s" % func_name
|
---|
| 103 | print ""
|
---|
| 104 |
|
---|