~ubuntu-branches/ubuntu/raring/mesa/raring-proposed

« back to all changes in this revision

Viewing changes to src/mapi/glapi/gen/mesadef.py

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen, Timo Aaltonen, Maarten Lankhorst
  • Date: 2013-04-16 15:35:32 UTC
  • mfrom: (1.7.15)
  • Revision ID: package-import@ubuntu.com-20130416153532-1u9s6vb32cqryh4x
Tags: 9.1.1-0ubuntu1
[ Timo Aaltonen ]
* Merge from unreleased debian git
  - new upstream release (LP: #1112147, #1164093)
* Revert a commit to fix slow blur on intel.
* vbo-fix-crash.diff: Patch from the stable tree that fixes a crasher
  with shared display lists.

[ Maarten Lankhorst ]
* Add some more patches to fix image copy regressions on nouveau.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
 
42
42
def PrintHead():
43
 
        print '; DO NOT EDIT - This file generated automatically by mesadef.py script'
44
 
        print 'DESCRIPTION \'Mesa (OpenGL work-alike) for Win32\''
45
 
        print 'VERSION 6.0'
46
 
        print ';'
47
 
        print '; Module definition file for Mesa (OPENGL32.DLL)'
48
 
        print ';'
49
 
        print '; Note: The OpenGL functions use the STDCALL'
50
 
        print '; function calling convention.  Microsoft\'s'
51
 
        print '; OPENGL32 uses this convention and so must the'
52
 
        print '; Mesa OPENGL32 so that the Mesa DLL can be used'
53
 
        print '; as a drop-in replacement.'
54
 
        print ';'
55
 
        print '; The linker exports STDCALL entry points with'
56
 
        print '; \'decorated\' names; e.g., _glBegin@0, where the'
57
 
        print '; trailing number is the number of bytes of '
58
 
        print '; parameter data pushed onto the stack.  The'
59
 
        print '; callee is responsible for popping this data'
60
 
        print '; off the stack, usually via a RETF n instruction.'
61
 
        print ';'
62
 
        print '; However, the Microsoft OPENGL32.DLL does not export'
63
 
        print '; the decorated names, even though the calling convention'
64
 
        print '; is STDCALL.  So, this module definition file is'
65
 
        print '; needed to force the Mesa OPENGL32.DLL to export the'
66
 
        print '; symbols in the same manner as the Microsoft DLL.'
67
 
        print '; Were it not for this problem, this file would not'
68
 
        print '; be needed (for the gl* functions) since the entry'
69
 
        print '; points are compiled with dllexport declspec.'
70
 
        print ';'
71
 
        print '; However, this file is still needed to export "internal"'
72
 
        print '; Mesa symbols for the benefit of the OSMESA32.DLL.'
73
 
        print ';'
74
 
        print 'EXPORTS'
75
 
        return
 
43
    print '; DO NOT EDIT - This file generated automatically by mesadef.py script'
 
44
    print 'DESCRIPTION \'Mesa (OpenGL work-alike) for Win32\''
 
45
    print 'VERSION 6.0'
 
46
    print ';'
 
47
    print '; Module definition file for Mesa (OPENGL32.DLL)'
 
48
    print ';'
 
49
    print '; Note: The OpenGL functions use the STDCALL'
 
50
    print '; function calling convention.  Microsoft\'s'
 
51
    print '; OPENGL32 uses this convention and so must the'
 
52
    print '; Mesa OPENGL32 so that the Mesa DLL can be used'
 
53
    print '; as a drop-in replacement.'
 
54
    print ';'
 
55
    print '; The linker exports STDCALL entry points with'
 
56
    print '; \'decorated\' names; e.g., _glBegin@0, where the'
 
57
    print '; trailing number is the number of bytes of '
 
58
    print '; parameter data pushed onto the stack.  The'
 
59
    print '; callee is responsible for popping this data'
 
60
    print '; off the stack, usually via a RETF n instruction.'
 
61
    print ';'
 
62
    print '; However, the Microsoft OPENGL32.DLL does not export'
 
63
    print '; the decorated names, even though the calling convention'
 
64
    print '; is STDCALL.  So, this module definition file is'
 
65
    print '; needed to force the Mesa OPENGL32.DLL to export the'
 
66
    print '; symbols in the same manner as the Microsoft DLL.'
 
67
    print '; Were it not for this problem, this file would not'
 
68
    print '; be needed (for the gl* functions) since the entry'
 
69
    print '; points are compiled with dllexport declspec.'
 
70
    print ';'
 
71
    print '; However, this file is still needed to export "internal"'
 
72
    print '; Mesa symbols for the benefit of the OSMESA32.DLL.'
 
73
    print ';'
 
74
    print 'EXPORTS'
 
75
    return
76
76
#enddef
77
77
 
78
78
 
79
79
def PrintTail():
80
 
        print ';'
81
 
        print '; WGL API'
82
 
        print '\twglChoosePixelFormat'
83
 
        print '\twglCopyContext'
84
 
        print '\twglCreateContext'
85
 
        print '\twglCreateLayerContext'
86
 
        print '\twglDeleteContext'
87
 
        print '\twglDescribeLayerPlane'
88
 
        print '\twglDescribePixelFormat'
89
 
        print '\twglGetCurrentContext'
90
 
        print '\twglGetCurrentDC'
91
 
        print '\twglGetExtensionsStringARB'
92
 
        print '\twglGetLayerPaletteEntries'
93
 
        print '\twglGetPixelFormat'
94
 
        print '\twglGetProcAddress'
95
 
        print '\twglMakeCurrent'
96
 
        print '\twglRealizeLayerPalette'
97
 
        print '\twglSetLayerPaletteEntries'
98
 
        print '\twglSetPixelFormat'
99
 
        print '\twglShareLists'
100
 
        print '\twglSwapBuffers'
101
 
        print '\twglSwapLayerBuffers'
102
 
        print '\twglUseFontBitmapsA'
103
 
        print '\twglUseFontBitmapsW'
104
 
        print '\twglUseFontOutlinesA'
105
 
        print '\twglUseFontOutlinesW'
106
 
        print ';'
107
 
        print '; Mesa internals - mostly for OSMESA'
108
 
        print '\t_ac_CreateContext'
109
 
        print '\t_ac_DestroyContext'
110
 
        print '\t_ac_InvalidateState'
111
 
        print '\t_glapi_get_context'
112
 
        print '\t_glapi_get_proc_address'
113
 
        print '\t_mesa_buffer_data'
114
 
        print '\t_mesa_buffer_map'
115
 
        print '\t_mesa_buffer_subdata'
116
 
        print '\t_mesa_choose_tex_format'
117
 
        print '\t_mesa_compressed_texture_size'
118
 
        print '\t_mesa_create_framebuffer'
119
 
        print '\t_mesa_create_visual'
120
 
        print '\t_mesa_delete_buffer_object'
121
 
        print '\t_mesa_delete_texture_object'
122
 
        print '\t_mesa_destroy_framebuffer'
123
 
        print '\t_mesa_destroy_visual'
124
 
        print '\t_mesa_enable_1_3_extensions'
125
 
        print '\t_mesa_enable_1_4_extensions'
126
 
        print '\t_mesa_enable_1_5_extensions'
127
 
        print '\t_mesa_enable_sw_extensions'
128
 
        print '\t_mesa_error'
129
 
        print '\t_mesa_free_context_data'
130
 
        print '\t_mesa_get_current_context'
131
 
        print '\t_mesa_init_default_imports'
132
 
        print '\t_mesa_initialize_context'
133
 
        print '\t_mesa_make_current'
134
 
        print '\t_mesa_new_buffer_object'
135
 
        print '\t_mesa_new_texture_object'
136
 
        print '\t_mesa_problem'
137
 
        print '\t_mesa_ResizeBuffersMESA'
138
 
        print '\t_mesa_store_compressed_teximage1d'
139
 
        print '\t_mesa_store_compressed_teximage2d'
140
 
        print '\t_mesa_store_compressed_teximage3d'
141
 
        print '\t_mesa_store_compressed_texsubimage1d'
142
 
        print '\t_mesa_store_compressed_texsubimage2d'
143
 
        print '\t_mesa_store_compressed_texsubimage3d'
144
 
        print '\t_mesa_store_teximage1d'
145
 
        print '\t_mesa_store_teximage2d'
146
 
        print '\t_mesa_store_teximage3d'
147
 
        print '\t_mesa_store_texsubimage1d'
148
 
        print '\t_mesa_store_texsubimage2d'
149
 
        print '\t_mesa_store_texsubimage3d'
150
 
        print '\t_mesa_test_proxy_teximage'
151
 
        print '\t_mesa_Viewport'
152
 
        print '\t_mesa_meta_CopyColorSubTable'
153
 
        print '\t_mesa_meta_CopyColorTable'
154
 
        print '\t_mesa_meta_CopyConvolutionFilter1D'
155
 
        print '\t_mesa_meta_CopyConvolutionFilter2D'
156
 
        print '\t_mesa_meta_CopyTexImage1D'
157
 
        print '\t_mesa_meta_CopyTexImage2D'
158
 
        print '\t_mesa_meta_CopyTexSubImage1D'
159
 
        print '\t_mesa_meta_CopyTexSubImage2D'
160
 
        print '\t_mesa_meta_CopyTexSubImage3D'
161
 
        print '\t_swrast_Accum'
162
 
        print '\t_swrast_alloc_buffers'
163
 
        print '\t_swrast_Bitmap'
164
 
        print '\t_swrast_CopyPixels'
165
 
        print '\t_swrast_DrawPixels'
166
 
        print '\t_swrast_GetDeviceDriverReference'
167
 
        print '\t_swrast_Clear'
168
 
        print '\t_swrast_choose_line'
169
 
        print '\t_swrast_choose_triangle'
170
 
        print '\t_swrast_CreateContext'
171
 
        print '\t_swrast_DestroyContext'
172
 
        print '\t_swrast_InvalidateState'
173
 
        print '\t_swrast_ReadPixels'
174
 
        print '\t_swrast_zbuffer_address'
175
 
        print '\t_swsetup_Wakeup'
176
 
        print '\t_swsetup_CreateContext'
177
 
        print '\t_swsetup_DestroyContext'
178
 
        print '\t_swsetup_InvalidateState'
179
 
        print '\t_tnl_CreateContext'
180
 
        print '\t_tnl_DestroyContext'
181
 
        print '\t_tnl_InvalidateState'
182
 
        print '\t_tnl_MakeCurrent'
183
 
        print '\t_tnl_run_pipeline'
 
80
    print ';'
 
81
    print '; WGL API'
 
82
    print '\twglChoosePixelFormat'
 
83
    print '\twglCopyContext'
 
84
    print '\twglCreateContext'
 
85
    print '\twglCreateLayerContext'
 
86
    print '\twglDeleteContext'
 
87
    print '\twglDescribeLayerPlane'
 
88
    print '\twglDescribePixelFormat'
 
89
    print '\twglGetCurrentContext'
 
90
    print '\twglGetCurrentDC'
 
91
    print '\twglGetExtensionsStringARB'
 
92
    print '\twglGetLayerPaletteEntries'
 
93
    print '\twglGetPixelFormat'
 
94
    print '\twglGetProcAddress'
 
95
    print '\twglMakeCurrent'
 
96
    print '\twglRealizeLayerPalette'
 
97
    print '\twglSetLayerPaletteEntries'
 
98
    print '\twglSetPixelFormat'
 
99
    print '\twglShareLists'
 
100
    print '\twglSwapBuffers'
 
101
    print '\twglSwapLayerBuffers'
 
102
    print '\twglUseFontBitmapsA'
 
103
    print '\twglUseFontBitmapsW'
 
104
    print '\twglUseFontOutlinesA'
 
105
    print '\twglUseFontOutlinesW'
 
106
    print ';'
 
107
    print '; Mesa internals - mostly for OSMESA'
 
108
    print '\t_ac_CreateContext'
 
109
    print '\t_ac_DestroyContext'
 
110
    print '\t_ac_InvalidateState'
 
111
    print '\t_glapi_get_context'
 
112
    print '\t_glapi_get_proc_address'
 
113
    print '\t_mesa_buffer_data'
 
114
    print '\t_mesa_buffer_map'
 
115
    print '\t_mesa_buffer_subdata'
 
116
    print '\t_mesa_choose_tex_format'
 
117
    print '\t_mesa_compressed_texture_size'
 
118
    print '\t_mesa_create_framebuffer'
 
119
    print '\t_mesa_create_visual'
 
120
    print '\t_mesa_delete_buffer_object'
 
121
    print '\t_mesa_delete_texture_object'
 
122
    print '\t_mesa_destroy_framebuffer'
 
123
    print '\t_mesa_destroy_visual'
 
124
    print '\t_mesa_enable_1_3_extensions'
 
125
    print '\t_mesa_enable_1_4_extensions'
 
126
    print '\t_mesa_enable_1_5_extensions'
 
127
    print '\t_mesa_enable_sw_extensions'
 
128
    print '\t_mesa_error'
 
129
    print '\t_mesa_free_context_data'
 
130
    print '\t_mesa_get_current_context'
 
131
    print '\t_mesa_init_default_imports'
 
132
    print '\t_mesa_initialize_context'
 
133
    print '\t_mesa_make_current'
 
134
    print '\t_mesa_new_buffer_object'
 
135
    print '\t_mesa_new_texture_object'
 
136
    print '\t_mesa_problem'
 
137
    print '\t_mesa_ResizeBuffersMESA'
 
138
    print '\t_mesa_store_compressed_teximage1d'
 
139
    print '\t_mesa_store_compressed_teximage2d'
 
140
    print '\t_mesa_store_compressed_teximage3d'
 
141
    print '\t_mesa_store_compressed_texsubimage1d'
 
142
    print '\t_mesa_store_compressed_texsubimage2d'
 
143
    print '\t_mesa_store_compressed_texsubimage3d'
 
144
    print '\t_mesa_store_teximage1d'
 
145
    print '\t_mesa_store_teximage2d'
 
146
    print '\t_mesa_store_teximage3d'
 
147
    print '\t_mesa_store_texsubimage1d'
 
148
    print '\t_mesa_store_texsubimage2d'
 
149
    print '\t_mesa_store_texsubimage3d'
 
150
    print '\t_mesa_test_proxy_teximage'
 
151
    print '\t_mesa_Viewport'
 
152
    print '\t_mesa_meta_CopyColorSubTable'
 
153
    print '\t_mesa_meta_CopyColorTable'
 
154
    print '\t_mesa_meta_CopyConvolutionFilter1D'
 
155
    print '\t_mesa_meta_CopyConvolutionFilter2D'
 
156
    print '\t_mesa_meta_CopyTexImage1D'
 
157
    print '\t_mesa_meta_CopyTexImage2D'
 
158
    print '\t_mesa_meta_CopyTexSubImage1D'
 
159
    print '\t_mesa_meta_CopyTexSubImage2D'
 
160
    print '\t_mesa_meta_CopyTexSubImage3D'
 
161
    print '\t_swrast_Accum'
 
162
    print '\t_swrast_alloc_buffers'
 
163
    print '\t_swrast_Bitmap'
 
164
    print '\t_swrast_CopyPixels'
 
165
    print '\t_swrast_DrawPixels'
 
166
    print '\t_swrast_GetDeviceDriverReference'
 
167
    print '\t_swrast_Clear'
 
168
    print '\t_swrast_choose_line'
 
169
    print '\t_swrast_choose_triangle'
 
170
    print '\t_swrast_CreateContext'
 
171
    print '\t_swrast_DestroyContext'
 
172
    print '\t_swrast_InvalidateState'
 
173
    print '\t_swrast_ReadPixels'
 
174
    print '\t_swrast_zbuffer_address'
 
175
    print '\t_swsetup_Wakeup'
 
176
    print '\t_swsetup_CreateContext'
 
177
    print '\t_swsetup_DestroyContext'
 
178
    print '\t_swsetup_InvalidateState'
 
179
    print '\t_tnl_CreateContext'
 
180
    print '\t_tnl_DestroyContext'
 
181
    print '\t_tnl_InvalidateState'
 
182
    print '\t_tnl_MakeCurrent'
 
183
    print '\t_tnl_run_pipeline'
184
184
#enddef
185
185
 
186
186
 
187
187
records = []
188
188
 
189
189
def FindOffset(funcName):
190
 
        for (name, alias, offset) in records:
191
 
                if name == funcName:
192
 
                        return offset
193
 
                #endif
194
 
        #endfor
195
 
        return -1
 
190
    for (name, alias, offset) in records:
 
191
        if name == funcName:
 
192
            return offset
 
193
        #endif
 
194
    #endfor
 
195
    return -1
196
196
#enddef
197
197
 
198
198
 
199
199
def EmitEntry(name, returnType, argTypeList, argNameList, alias, offset):
200
 
        if alias == '':
201
 
                dispatchName = name
202
 
        else:
203
 
                dispatchName = alias
204
 
        if offset < 0:
205
 
                offset = FindOffset(dispatchName)
206
 
        if offset >= 0 and string.find(name, "unused") == -1:
207
 
                print '\tgl%s' % (name)
208
 
                # save this info in case we need to look up an alias later
209
 
                records.append((name, dispatchName, offset))
 
200
    if alias == '':
 
201
        dispatchName = name
 
202
    else:
 
203
        dispatchName = alias
 
204
    if offset < 0:
 
205
        offset = FindOffset(dispatchName)
 
206
    if offset >= 0 and string.find(name, "unused") == -1:
 
207
        print '\tgl%s' % (name)
 
208
        # save this info in case we need to look up an alias later
 
209
        records.append((name, dispatchName, offset))
210
210
 
211
211
#enddef
212
212