glapi: Store static dispatch offsets in a separate table
[mesa.git] / src / mapi / glapi / gen / static_data.py
1 #!/usr/bin/env python
2
3 # Copyright (C) 2015 Intel Corporation
4 #
5 # Permission is hereby granted, free of charge, to any person obtaining a
6 # copy of this software and associated documentation files (the "Software"),
7 # to deal in the Software without restriction, including without limitation
8 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 # and/or sell copies of the Software, and to permit persons to whom the
10 # Software is furnished to do so, subject to the following conditions:
11 #
12 # The above copyright notice and this permission notice (including the next
13 # paragraph) shall be included in all copies or substantial portions of the
14 # Software.
15 #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 # IN THE SOFTWARE.
23
24 """Table of functions that have ABI-mandated offsets in the dispatch table.
25
26 This list will never change."""
27 offsets = {
28 "NewList": 0,
29 "EndList": 1,
30 "CallList": 2,
31 "CallLists": 3,
32 "DeleteLists": 4,
33 "GenLists": 5,
34 "ListBase": 6,
35 "Begin": 7,
36 "Bitmap": 8,
37 "Color3b": 9,
38 "Color3bv": 10,
39 "Color3d": 11,
40 "Color3dv": 12,
41 "Color3f": 13,
42 "Color3fv": 14,
43 "Color3i": 15,
44 "Color3iv": 16,
45 "Color3s": 17,
46 "Color3sv": 18,
47 "Color3ub": 19,
48 "Color3ubv": 20,
49 "Color3ui": 21,
50 "Color3uiv": 22,
51 "Color3us": 23,
52 "Color3usv": 24,
53 "Color4b": 25,
54 "Color4bv": 26,
55 "Color4d": 27,
56 "Color4dv": 28,
57 "Color4f": 29,
58 "Color4fv": 30,
59 "Color4i": 31,
60 "Color4iv": 32,
61 "Color4s": 33,
62 "Color4sv": 34,
63 "Color4ub": 35,
64 "Color4ubv": 36,
65 "Color4ui": 37,
66 "Color4uiv": 38,
67 "Color4us": 39,
68 "Color4usv": 40,
69 "EdgeFlag": 41,
70 "EdgeFlagv": 42,
71 "End": 43,
72 "Indexd": 44,
73 "Indexdv": 45,
74 "Indexf": 46,
75 "Indexfv": 47,
76 "Indexi": 48,
77 "Indexiv": 49,
78 "Indexs": 50,
79 "Indexsv": 51,
80 "Normal3b": 52,
81 "Normal3bv": 53,
82 "Normal3d": 54,
83 "Normal3dv": 55,
84 "Normal3f": 56,
85 "Normal3fv": 57,
86 "Normal3i": 58,
87 "Normal3iv": 59,
88 "Normal3s": 60,
89 "Normal3sv": 61,
90 "RasterPos2d": 62,
91 "RasterPos2dv": 63,
92 "RasterPos2f": 64,
93 "RasterPos2fv": 65,
94 "RasterPos2i": 66,
95 "RasterPos2iv": 67,
96 "RasterPos2s": 68,
97 "RasterPos2sv": 69,
98 "RasterPos3d": 70,
99 "RasterPos3dv": 71,
100 "RasterPos3f": 72,
101 "RasterPos3fv": 73,
102 "RasterPos3i": 74,
103 "RasterPos3iv": 75,
104 "RasterPos3s": 76,
105 "RasterPos3sv": 77,
106 "RasterPos4d": 78,
107 "RasterPos4dv": 79,
108 "RasterPos4f": 80,
109 "RasterPos4fv": 81,
110 "RasterPos4i": 82,
111 "RasterPos4iv": 83,
112 "RasterPos4s": 84,
113 "RasterPos4sv": 85,
114 "Rectd": 86,
115 "Rectdv": 87,
116 "Rectf": 88,
117 "Rectfv": 89,
118 "Recti": 90,
119 "Rectiv": 91,
120 "Rects": 92,
121 "Rectsv": 93,
122 "TexCoord1d": 94,
123 "TexCoord1dv": 95,
124 "TexCoord1f": 96,
125 "TexCoord1fv": 97,
126 "TexCoord1i": 98,
127 "TexCoord1iv": 99,
128 "TexCoord1s": 100,
129 "TexCoord1sv": 101,
130 "TexCoord2d": 102,
131 "TexCoord2dv": 103,
132 "TexCoord2f": 104,
133 "TexCoord2fv": 105,
134 "TexCoord2i": 106,
135 "TexCoord2iv": 107,
136 "TexCoord2s": 108,
137 "TexCoord2sv": 109,
138 "TexCoord3d": 110,
139 "TexCoord3dv": 111,
140 "TexCoord3f": 112,
141 "TexCoord3fv": 113,
142 "TexCoord3i": 114,
143 "TexCoord3iv": 115,
144 "TexCoord3s": 116,
145 "TexCoord3sv": 117,
146 "TexCoord4d": 118,
147 "TexCoord4dv": 119,
148 "TexCoord4f": 120,
149 "TexCoord4fv": 121,
150 "TexCoord4i": 122,
151 "TexCoord4iv": 123,
152 "TexCoord4s": 124,
153 "TexCoord4sv": 125,
154 "Vertex2d": 126,
155 "Vertex2dv": 127,
156 "Vertex2f": 128,
157 "Vertex2fv": 129,
158 "Vertex2i": 130,
159 "Vertex2iv": 131,
160 "Vertex2s": 132,
161 "Vertex2sv": 133,
162 "Vertex3d": 134,
163 "Vertex3dv": 135,
164 "Vertex3f": 136,
165 "Vertex3fv": 137,
166 "Vertex3i": 138,
167 "Vertex3iv": 139,
168 "Vertex3s": 140,
169 "Vertex3sv": 141,
170 "Vertex4d": 142,
171 "Vertex4dv": 143,
172 "Vertex4f": 144,
173 "Vertex4fv": 145,
174 "Vertex4i": 146,
175 "Vertex4iv": 147,
176 "Vertex4s": 148,
177 "Vertex4sv": 149,
178 "ClipPlane": 150,
179 "ColorMaterial": 151,
180 "CullFace": 152,
181 "Fogf": 153,
182 "Fogfv": 154,
183 "Fogi": 155,
184 "Fogiv": 156,
185 "FrontFace": 157,
186 "Hint": 158,
187 "Lightf": 159,
188 "Lightfv": 160,
189 "Lighti": 161,
190 "Lightiv": 162,
191 "LightModelf": 163,
192 "LightModelfv": 164,
193 "LightModeli": 165,
194 "LightModeliv": 166,
195 "LineStipple": 167,
196 "LineWidth": 168,
197 "Materialf": 169,
198 "Materialfv": 170,
199 "Materiali": 171,
200 "Materialiv": 172,
201 "PointSize": 173,
202 "PolygonMode": 174,
203 "PolygonStipple": 175,
204 "Scissor": 176,
205 "ShadeModel": 177,
206 "TexParameterf": 178,
207 "TexParameterfv": 179,
208 "TexParameteri": 180,
209 "TexParameteriv": 181,
210 "TexImage1D": 182,
211 "TexImage2D": 183,
212 "TexEnvf": 184,
213 "TexEnvfv": 185,
214 "TexEnvi": 186,
215 "TexEnviv": 187,
216 "TexGend": 188,
217 "TexGendv": 189,
218 "TexGenf": 190,
219 "TexGenfv": 191,
220 "TexGeni": 192,
221 "TexGeniv": 193,
222 "FeedbackBuffer": 194,
223 "SelectBuffer": 195,
224 "RenderMode": 196,
225 "InitNames": 197,
226 "LoadName": 198,
227 "PassThrough": 199,
228 "PopName": 200,
229 "PushName": 201,
230 "DrawBuffer": 202,
231 "Clear": 203,
232 "ClearAccum": 204,
233 "ClearIndex": 205,
234 "ClearColor": 206,
235 "ClearStencil": 207,
236 "ClearDepth": 208,
237 "StencilMask": 209,
238 "ColorMask": 210,
239 "DepthMask": 211,
240 "IndexMask": 212,
241 "Accum": 213,
242 "Disable": 214,
243 "Enable": 215,
244 "Finish": 216,
245 "Flush": 217,
246 "PopAttrib": 218,
247 "PushAttrib": 219,
248 "Map1d": 220,
249 "Map1f": 221,
250 "Map2d": 222,
251 "Map2f": 223,
252 "MapGrid1d": 224,
253 "MapGrid1f": 225,
254 "MapGrid2d": 226,
255 "MapGrid2f": 227,
256 "EvalCoord1d": 228,
257 "EvalCoord1dv": 229,
258 "EvalCoord1f": 230,
259 "EvalCoord1fv": 231,
260 "EvalCoord2d": 232,
261 "EvalCoord2dv": 233,
262 "EvalCoord2f": 234,
263 "EvalCoord2fv": 235,
264 "EvalMesh1": 236,
265 "EvalPoint1": 237,
266 "EvalMesh2": 238,
267 "EvalPoint2": 239,
268 "AlphaFunc": 240,
269 "BlendFunc": 241,
270 "LogicOp": 242,
271 "StencilFunc": 243,
272 "StencilOp": 244,
273 "DepthFunc": 245,
274 "PixelZoom": 246,
275 "PixelTransferf": 247,
276 "PixelTransferi": 248,
277 "PixelStoref": 249,
278 "PixelStorei": 250,
279 "PixelMapfv": 251,
280 "PixelMapuiv": 252,
281 "PixelMapusv": 253,
282 "ReadBuffer": 254,
283 "CopyPixels": 255,
284 "ReadPixels": 256,
285 "DrawPixels": 257,
286 "GetBooleanv": 258,
287 "GetClipPlane": 259,
288 "GetDoublev": 260,
289 "GetError": 261,
290 "GetFloatv": 262,
291 "GetIntegerv": 263,
292 "GetLightfv": 264,
293 "GetLightiv": 265,
294 "GetMapdv": 266,
295 "GetMapfv": 267,
296 "GetMapiv": 268,
297 "GetMaterialfv": 269,
298 "GetMaterialiv": 270,
299 "GetPixelMapfv": 271,
300 "GetPixelMapuiv": 272,
301 "GetPixelMapusv": 273,
302 "GetPolygonStipple": 274,
303 "GetString": 275,
304 "GetTexEnvfv": 276,
305 "GetTexEnviv": 277,
306 "GetTexGendv": 278,
307 "GetTexGenfv": 279,
308 "GetTexGeniv": 280,
309 "GetTexImage": 281,
310 "GetTexParameterfv": 282,
311 "GetTexParameteriv": 283,
312 "GetTexLevelParameterfv": 284,
313 "GetTexLevelParameteriv": 285,
314 "IsEnabled": 286,
315 "IsList": 287,
316 "DepthRange": 288,
317 "Frustum": 289,
318 "LoadIdentity": 290,
319 "LoadMatrixf": 291,
320 "LoadMatrixd": 292,
321 "MatrixMode": 293,
322 "MultMatrixf": 294,
323 "MultMatrixd": 295,
324 "Ortho": 296,
325 "PopMatrix": 297,
326 "PushMatrix": 298,
327 "Rotated": 299,
328 "Rotatef": 300,
329 "Scaled": 301,
330 "Scalef": 302,
331 "Translated": 303,
332 "Translatef": 304,
333 "Viewport": 305,
334 "ArrayElement": 306,
335 "ColorPointer": 308,
336 "DisableClientState": 309,
337 "DrawArrays": 310,
338 "DrawElements": 311,
339 "EdgeFlagPointer": 312,
340 "EnableClientState": 313,
341 "GetPointerv": 329,
342 "IndexPointer": 314,
343 "InterleavedArrays": 317,
344 "NormalPointer": 318,
345 "TexCoordPointer": 320,
346 "VertexPointer": 321,
347 "PolygonOffset": 319,
348 "CopyTexImage1D": 323,
349 "CopyTexImage2D": 324,
350 "CopyTexSubImage1D": 325,
351 "CopyTexSubImage2D": 326,
352 "TexSubImage1D": 332,
353 "TexSubImage2D": 333,
354 "AreTexturesResident": 322,
355 "BindTexture": 307,
356 "DeleteTextures": 327,
357 "GenTextures": 328,
358 "IsTexture": 330,
359 "PrioritizeTextures": 331,
360 "Indexub": 315,
361 "Indexubv": 316,
362 "PopClientAttrib": 334,
363 "PushClientAttrib": 335,
364 "BlendColor": 336,
365 "BlendEquation": 337,
366 "DrawRangeElements": 338,
367 "ColorTable": 339,
368 "ColorTableParameterfv": 340,
369 "ColorTableParameteriv": 341,
370 "CopyColorTable": 342,
371 "GetColorTable": 343,
372 "GetColorTableParameterfv": 344,
373 "GetColorTableParameteriv": 345,
374 "ColorSubTable": 346,
375 "CopyColorSubTable": 347,
376 "ConvolutionFilter1D": 348,
377 "ConvolutionFilter2D": 349,
378 "ConvolutionParameterf": 350,
379 "ConvolutionParameterfv": 351,
380 "ConvolutionParameteri": 352,
381 "ConvolutionParameteriv": 353,
382 "CopyConvolutionFilter1D": 354,
383 "CopyConvolutionFilter2D": 355,
384 "GetConvolutionFilter": 356,
385 "GetConvolutionParameterfv": 357,
386 "GetConvolutionParameteriv": 358,
387 "GetSeparableFilter": 359,
388 "SeparableFilter2D": 360,
389 "GetHistogram": 361,
390 "GetHistogramParameterfv": 362,
391 "GetHistogramParameteriv": 363,
392 "GetMinmax": 364,
393 "GetMinmaxParameterfv": 365,
394 "GetMinmaxParameteriv": 366,
395 "Histogram": 367,
396 "Minmax": 368,
397 "ResetHistogram": 369,
398 "ResetMinmax": 370,
399 "TexImage3D": 371,
400 "TexSubImage3D": 372,
401 "CopyTexSubImage3D": 373,
402 "ActiveTexture": 374,
403 "ClientActiveTexture": 375,
404 "MultiTexCoord1d": 376,
405 "MultiTexCoord1dv": 377,
406 "MultiTexCoord1fARB": 378,
407 "MultiTexCoord1fvARB": 379,
408 "MultiTexCoord1i": 380,
409 "MultiTexCoord1iv": 381,
410 "MultiTexCoord1s": 382,
411 "MultiTexCoord1sv": 383,
412 "MultiTexCoord2d": 384,
413 "MultiTexCoord2dv": 385,
414 "MultiTexCoord2fARB": 386,
415 "MultiTexCoord2fvARB": 387,
416 "MultiTexCoord2i": 388,
417 "MultiTexCoord2iv": 389,
418 "MultiTexCoord2s": 390,
419 "MultiTexCoord2sv": 391,
420 "MultiTexCoord3d": 392,
421 "MultiTexCoord3dv": 393,
422 "MultiTexCoord3fARB": 394,
423 "MultiTexCoord3fvARB": 395,
424 "MultiTexCoord3i": 396,
425 "MultiTexCoord3iv": 397,
426 "MultiTexCoord3s": 398,
427 "MultiTexCoord3sv": 399,
428 "MultiTexCoord4d": 400,
429 "MultiTexCoord4dv": 401,
430 "MultiTexCoord4fARB": 402,
431 "MultiTexCoord4fvARB": 403,
432 "MultiTexCoord4i": 404,
433 "MultiTexCoord4iv": 405,
434 "MultiTexCoord4s": 406,
435 "MultiTexCoord4sv": 407
436 }