OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """code generator for GL/GLES extension wrangler.""" | 6 """code generator for GL/GLES extension wrangler.""" |
7 | 7 |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import collections | 10 import collections |
(...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1368 'arguments': | 1368 'arguments': |
1369 'EGLDisplay dpy, EGLenum buftype, void* buffer, EGLConfig config, ' | 1369 'EGLDisplay dpy, EGLenum buftype, void* buffer, EGLConfig config, ' |
1370 'const EGLint* attrib_list', }, | 1370 'const EGLint* attrib_list', }, |
1371 { 'return_type': 'EGLSurface', | 1371 { 'return_type': 'EGLSurface', |
1372 'names': ['eglCreatePbufferSurface'], | 1372 'names': ['eglCreatePbufferSurface'], |
1373 'arguments': 'EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list', }, | 1373 'arguments': 'EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list', }, |
1374 { 'return_type': 'EGLSurface', | 1374 { 'return_type': 'EGLSurface', |
1375 'names': ['eglCreatePixmapSurface'], | 1375 'names': ['eglCreatePixmapSurface'], |
1376 'arguments': 'EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, ' | 1376 'arguments': 'EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, ' |
1377 'const EGLint* attrib_list', }, | 1377 'const EGLint* attrib_list', }, |
| 1378 { 'return_type': 'EGLStreamKHR', |
| 1379 'versions': [{ 'name': 'eglCreateStreamKHR', |
| 1380 'extensions': ['EGL_KHR_stream'] }], |
| 1381 'arguments': 'EGLDisplay dpy, const EGLint* attrib_list' }, |
| 1382 { 'return_type': 'EGLBoolean', |
| 1383 'versions': [{'name': 'eglCreateStreamProducerD3DTextureNV12ANGLE', |
| 1384 'extensions': |
| 1385 ['EGL_ANGLE_stream_producer_d3d_texture_nv12']}], |
| 1386 'arguments': |
| 1387 'EGLDisplay dpy, EGLStreamKHR stream, EGLAttrib* attrib_list', }, |
1378 { 'return_type': 'EGLSyncKHR', | 1388 { 'return_type': 'EGLSyncKHR', |
1379 'versions': [{ 'name': 'eglCreateSyncKHR', | 1389 'versions': [{ 'name': 'eglCreateSyncKHR', |
1380 'extensions': [ | 1390 'extensions': [ |
1381 'EGL_KHR_fence_sync', | 1391 'EGL_KHR_fence_sync', |
1382 'GL_CHROMIUM_egl_khr_fence_sync_hack' | 1392 'GL_CHROMIUM_egl_khr_fence_sync_hack' |
1383 ] }], | 1393 ] }], |
1384 'arguments': 'EGLDisplay dpy, EGLenum type, const EGLint* attrib_list' }, | 1394 'arguments': 'EGLDisplay dpy, EGLenum type, const EGLint* attrib_list' }, |
1385 { 'return_type': 'EGLSurface', | 1395 { 'return_type': 'EGLSurface', |
1386 'names': ['eglCreateWindowSurface'], | 1396 'names': ['eglCreateWindowSurface'], |
1387 'arguments': 'EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, ' | 1397 'arguments': 'EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, ' |
1388 'const EGLint* attrib_list', }, | 1398 'const EGLint* attrib_list', }, |
1389 { 'return_type': 'EGLBoolean', | 1399 { 'return_type': 'EGLBoolean', |
1390 'names': ['eglDestroyContext'], | 1400 'names': ['eglDestroyContext'], |
1391 'arguments': 'EGLDisplay dpy, EGLContext ctx', }, | 1401 'arguments': 'EGLDisplay dpy, EGLContext ctx', }, |
1392 { 'return_type': 'EGLBoolean', | 1402 { 'return_type': 'EGLBoolean', |
1393 'versions': [{ 'name' : 'eglDestroyImageKHR', | 1403 'versions': [{ 'name' : 'eglDestroyImageKHR', |
1394 'extensions': ['EGL_KHR_image_base'] }], | 1404 'extensions': ['EGL_KHR_image_base'] }], |
1395 'arguments': 'EGLDisplay dpy, EGLImageKHR image' }, | 1405 'arguments': 'EGLDisplay dpy, EGLImageKHR image' }, |
1396 { 'return_type': 'EGLBoolean', | 1406 { 'return_type': 'EGLBoolean', |
| 1407 'versions': [{ 'name': 'eglDestroyStreamKHR', |
| 1408 'extensions': ['EGL_KHR_stream'] }], |
| 1409 'arguments': 'EGLDisplay dpy, EGLStreamKHR stream' }, |
| 1410 { 'return_type': 'EGLBoolean', |
1397 'names': ['eglDestroySurface'], | 1411 'names': ['eglDestroySurface'], |
1398 'arguments': 'EGLDisplay dpy, EGLSurface surface', }, | 1412 'arguments': 'EGLDisplay dpy, EGLSurface surface', }, |
1399 { 'return_type': 'EGLBoolean', | 1413 { 'return_type': 'EGLBoolean', |
1400 'versions': [{ 'name': 'eglDestroySyncKHR', | 1414 'versions': [{ 'name': 'eglDestroySyncKHR', |
1401 'extensions': [ | 1415 'extensions': [ |
1402 'EGL_KHR_fence_sync', | 1416 'EGL_KHR_fence_sync', |
1403 'GL_CHROMIUM_egl_khr_fence_sync_hack' | 1417 'GL_CHROMIUM_egl_khr_fence_sync_hack' |
1404 ] }], | 1418 ] }], |
1405 'arguments': 'EGLDisplay dpy, EGLSyncKHR sync' }, | 1419 'arguments': 'EGLDisplay dpy, EGLSyncKHR sync' }, |
1406 { 'return_type': 'EGLBoolean', | 1420 { 'return_type': 'EGLBoolean', |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1460 'names': ['eglPostSubBufferNV'], | 1474 'names': ['eglPostSubBufferNV'], |
1461 'arguments': 'EGLDisplay dpy, EGLSurface surface, ' | 1475 'arguments': 'EGLDisplay dpy, EGLSurface surface, ' |
1462 'EGLint x, EGLint y, EGLint width, EGLint height', }, | 1476 'EGLint x, EGLint y, EGLint width, EGLint height', }, |
1463 { 'return_type': 'EGLenum', | 1477 { 'return_type': 'EGLenum', |
1464 'names': ['eglQueryAPI'], | 1478 'names': ['eglQueryAPI'], |
1465 'arguments': 'void', }, | 1479 'arguments': 'void', }, |
1466 { 'return_type': 'EGLBoolean', | 1480 { 'return_type': 'EGLBoolean', |
1467 'names': ['eglQueryContext'], | 1481 'names': ['eglQueryContext'], |
1468 'arguments': | 1482 'arguments': |
1469 'EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value', }, | 1483 'EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value', }, |
| 1484 { 'return_type': 'EGLBoolean', |
| 1485 'versions': [{ 'name': 'eglQueryStreamKHR', |
| 1486 'extensions': ['EGL_KHR_stream'] }], |
| 1487 'arguments': |
| 1488 'EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, ' |
| 1489 'EGLint* value' }, |
| 1490 { 'return_type': 'EGLBoolean', |
| 1491 'versions': [{ 'name': 'eglQueryStreamu64KHR', |
| 1492 'extensions': ['EGL_KHR_stream'] }], |
| 1493 'arguments': |
| 1494 'EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, ' |
| 1495 'EGLuint64KHR* value' }, |
1470 { 'return_type': 'const char*', | 1496 { 'return_type': 'const char*', |
1471 'names': ['eglQueryString'], | 1497 'names': ['eglQueryString'], |
1472 'arguments': 'EGLDisplay dpy, EGLint name', }, | 1498 'arguments': 'EGLDisplay dpy, EGLint name', }, |
1473 { 'return_type': 'EGLBoolean', | 1499 { 'return_type': 'EGLBoolean', |
1474 'names': ['eglQuerySurface'], | 1500 'names': ['eglQuerySurface'], |
1475 'arguments': | 1501 'arguments': |
1476 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint* value', }, | 1502 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint* value', }, |
1477 { 'return_type': 'EGLBoolean', | 1503 { 'return_type': 'EGLBoolean', |
1478 'names': ['eglQuerySurfacePointerANGLE'], | 1504 'names': ['eglQuerySurfacePointerANGLE'], |
1479 'arguments': | 1505 'arguments': |
1480 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, void** value', }, | 1506 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, void** value', }, |
1481 { 'return_type': 'EGLBoolean', | 1507 { 'return_type': 'EGLBoolean', |
1482 'names': ['eglReleaseTexImage'], | 1508 'names': ['eglReleaseTexImage'], |
1483 'arguments': 'EGLDisplay dpy, EGLSurface surface, EGLint buffer', }, | 1509 'arguments': 'EGLDisplay dpy, EGLSurface surface, EGLint buffer', }, |
1484 { 'return_type': 'EGLBoolean', | 1510 { 'return_type': 'EGLBoolean', |
1485 'names': ['eglReleaseThread'], | 1511 'names': ['eglReleaseThread'], |
1486 'arguments': 'void', }, | 1512 'arguments': 'void', }, |
1487 { 'return_type': 'EGLBoolean', | 1513 { 'return_type': 'EGLBoolean', |
| 1514 'versions': [{ 'name': 'eglStreamAttribKHR', |
| 1515 'extensions': ['EGL_KHR_stream'] }], |
| 1516 'arguments': |
| 1517 'EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value' }, |
| 1518 { 'return_type': 'EGLBoolean', |
| 1519 'versions': [{ 'name': 'eglStreamConsumerAcquireKHR', |
| 1520 'extensions': ['EGL_KHR_stream_consumer_gltexture']}], |
| 1521 'arguments': |
| 1522 'EGLDisplay dpy, EGLStreamKHR stream', }, |
| 1523 { 'return_type': 'EGLBoolean', |
| 1524 'versions': [{ 'name': 'eglStreamConsumerGLTextureExternalAttribsNV', |
| 1525 'extensions': ['EGL_NV_stream_consumer_gltexture_yuv']}], |
| 1526 'arguments': |
| 1527 'EGLDisplay dpy, EGLStreamKHR stream, EGLAttrib* attrib_list', }, |
| 1528 { 'return_type': 'EGLBoolean', |
| 1529 'versions': [{ 'name': 'eglStreamConsumerGLTextureExternalKHR', |
| 1530 'extensions': ['EGL_KHR_stream_consumer_gltexture']}], |
| 1531 'arguments': |
| 1532 'EGLDisplay dpy, EGLStreamKHR stream', }, |
| 1533 { 'return_type': 'EGLBoolean', |
| 1534 'versions': [{ 'name': 'eglStreamConsumerReleaseKHR', |
| 1535 'extensions': ['EGL_KHR_stream_consumer_gltexture']}], |
| 1536 'arguments': |
| 1537 'EGLDisplay dpy, EGLStreamKHR stream', }, |
| 1538 { 'return_type': 'EGLBoolean', |
| 1539 'versions': [{ 'name': 'eglStreamPostD3DTextureNV12ANGLE', |
| 1540 'extensions': |
| 1541 ['EGL_ANGLE_stream_producer_d3d_texture_nv12']}], |
| 1542 'arguments': |
| 1543 'EGLDisplay dpy, EGLStreamKHR stream, void* texture, ' |
| 1544 'const EGLAttrib* attrib_list', }, |
| 1545 { 'return_type': 'EGLBoolean', |
1488 'names': ['eglSurfaceAttrib'], | 1546 'names': ['eglSurfaceAttrib'], |
1489 'arguments': | 1547 'arguments': |
1490 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value', }, | 1548 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value', }, |
1491 { 'return_type': 'EGLBoolean', | 1549 { 'return_type': 'EGLBoolean', |
1492 'names': ['eglSwapBuffers'], | 1550 'names': ['eglSwapBuffers'], |
1493 'arguments': 'EGLDisplay dpy, EGLSurface surface', }, | 1551 'arguments': 'EGLDisplay dpy, EGLSurface surface', }, |
1494 { 'return_type': 'EGLBoolean', | 1552 { 'return_type': 'EGLBoolean', |
1495 'names': ['eglSwapInterval'], | 1553 'names': ['eglSwapInterval'], |
1496 'arguments': 'EGLDisplay dpy, EGLint interval', }, | 1554 'arguments': 'EGLDisplay dpy, EGLint interval', }, |
1497 { 'return_type': 'EGLBoolean', | 1555 { 'return_type': 'EGLBoolean', |
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2783 'gl_enums_implementation_autogen.h'), | 2841 'gl_enums_implementation_autogen.h'), |
2784 'wb') | 2842 'wb') |
2785 GenerateEnumUtils(header_file, enum_header_filenames) | 2843 GenerateEnumUtils(header_file, enum_header_filenames) |
2786 header_file.close() | 2844 header_file.close() |
2787 ClangFormat(header_file.name) | 2845 ClangFormat(header_file.name) |
2788 return 0 | 2846 return 0 |
2789 | 2847 |
2790 | 2848 |
2791 if __name__ == '__main__': | 2849 if __name__ == '__main__': |
2792 sys.exit(main(sys.argv[1:])) | 2850 sys.exit(main(sys.argv[1:])) |
OLD | NEW |