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 GLES2 command buffers.""" | 6 """code generator for GLES2 command buffers.""" |
7 | 7 |
8 import itertools | 8 import itertools |
9 import os | 9 import os |
10 import os.path | 10 import os.path |
(...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1501 ], | 1501 ], |
1502 }, | 1502 }, |
1503 'ReadPixelFormat': { | 1503 'ReadPixelFormat': { |
1504 'type': 'GLenum', | 1504 'type': 'GLenum', |
1505 'valid': [ | 1505 'valid': [ |
1506 'GL_ALPHA', | 1506 'GL_ALPHA', |
1507 'GL_RGB', | 1507 'GL_RGB', |
1508 'GL_RGBA', | 1508 'GL_RGBA', |
1509 ], | 1509 ], |
1510 'valid_es3': [ | 1510 'valid_es3': [ |
| 1511 'GL_RED', |
| 1512 'GL_RED_INTEGER', |
| 1513 'GL_RG', |
| 1514 'GL_RG_INTEGER', |
| 1515 'GL_RGB_INTEGER', |
1511 'GL_RGBA_INTEGER', | 1516 'GL_RGBA_INTEGER', |
1512 ], | 1517 ], |
1513 'deprecated_es3': [ | |
1514 'GL_ALPHA', | |
1515 'GL_RGB', | |
1516 ], | |
1517 }, | 1518 }, |
1518 'PixelType': { | 1519 'PixelType': { |
1519 'type': 'GLenum', | 1520 'type': 'GLenum', |
1520 'valid': [ | 1521 'valid': [ |
1521 'GL_UNSIGNED_BYTE', | 1522 'GL_UNSIGNED_BYTE', |
1522 'GL_UNSIGNED_SHORT_5_6_5', | 1523 'GL_UNSIGNED_SHORT_5_6_5', |
1523 'GL_UNSIGNED_SHORT_4_4_4_4', | 1524 'GL_UNSIGNED_SHORT_4_4_4_4', |
1524 'GL_UNSIGNED_SHORT_5_5_5_1', | 1525 'GL_UNSIGNED_SHORT_5_5_5_1', |
1525 ], | 1526 ], |
1526 'valid_es3': [ | 1527 'valid_es3': [ |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1593 ] | 1594 ] |
1594 }, | 1595 }, |
1595 'ReadPixelType': { | 1596 'ReadPixelType': { |
1596 'type': 'GLenum', | 1597 'type': 'GLenum', |
1597 'valid': [ | 1598 'valid': [ |
1598 'GL_UNSIGNED_BYTE', | 1599 'GL_UNSIGNED_BYTE', |
1599 'GL_UNSIGNED_SHORT_5_6_5', | 1600 'GL_UNSIGNED_SHORT_5_6_5', |
1600 'GL_UNSIGNED_SHORT_4_4_4_4', | 1601 'GL_UNSIGNED_SHORT_4_4_4_4', |
1601 'GL_UNSIGNED_SHORT_5_5_5_1', | 1602 'GL_UNSIGNED_SHORT_5_5_5_1', |
1602 ], | 1603 ], |
1603 'invalid': [ | 1604 'valid_es3': [ |
| 1605 'GL_BYTE', |
| 1606 'GL_UNSIGNED_SHORT', |
1604 'GL_SHORT', | 1607 'GL_SHORT', |
1605 ], | |
1606 'valid_es3': [ | |
1607 'GL_UNSIGNED_INT', | 1608 'GL_UNSIGNED_INT', |
1608 'GL_INT', | 1609 'GL_INT', |
| 1610 'GL_HALF_FLOAT', |
1609 'GL_FLOAT', | 1611 'GL_FLOAT', |
1610 'GL_UNSIGNED_INT_2_10_10_10_REV', | 1612 'GL_UNSIGNED_INT_2_10_10_10_REV', |
1611 ], | 1613 ], |
1612 'deprecated_es3': [ | |
1613 'GL_UNSIGNED_SHORT_5_6_5', | |
1614 'GL_UNSIGNED_SHORT_4_4_4_4', | |
1615 'GL_UNSIGNED_SHORT_5_5_5_1', | |
1616 ], | |
1617 }, | 1614 }, |
1618 'RenderBufferFormat': { | 1615 'RenderBufferFormat': { |
1619 'type': 'GLenum', | 1616 'type': 'GLenum', |
1620 'valid': [ | 1617 'valid': [ |
1621 'GL_RGBA4', | 1618 'GL_RGBA4', |
1622 'GL_RGB565', | 1619 'GL_RGB565', |
1623 'GL_RGB5_A1', | 1620 'GL_RGB5_A1', |
1624 'GL_DEPTH_COMPONENT16', | 1621 'GL_DEPTH_COMPONENT16', |
1625 'GL_STENCIL_INDEX8', | 1622 'GL_STENCIL_INDEX8', |
1626 ], | 1623 ], |
(...skipping 9434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11061 Format(gen.generated_cpp_filenames) | 11058 Format(gen.generated_cpp_filenames) |
11062 | 11059 |
11063 if gen.errors > 0: | 11060 if gen.errors > 0: |
11064 print "%d errors" % gen.errors | 11061 print "%d errors" % gen.errors |
11065 return 1 | 11062 return 1 |
11066 return 0 | 11063 return 0 |
11067 | 11064 |
11068 | 11065 |
11069 if __name__ == '__main__': | 11066 if __name__ == '__main__': |
11070 sys.exit(main(sys.argv[1:])) | 11067 sys.exit(main(sys.argv[1:])) |
OLD | NEW |