Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 282253002: Remove unneeded shm versions of bucket functions from command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-shm-for-immediate-commands
Patch Set: rebase (1 new added hunk) Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_cmd_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1235 # type: defines which handler will be used to generate code. 1235 # type: defines which handler will be used to generate code.
1236 # decoder_func: defines which function to call in the decoder to execute the 1236 # decoder_func: defines which function to call in the decoder to execute the
1237 # corresponding GL command. If not specified the GL command will 1237 # corresponding GL command. If not specified the GL command will
1238 # be called directly. 1238 # be called directly.
1239 # gl_test_func: GL function that is expected to be called when testing. 1239 # gl_test_func: GL function that is expected to be called when testing.
1240 # cmd_args: The arguments to use for the command. This overrides generating 1240 # cmd_args: The arguments to use for the command. This overrides generating
1241 # them based on the GL function arguments. 1241 # them based on the GL function arguments.
1242 # a NonImmediate type is a type that stays a pointer even in 1242 # a NonImmediate type is a type that stays a pointer even in
1243 # and immediate version of acommand. 1243 # and immediate version of acommand.
1244 # gen_cmd: Whether or not this function geneates a command. Default = True. 1244 # gen_cmd: Whether or not this function geneates a command. Default = True.
1245 # immediate: Whether or not to generate an immediate command for the GL 1245 # data_transfer_methods: Array of methods that are used for transfering the
1246 # function. The default is if there is exactly 1 pointer argument 1246 # pointer data. Possible values: 'immediate', 'shm', 'bucket'.
1247 # in the GL function an immediate command is generated. 1247 # The default is 'immediate' if the command has one pointer
1248 # bucket: True to generate a bucket version of the command. 1248 # argument, otherwise 'shm'. One command is generated for each
1249 # transfer method. Affects only commands which are not of type
1250 # 'HandWritten', 'GETn' or 'GLcharN'.
1251 # Note: the command arguments that affect this are the final args,
1252 # taking cmd_args override into consideration.
1249 # impl_func: Whether or not to generate the GLES2Implementation part of this 1253 # impl_func: Whether or not to generate the GLES2Implementation part of this
1250 # command. 1254 # command.
1251 # impl_decl: Whether or not to generate the GLES2Implementation declaration 1255 # impl_decl: Whether or not to generate the GLES2Implementation declaration
1252 # for this command. 1256 # for this command.
1253 # needs_size: If true a data_size field is added to the command. 1257 # needs_size: If true a data_size field is added to the command.
1254 # count: The number of units per element. For PUTn or PUT types. 1258 # count: The number of units per element. For PUTn or PUT types.
1255 # unit_test: If False no service side unit test will be generated. 1259 # unit_test: If False no service side unit test will be generated.
1256 # client_test: If False no client side unit test will be generated. 1260 # client_test: If False no client side unit test will be generated.
1257 # expectation: If False the unit test will have no expected calls. 1261 # expectation: If False the unit test will have no expected calls.
1258 # gen_func: Name of function that generates GL resource for corresponding 1262 # gen_func: Name of function that generates GL resource for corresponding
(...skipping 24 matching lines...) Expand all
1283 _FUNCTION_INFO = { 1287 _FUNCTION_INFO = {
1284 'ActiveTexture': { 1288 'ActiveTexture': {
1285 'decoder_func': 'DoActiveTexture', 1289 'decoder_func': 'DoActiveTexture',
1286 'unit_test': False, 1290 'unit_test': False,
1287 'impl_func': False, 1291 'impl_func': False,
1288 'client_test': False, 1292 'client_test': False,
1289 }, 1293 },
1290 'AttachShader': {'decoder_func': 'DoAttachShader'}, 1294 'AttachShader': {'decoder_func': 'DoAttachShader'},
1291 'BindAttribLocation': { 1295 'BindAttribLocation': {
1292 'type': 'GLchar', 1296 'type': 'GLchar',
1293 'bucket': True, 1297 'data_transfer_methods': ['bucket'],
1294 'needs_size': True, 1298 'needs_size': True,
1295 'immediate': False,
1296 }, 1299 },
1297 'BindBuffer': { 1300 'BindBuffer': {
1298 'type': 'Bind', 1301 'type': 'Bind',
1299 'decoder_func': 'DoBindBuffer', 1302 'decoder_func': 'DoBindBuffer',
1300 'gen_func': 'GenBuffersARB', 1303 'gen_func': 'GenBuffersARB',
1301 }, 1304 },
1302 'BindFramebuffer': { 1305 'BindFramebuffer': {
1303 'type': 'Bind', 1306 'type': 'Bind',
1304 'decoder_func': 'DoBindFramebuffer', 1307 'decoder_func': 'DoBindFramebuffer',
1305 'gl_test_func': 'glBindFramebufferEXT', 1308 'gl_test_func': 'glBindFramebufferEXT',
(...skipping 19 matching lines...) Expand all
1325 'unit_test': False, 1328 'unit_test': False,
1326 'extension_flag': 'chromium_framebuffer_multisample', 1329 'extension_flag': 'chromium_framebuffer_multisample',
1327 'pepper_interface': 'FramebufferBlit', 1330 'pepper_interface': 'FramebufferBlit',
1328 'pepper_name': 'BlitFramebufferEXT', 1331 'pepper_name': 'BlitFramebufferEXT',
1329 'defer_reads': True, 1332 'defer_reads': True,
1330 'defer_draws': True, 1333 'defer_draws': True,
1331 'trace_level': 1, 1334 'trace_level': 1,
1332 }, 1335 },
1333 'BufferData': { 1336 'BufferData': {
1334 'type': 'Manual', 1337 'type': 'Manual',
1335 'immediate': False, 1338 'data_transfer_methods': ['shm'],
1336 'client_test': False, 1339 'client_test': False,
1337 }, 1340 },
1338 'BufferSubData': { 1341 'BufferSubData': {
1339 'type': 'Data', 1342 'type': 'Data',
1340 'client_test': False, 1343 'client_test': False,
1341 'decoder_func': 'DoBufferSubData', 1344 'decoder_func': 'DoBufferSubData',
1342 'immediate': False, 1345 'data_transfer_methods': ['shm'],
1343 }, 1346 },
1344 'CheckFramebufferStatus': { 1347 'CheckFramebufferStatus': {
1345 'type': 'Is', 1348 'type': 'Is',
1346 'decoder_func': 'DoCheckFramebufferStatus', 1349 'decoder_func': 'DoCheckFramebufferStatus',
1347 'gl_test_func': 'glCheckFramebufferStatusEXT', 1350 'gl_test_func': 'glCheckFramebufferStatusEXT',
1348 'error_value': 'GL_FRAMEBUFFER_UNSUPPORTED', 1351 'error_value': 'GL_FRAMEBUFFER_UNSUPPORTED',
1349 'result': ['GLenum'], 1352 'result': ['GLenum'],
1350 }, 1353 },
1351 'Clear': { 1354 'Clear': {
1352 'decoder_func': 'DoClear', 1355 'decoder_func': 'DoClear',
(...skipping 27 matching lines...) Expand all
1380 'unit_test': False, 1383 'unit_test': False,
1381 'client_test': False, 1384 'client_test': False,
1382 'extension': True, 1385 'extension': True,
1383 'chromium': True, 1386 'chromium': True,
1384 'trace_level': 1, 1387 'trace_level': 1,
1385 }, 1388 },
1386 'CreateAndConsumeTextureCHROMIUM': { 1389 'CreateAndConsumeTextureCHROMIUM': {
1387 'decoder_func': 'DoCreateAndConsumeTextureCHROMIUM', 1390 'decoder_func': 'DoCreateAndConsumeTextureCHROMIUM',
1388 'impl_func': False, 1391 'impl_func': False,
1389 'type': 'HandWritten', 1392 'type': 'HandWritten',
1393 'data_transfer_methods': ['immediate'],
Kimmo Kinnunen 2014/06/16 06:09:25 Added this, see below for another comment..
1390 'unit_test': False, 1394 'unit_test': False,
1391 'client_test': False, 1395 'client_test': False,
1392 'extension': True, 1396 'extension': True,
1393 'chromium': True, 1397 'chromium': True,
1394 }, 1398 },
1395 'ClearStencil': { 1399 'ClearStencil': {
1396 'type': 'StateSet', 1400 'type': 'StateSet',
1397 'state': 'ClearStencil', 1401 'state': 'ClearStencil',
1398 }, 1402 },
1399 'EnableFeatureCHROMIUM': { 1403 'EnableFeatureCHROMIUM': {
1400 'type': 'Custom', 1404 'type': 'Custom',
1401 'immediate': False, 1405 'data_transfer_methods': ['shm'],
1402 'decoder_func': 'DoEnableFeatureCHROMIUM', 1406 'decoder_func': 'DoEnableFeatureCHROMIUM',
1403 'expectation': False, 1407 'expectation': False,
1404 'cmd_args': 'GLuint bucket_id, GLint* result', 1408 'cmd_args': 'GLuint bucket_id, GLint* result',
1405 'result': ['GLint'], 1409 'result': ['GLint'],
1406 'extension': True, 1410 'extension': True,
1407 'chromium': True, 1411 'chromium': True,
1408 'pepper_interface': 'ChromiumEnableFeature', 1412 'pepper_interface': 'ChromiumEnableFeature',
1409 }, 1413 },
1410 'CompileShader': {'decoder_func': 'DoCompileShader', 'unit_test': False}, 1414 'CompileShader': {'decoder_func': 'DoCompileShader', 'unit_test': False},
1411 'CompressedTexImage2D': { 1415 'CompressedTexImage2D': {
1412 'type': 'Manual', 1416 'type': 'Manual',
1413 'immediate': False, 1417 'data_transfer_methods': ['bucket', 'shm'],
1414 'bucket': True,
1415 }, 1418 },
1416 'CompressedTexSubImage2D': { 1419 'CompressedTexSubImage2D': {
1417 'type': 'Data', 1420 'type': 'Data',
1418 'bucket': True, 1421 'data_transfer_methods': ['bucket', 'shm'],
1419 'decoder_func': 'DoCompressedTexSubImage2D', 1422 'decoder_func': 'DoCompressedTexSubImage2D',
1420 'immediate': False,
1421 }, 1423 },
1422 'CopyTexImage2D': { 1424 'CopyTexImage2D': {
1423 'decoder_func': 'DoCopyTexImage2D', 1425 'decoder_func': 'DoCopyTexImage2D',
1424 'unit_test': False, 1426 'unit_test': False,
1425 'defer_reads': True, 1427 'defer_reads': True,
1426 }, 1428 },
1427 'CopyTexSubImage2D': { 1429 'CopyTexSubImage2D': {
1428 'decoder_func': 'DoCopyTexSubImage2D', 1430 'decoder_func': 'DoCopyTexSubImage2D',
1429 'defer_reads': True, 1431 'defer_reads': True,
1430 }, 1432 },
1431 'CreateImageCHROMIUM': { 1433 'CreateImageCHROMIUM': {
1432 'type': 'Manual', 1434 'type': 'Manual',
1433 'cmd_args': 1435 'cmd_args':
1434 'GLsizei width, GLsizei height, GLenum internalformat, GLenum usage', 1436 'GLsizei width, GLsizei height, GLenum internalformat, GLenum usage',
1435 'result': ['GLuint'], 1437 'result': ['GLuint'],
1436 'client_test': False, 1438 'client_test': False,
1437 'gen_cmd': False, 1439 'gen_cmd': False,
1438 'expectation': False, 1440 'expectation': False,
1439 'extension': True, 1441 'extension': True,
1440 'chromium': True, 1442 'chromium': True,
1441 }, 1443 },
1442 'DestroyImageCHROMIUM': { 1444 'DestroyImageCHROMIUM': {
1443 'type': 'Manual', 1445 'type': 'Manual',
1444 'immediate': False,
1445 'client_test': False, 1446 'client_test': False,
1446 'gen_cmd': False, 1447 'gen_cmd': False,
1447 'extension': True, 1448 'extension': True,
1448 'chromium': True, 1449 'chromium': True,
1449 }, 1450 },
1450 'GetImageParameterivCHROMIUM': { 1451 'GetImageParameterivCHROMIUM': {
1451 'type': 'Manual', 1452 'type': 'Manual',
1452 'client_test': False, 1453 'client_test': False,
1453 'gen_cmd': False, 1454 'gen_cmd': False,
1454 'expectation': False, 1455 'expectation': False,
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
1548 'gl_test_func': 'glDeleteRenderbuffersEXT', 1549 'gl_test_func': 'glDeleteRenderbuffersEXT',
1549 'resource_type': 'Renderbuffer', 1550 'resource_type': 'Renderbuffer',
1550 'resource_types': 'Renderbuffers', 1551 'resource_types': 'Renderbuffers',
1551 }, 1552 },
1552 'DeleteShader': {'type': 'Delete', 'decoder_func': 'DoDeleteShader'}, 1553 'DeleteShader': {'type': 'Delete', 'decoder_func': 'DoDeleteShader'},
1553 'DeleteSharedIdsCHROMIUM': { 1554 'DeleteSharedIdsCHROMIUM': {
1554 'type': 'Custom', 1555 'type': 'Custom',
1555 'decoder_func': 'DoDeleteSharedIdsCHROMIUM', 1556 'decoder_func': 'DoDeleteSharedIdsCHROMIUM',
1556 'impl_func': False, 1557 'impl_func': False,
1557 'expectation': False, 1558 'expectation': False,
1558 'immediate': False, 1559 'data_transfer_methods': ['shm'],
1559 'extension': True, 1560 'extension': True,
1560 'chromium': True, 1561 'chromium': True,
1561 }, 1562 },
1562 'DeleteTextures': { 1563 'DeleteTextures': {
1563 'type': 'DELn', 1564 'type': 'DELn',
1564 'resource_type': 'Texture', 1565 'resource_type': 'Texture',
1565 'resource_types': 'Textures', 1566 'resource_types': 'Textures',
1566 }, 1567 },
1567 'DepthRangef': { 1568 'DepthRangef': {
1568 'decoder_func': 'DoDepthRangef', 1569 'decoder_func': 'DoDepthRangef',
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1639 'gl_test_func': 'glGenerateMipmapEXT', 1640 'gl_test_func': 'glGenerateMipmapEXT',
1640 }, 1641 },
1641 'GenBuffers': { 1642 'GenBuffers': {
1642 'type': 'GENn', 1643 'type': 'GENn',
1643 'gl_test_func': 'glGenBuffersARB', 1644 'gl_test_func': 'glGenBuffersARB',
1644 'resource_type': 'Buffer', 1645 'resource_type': 'Buffer',
1645 'resource_types': 'Buffers', 1646 'resource_types': 'Buffers',
1646 }, 1647 },
1647 'GenMailboxCHROMIUM': { 1648 'GenMailboxCHROMIUM': {
1648 'type': 'HandWritten', 1649 'type': 'HandWritten',
1649 'immediate': False,
1650 'impl_func': False, 1650 'impl_func': False,
1651 'extension': True, 1651 'extension': True,
1652 'chromium': True, 1652 'chromium': True,
1653 }, 1653 },
1654 'GenFramebuffers': { 1654 'GenFramebuffers': {
1655 'type': 'GENn', 1655 'type': 'GENn',
1656 'gl_test_func': 'glGenFramebuffersEXT', 1656 'gl_test_func': 'glGenFramebuffersEXT',
1657 'resource_type': 'Framebuffer', 1657 'resource_type': 'Framebuffer',
1658 'resource_types': 'Framebuffers', 1658 'resource_types': 'Framebuffers',
1659 }, 1659 },
1660 'GenRenderbuffers': { 1660 'GenRenderbuffers': {
1661 'type': 'GENn', 'gl_test_func': 'glGenRenderbuffersEXT', 1661 'type': 'GENn', 'gl_test_func': 'glGenRenderbuffersEXT',
1662 'resource_type': 'Renderbuffer', 1662 'resource_type': 'Renderbuffer',
1663 'resource_types': 'Renderbuffers', 1663 'resource_types': 'Renderbuffers',
1664 }, 1664 },
1665 'GenTextures': { 1665 'GenTextures': {
1666 'type': 'GENn', 1666 'type': 'GENn',
1667 'gl_test_func': 'glGenTextures', 1667 'gl_test_func': 'glGenTextures',
1668 'resource_type': 'Texture', 1668 'resource_type': 'Texture',
1669 'resource_types': 'Textures', 1669 'resource_types': 'Textures',
1670 }, 1670 },
1671 'GenSharedIdsCHROMIUM': { 1671 'GenSharedIdsCHROMIUM': {
1672 'type': 'Custom', 1672 'type': 'Custom',
1673 'decoder_func': 'DoGenSharedIdsCHROMIUM', 1673 'decoder_func': 'DoGenSharedIdsCHROMIUM',
1674 'impl_func': False, 1674 'impl_func': False,
1675 'expectation': False, 1675 'expectation': False,
1676 'immediate': False, 1676 'data_transfer_methods': ['shm'],
1677 'extension': True, 1677 'extension': True,
1678 'chromium': True, 1678 'chromium': True,
1679 }, 1679 },
1680 'GetActiveAttrib': { 1680 'GetActiveAttrib': {
1681 'type': 'Custom', 1681 'type': 'Custom',
1682 'immediate': False, 1682 'data_transfer_methods': ['shm'],
1683 'cmd_args': 1683 'cmd_args':
1684 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' 1684 'GLidProgram program, GLuint index, uint32_t name_bucket_id, '
1685 'void* result', 1685 'void* result',
1686 'result': [ 1686 'result': [
1687 'int32_t success', 1687 'int32_t success',
1688 'int32_t size', 1688 'int32_t size',
1689 'uint32_t type', 1689 'uint32_t type',
1690 ], 1690 ],
1691 }, 1691 },
1692 'GetActiveUniform': { 1692 'GetActiveUniform': {
1693 'type': 'Custom', 1693 'type': 'Custom',
1694 'immediate': False, 1694 'data_transfer_methods': ['shm'],
1695 'cmd_args': 1695 'cmd_args':
1696 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' 1696 'GLidProgram program, GLuint index, uint32_t name_bucket_id, '
1697 'void* result', 1697 'void* result',
1698 'result': [ 1698 'result': [
1699 'int32_t success', 1699 'int32_t success',
1700 'int32_t size', 1700 'int32_t size',
1701 'uint32_t type', 1701 'uint32_t type',
1702 ], 1702 ],
1703 }, 1703 },
1704 'GetAttachedShaders': { 1704 'GetAttachedShaders': {
1705 'type': 'Custom', 1705 'type': 'Custom',
1706 'immediate': False, 1706 'data_transfer_methods': ['shm'],
1707 'cmd_args': 'GLidProgram program, void* result, uint32_t result_size', 1707 'cmd_args': 'GLidProgram program, void* result, uint32_t result_size',
1708 'result': ['SizedResult<GLuint>'], 1708 'result': ['SizedResult<GLuint>'],
1709 }, 1709 },
1710 'GetAttribLocation': { 1710 'GetAttribLocation': {
1711 'type': 'HandWritten', 1711 'type': 'HandWritten',
1712 'immediate': False,
1713 'bucket': True,
1714 'needs_size': True, 1712 'needs_size': True,
1715 'cmd_args': 1713 'cmd_args':
1716 'GLidProgram program, const char* name, NonImmediate GLint* location', 1714 'GLidProgram program, const char* name, NonImmediate GLint* location',
1717 'result': ['GLint'], 1715 'result': ['GLint'],
1718 'error_return': -1, # http://www.opengl.org/sdk/docs/man/xhtml/glGetAttribLo cation.xml 1716 'error_return': -1, # http://www.opengl.org/sdk/docs/man/xhtml/glGetAttribLo cation.xml
1719 }, 1717 },
1720 'GetBooleanv': { 1718 'GetBooleanv': {
1721 'type': 'GETn', 1719 'type': 'GETn',
1722 'result': ['SizedResult<GLboolean>'], 1720 'result': ['SizedResult<GLboolean>'],
1723 'decoder_func': 'DoGetBooleanv', 1721 'decoder_func': 'DoGetBooleanv',
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 'decoder_func': 'DoGetMaxValueInBufferCHROMIUM', 1758 'decoder_func': 'DoGetMaxValueInBufferCHROMIUM',
1761 'result': ['GLuint'], 1759 'result': ['GLuint'],
1762 'unit_test': False, 1760 'unit_test': False,
1763 'client_test': False, 1761 'client_test': False,
1764 'extension': True, 1762 'extension': True,
1765 'chromium': True, 1763 'chromium': True,
1766 'impl_func': False, 1764 'impl_func': False,
1767 }, 1765 },
1768 'GetMultipleIntegervCHROMIUM': { 1766 'GetMultipleIntegervCHROMIUM': {
1769 'type': 'Custom', 1767 'type': 'Custom',
1770 'immediate': False, 1768 'data_transfer_methods': ['shm'],
1771 'expectation': False, 1769 'expectation': False,
1772 'extension': True, 1770 'extension': True,
1773 'chromium': True, 1771 'chromium': True,
1774 'client_test': False, 1772 'client_test': False,
1775 }, 1773 },
1776 'GetProgramiv': { 1774 'GetProgramiv': {
1777 'type': 'GETn', 1775 'type': 'GETn',
1778 'decoder_func': 'DoGetProgramiv', 1776 'decoder_func': 'DoGetProgramiv',
1779 'result': ['SizedResult<GLint>'], 1777 'result': ['SizedResult<GLint>'],
1780 'expectation': False, 1778 'expectation': False,
1781 }, 1779 },
1782 'GetProgramInfoCHROMIUM': { 1780 'GetProgramInfoCHROMIUM': {
1783 'type': 'Custom', 1781 'type': 'Custom',
1784 'immediate': False,
1785 'expectation': False, 1782 'expectation': False,
1786 'impl_func': False, 1783 'impl_func': False,
1787 'extension': True, 1784 'extension': True,
1788 'chromium': True, 1785 'chromium': True,
1789 'client_test': False, 1786 'client_test': False,
1790 'cmd_args': 'GLidProgram program, uint32_t bucket_id', 1787 'cmd_args': 'GLidProgram program, uint32_t bucket_id',
1791 'result': [ 1788 'result': [
1792 'uint32_t link_status', 1789 'uint32_t link_status',
1793 'uint32_t num_attribs', 1790 'uint32_t num_attribs',
1794 'uint32_t num_uniforms', 1791 'uint32_t num_uniforms',
(...skipping 15 matching lines...) Expand all
1810 'result': ['SizedResult<GLint>'], 1807 'result': ['SizedResult<GLint>'],
1811 }, 1808 },
1812 'GetShaderInfoLog': { 1809 'GetShaderInfoLog': {
1813 'type': 'STRn', 1810 'type': 'STRn',
1814 'get_len_func': 'glGetShaderiv', 1811 'get_len_func': 'glGetShaderiv',
1815 'get_len_enum': 'GL_INFO_LOG_LENGTH', 1812 'get_len_enum': 'GL_INFO_LOG_LENGTH',
1816 'unit_test': False, 1813 'unit_test': False,
1817 }, 1814 },
1818 'GetShaderPrecisionFormat': { 1815 'GetShaderPrecisionFormat': {
1819 'type': 'Custom', 1816 'type': 'Custom',
1820 'immediate': False, 1817 'data_transfer_methods': ['shm'],
1821 'cmd_args': 1818 'cmd_args':
1822 'GLenumShaderType shadertype, GLenumShaderPrecision precisiontype, ' 1819 'GLenumShaderType shadertype, GLenumShaderPrecision precisiontype, '
1823 'void* result', 1820 'void* result',
1824 'result': [ 1821 'result': [
1825 'int32_t success', 1822 'int32_t success',
1826 'int32_t min_range', 1823 'int32_t min_range',
1827 'int32_t max_range', 1824 'int32_t max_range',
1828 'int32_t precision', 1825 'int32_t precision',
1829 ], 1826 ],
1830 }, 1827 },
(...skipping 21 matching lines...) Expand all
1852 }, 1849 },
1853 'GetTranslatedShaderSourceANGLE': { 1850 'GetTranslatedShaderSourceANGLE': {
1854 'type': 'STRn', 1851 'type': 'STRn',
1855 'get_len_func': 'DoGetShaderiv', 1852 'get_len_func': 'DoGetShaderiv',
1856 'get_len_enum': 'GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE', 1853 'get_len_enum': 'GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE',
1857 'unit_test': False, 1854 'unit_test': False,
1858 'extension': True, 1855 'extension': True,
1859 }, 1856 },
1860 'GetUniformfv': { 1857 'GetUniformfv': {
1861 'type': 'Custom', 1858 'type': 'Custom',
1862 'immediate': False, 1859 'data_transfer_methods': ['shm'],
1863 'result': ['SizedResult<GLfloat>'], 1860 'result': ['SizedResult<GLfloat>'],
1864 }, 1861 },
1865 'GetUniformiv': { 1862 'GetUniformiv': {
1866 'type': 'Custom', 1863 'type': 'Custom',
1867 'immediate': False, 1864 'data_transfer_methods': ['shm'],
1868 'result': ['SizedResult<GLint>'], 1865 'result': ['SizedResult<GLint>'],
1869 }, 1866 },
1870 'GetUniformLocation': { 1867 'GetUniformLocation': {
1871 'type': 'HandWritten', 1868 'type': 'HandWritten',
1872 'immediate': False,
1873 'bucket': True,
1874 'needs_size': True, 1869 'needs_size': True,
1875 'cmd_args': 1870 'cmd_args':
1876 'GLidProgram program, const char* name, NonImmediate GLint* location', 1871 'GLidProgram program, const char* name, NonImmediate GLint* location',
1877 'result': ['GLint'], 1872 'result': ['GLint'],
1878 'error_return': -1, # http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformL ocation.xml 1873 'error_return': -1, # http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformL ocation.xml
1879 }, 1874 },
1880 'GetVertexAttribfv': { 1875 'GetVertexAttribfv': {
1881 'type': 'GETn', 1876 'type': 'GETn',
1882 'result': ['SizedResult<GLfloat>'], 1877 'result': ['SizedResult<GLfloat>'],
1883 'impl_decl': False, 1878 'impl_decl': False,
1884 'decoder_func': 'DoGetVertexAttribfv', 1879 'decoder_func': 'DoGetVertexAttribfv',
1885 'expectation': False, 1880 'expectation': False,
1886 'client_test': False, 1881 'client_test': False,
1887 }, 1882 },
1888 'GetVertexAttribiv': { 1883 'GetVertexAttribiv': {
1889 'type': 'GETn', 1884 'type': 'GETn',
1890 'result': ['SizedResult<GLint>'], 1885 'result': ['SizedResult<GLint>'],
1891 'impl_decl': False, 1886 'impl_decl': False,
1892 'decoder_func': 'DoGetVertexAttribiv', 1887 'decoder_func': 'DoGetVertexAttribiv',
1893 'expectation': False, 1888 'expectation': False,
1894 'client_test': False, 1889 'client_test': False,
1895 }, 1890 },
1896 'GetVertexAttribPointerv': { 1891 'GetVertexAttribPointerv': {
1897 'type': 'Custom', 1892 'type': 'Custom',
1898 'immediate': False, 1893 'data_transfer_methods': ['shm'],
1899 'result': ['SizedResult<GLuint>'], 1894 'result': ['SizedResult<GLuint>'],
1900 'client_test': False, 1895 'client_test': False,
1901 }, 1896 },
1902 'IsBuffer': { 1897 'IsBuffer': {
1903 'type': 'Is', 1898 'type': 'Is',
1904 'decoder_func': 'DoIsBuffer', 1899 'decoder_func': 'DoIsBuffer',
1905 'expectation': False, 1900 'expectation': False,
1906 }, 1901 },
1907 'IsEnabled': { 1902 'IsEnabled': {
1908 'type': 'Is', 1903 'type': 'Is',
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 'expectation': False, 2015 'expectation': False,
2021 'unit_test': False, 2016 'unit_test': False,
2022 'extension_flag': 'multisampled_render_to_texture', 2017 'extension_flag': 'multisampled_render_to_texture',
2023 }, 2018 },
2024 'ReadPixels': { 2019 'ReadPixels': {
2025 'cmd_comment': 2020 'cmd_comment':
2026 '// ReadPixels has the result separated from the pixel buffer so that\n' 2021 '// ReadPixels has the result separated from the pixel buffer so that\n'
2027 '// it is easier to specify the result going to some specific place\n' 2022 '// it is easier to specify the result going to some specific place\n'
2028 '// that exactly fits the rectangle of pixels.\n', 2023 '// that exactly fits the rectangle of pixels.\n',
2029 'type': 'Custom', 2024 'type': 'Custom',
2030 'immediate': False, 2025 'data_transfer_methods': ['shm'],
2031 'impl_func': False, 2026 'impl_func': False,
2032 'client_test': False, 2027 'client_test': False,
2033 'cmd_args': 2028 'cmd_args':
2034 'GLint x, GLint y, GLsizei width, GLsizei height, ' 2029 'GLint x, GLint y, GLsizei width, GLsizei height, '
2035 'GLenumReadPixelFormat format, GLenumReadPixelType type, ' 2030 'GLenumReadPixelFormat format, GLenumReadPixelType type, '
2036 'uint32_t pixels_shm_id, uint32_t pixels_shm_offset, ' 2031 'uint32_t pixels_shm_id, uint32_t pixels_shm_offset, '
2037 'uint32_t result_shm_id, uint32_t result_shm_offset, ' 2032 'uint32_t result_shm_id, uint32_t result_shm_offset, '
2038 'GLboolean async', 2033 'GLboolean async',
2039 'result': ['uint32_t'], 2034 'result': ['uint32_t'],
2040 'defer_reads': True, 2035 'defer_reads': True,
2041 }, 2036 },
2042 'RegisterSharedIdsCHROMIUM': { 2037 'RegisterSharedIdsCHROMIUM': {
2043 'type': 'Custom', 2038 'type': 'Custom',
2044 'decoder_func': 'DoRegisterSharedIdsCHROMIUM', 2039 'decoder_func': 'DoRegisterSharedIdsCHROMIUM',
2045 'impl_func': False, 2040 'impl_func': False,
2046 'expectation': False, 2041 'expectation': False,
2047 'immediate': False, 2042 'data_transfer_methods': ['shm'],
2048 'extension': True, 2043 'extension': True,
2049 'chromium': True, 2044 'chromium': True,
2050 }, 2045 },
2051 'ReleaseShaderCompiler': { 2046 'ReleaseShaderCompiler': {
2052 'decoder_func': 'DoReleaseShaderCompiler', 2047 'decoder_func': 'DoReleaseShaderCompiler',
2053 'unit_test': False, 2048 'unit_test': False,
2054 }, 2049 },
2055 'ShaderBinary': { 2050 'ShaderBinary': {
2056 'type': 'Custom', 2051 'type': 'Custom',
2057 'client_test': False, 2052 'client_test': False,
2058 }, 2053 },
2059 'ShaderSource': { 2054 'ShaderSource': {
2060 'type': 'Manual', 2055 'type': 'Manual',
2061 'immediate': False, 2056 'data_transfer_methods': ['bucket'],
2062 'bucket': True,
2063 'needs_size': True, 2057 'needs_size': True,
2064 'client_test': False, 2058 'client_test': False,
2065 'cmd_args': 2059 'cmd_args':
2066 'GLuint shader, const char* data', 2060 'GLuint shader, const char* data',
2067 'pepper_args': 2061 'pepper_args':
2068 'GLuint shader, GLsizei count, const char** str, const GLint* length', 2062 'GLuint shader, GLsizei count, const char** str, const GLint* length',
2069 }, 2063 },
2070 'StencilMask': { 2064 'StencilMask': {
2071 'type': 'StateSetFrontBack', 2065 'type': 'StateSetFrontBack',
2072 'state': 'StencilMask', 2066 'state': 'StencilMask',
2073 'no_gl': True, 2067 'no_gl': True,
2074 'expectation': False, 2068 'expectation': False,
2075 }, 2069 },
2076 'StencilMaskSeparate': { 2070 'StencilMaskSeparate': {
2077 'type': 'StateSetFrontBackSeparate', 2071 'type': 'StateSetFrontBackSeparate',
2078 'state': 'StencilMask', 2072 'state': 'StencilMask',
2079 'no_gl': True, 2073 'no_gl': True,
2080 'expectation': False, 2074 'expectation': False,
2081 }, 2075 },
2082 'SwapBuffers': { 2076 'SwapBuffers': {
2083 'impl_func': False, 2077 'impl_func': False,
2084 'decoder_func': 'DoSwapBuffers', 2078 'decoder_func': 'DoSwapBuffers',
2085 'unit_test': False, 2079 'unit_test': False,
2086 'client_test': False, 2080 'client_test': False,
2087 'extension': True, 2081 'extension': True,
2088 'trace_level': 1, 2082 'trace_level': 1,
2089 }, 2083 },
2090 'TexImage2D': { 2084 'TexImage2D': {
2091 'type': 'Manual', 2085 'type': 'Manual',
2092 'immediate': False, 2086 'data_transfer_methods': ['shm'],
2093 'client_test': False, 2087 'client_test': False,
2094 }, 2088 },
2095 'TexParameterf': { 2089 'TexParameterf': {
2096 'decoder_func': 'DoTexParameterf', 2090 'decoder_func': 'DoTexParameterf',
2097 'valid_args': { 2091 'valid_args': {
2098 '2': 'GL_NEAREST' 2092 '2': 'GL_NEAREST'
2099 }, 2093 },
2100 }, 2094 },
2101 'TexParameteri': { 2095 'TexParameteri': {
2102 'decoder_func': 'DoTexParameteri', 2096 'decoder_func': 'DoTexParameteri',
(...skipping 12 matching lines...) Expand all
2115 'TexParameteriv': { 2109 'TexParameteriv': {
2116 'type': 'PUT', 2110 'type': 'PUT',
2117 'data_value': 'GL_NEAREST', 2111 'data_value': 'GL_NEAREST',
2118 'count': 1, 2112 'count': 1,
2119 'decoder_func': 'DoTexParameteriv', 2113 'decoder_func': 'DoTexParameteriv',
2120 'gl_test_func': 'glTexParameteri', 2114 'gl_test_func': 'glTexParameteri',
2121 'first_element_only': True, 2115 'first_element_only': True,
2122 }, 2116 },
2123 'TexSubImage2D': { 2117 'TexSubImage2D': {
2124 'type': 'Manual', 2118 'type': 'Manual',
2125 'immediate': False, 2119 'data_transfer_methods': ['shm'],
2126 'client_test': False, 2120 'client_test': False,
2127 'cmd_args': 'GLenumTextureTarget target, GLint level, ' 2121 'cmd_args': 'GLenumTextureTarget target, GLint level, '
2128 'GLint xoffset, GLint yoffset, ' 2122 'GLint xoffset, GLint yoffset, '
2129 'GLsizei width, GLsizei height, ' 2123 'GLsizei width, GLsizei height, '
2130 'GLenumTextureFormat format, GLenumPixelType type, ' 2124 'GLenumTextureFormat format, GLenumPixelType type, '
2131 'const void* pixels, GLboolean internal' 2125 'const void* pixels, GLboolean internal'
2132 }, 2126 },
2133 'Uniform1f': {'type': 'PUTXn', 'count': 1}, 2127 'Uniform1f': {'type': 'PUTXn', 'count': 1},
2134 'Uniform1fv': { 2128 'Uniform1fv': {
2135 'type': 'PUTn', 2129 'type': 'PUTn',
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2266 'ResizeCHROMIUM': { 2260 'ResizeCHROMIUM': {
2267 'type': 'Custom', 2261 'type': 'Custom',
2268 'impl_func': False, 2262 'impl_func': False,
2269 'unit_test': False, 2263 'unit_test': False,
2270 'extension': True, 2264 'extension': True,
2271 'chromium': True, 2265 'chromium': True,
2272 }, 2266 },
2273 'GetRequestableExtensionsCHROMIUM': { 2267 'GetRequestableExtensionsCHROMIUM': {
2274 'type': 'Custom', 2268 'type': 'Custom',
2275 'impl_func': False, 2269 'impl_func': False,
2276 'immediate': False,
2277 'cmd_args': 'uint32_t bucket_id', 2270 'cmd_args': 'uint32_t bucket_id',
2278 'extension': True, 2271 'extension': True,
2279 'chromium': True, 2272 'chromium': True,
2280 }, 2273 },
2281 'RequestExtensionCHROMIUM': { 2274 'RequestExtensionCHROMIUM': {
2282 'type': 'Custom', 2275 'type': 'Custom',
2283 'impl_func': False, 2276 'impl_func': False,
2284 'immediate': False,
2285 'client_test': False, 2277 'client_test': False,
2286 'cmd_args': 'uint32_t bucket_id', 2278 'cmd_args': 'uint32_t bucket_id',
2287 'extension': True, 2279 'extension': True,
2288 'chromium': True, 2280 'chromium': True,
2289 }, 2281 },
2290 'RateLimitOffscreenContextCHROMIUM': { 2282 'RateLimitOffscreenContextCHROMIUM': {
2291 'gen_cmd': False, 2283 'gen_cmd': False,
2292 'extension': True, 2284 'extension': True,
2293 'chromium': True, 2285 'chromium': True,
2294 'client_test': False, 2286 'client_test': False,
2295 }, 2287 },
2296 'CreateStreamTextureCHROMIUM': { 2288 'CreateStreamTextureCHROMIUM': {
2297 'type': 'HandWritten', 2289 'type': 'HandWritten',
2298 'impl_func': False, 2290 'impl_func': False,
2299 'gen_cmd': False, 2291 'gen_cmd': False,
2300 'immediate': False,
2301 'extension': True, 2292 'extension': True,
2302 'chromium': True, 2293 'chromium': True,
2303 }, 2294 },
2304 'TexImageIOSurface2DCHROMIUM': { 2295 'TexImageIOSurface2DCHROMIUM': {
2305 'decoder_func': 'DoTexImageIOSurface2DCHROMIUM', 2296 'decoder_func': 'DoTexImageIOSurface2DCHROMIUM',
2306 'unit_test': False, 2297 'unit_test': False,
2307 'extension': True, 2298 'extension': True,
2308 'chromium': True, 2299 'chromium': True,
2309 }, 2300 },
2310 'CopyTextureCHROMIUM': { 2301 'CopyTextureCHROMIUM': {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
2372 'pepper_interface': 'Query', 2363 'pepper_interface': 'Query',
2373 }, 2364 },
2374 'IsQueryEXT': { 2365 'IsQueryEXT': {
2375 'gen_cmd': False, 2366 'gen_cmd': False,
2376 'client_test': False, 2367 'client_test': False,
2377 'pepper_interface': 'Query', 2368 'pepper_interface': 'Query',
2378 }, 2369 },
2379 'BeginQueryEXT': { 2370 'BeginQueryEXT': {
2380 'type': 'Manual', 2371 'type': 'Manual',
2381 'cmd_args': 'GLenumQueryTarget target, GLidQuery id, void* sync_data', 2372 'cmd_args': 'GLenumQueryTarget target, GLidQuery id, void* sync_data',
2382 'immediate': False, 2373 'data_transfer_methods': ['shm'],
2383 'gl_test_func': 'glBeginQuery', 2374 'gl_test_func': 'glBeginQuery',
2384 'pepper_interface': 'Query', 2375 'pepper_interface': 'Query',
2385 }, 2376 },
2386 'EndQueryEXT': { 2377 'EndQueryEXT': {
2387 'type': 'Manual', 2378 'type': 'Manual',
2388 'cmd_args': 'GLenumQueryTarget target, GLuint submit_count', 2379 'cmd_args': 'GLenumQueryTarget target, GLuint submit_count',
2389 'gl_test_func': 'glEndnQuery', 2380 'gl_test_func': 'glEndnQuery',
2390 'client_test': False, 2381 'client_test': False,
2391 'pepper_interface': 'Query', 2382 'pepper_interface': 'Query',
2392 }, 2383 },
2393 'GetQueryivEXT': { 2384 'GetQueryivEXT': {
2394 'gen_cmd': False, 2385 'gen_cmd': False,
2395 'client_test': False, 2386 'client_test': False,
2396 'gl_test_func': 'glGetQueryiv', 2387 'gl_test_func': 'glGetQueryiv',
2397 'pepper_interface': 'Query', 2388 'pepper_interface': 'Query',
2398 }, 2389 },
2399 'GetQueryObjectuivEXT': { 2390 'GetQueryObjectuivEXT': {
2400 'gen_cmd': False, 2391 'gen_cmd': False,
2401 'client_test': False, 2392 'client_test': False,
2402 'gl_test_func': 'glGetQueryObjectuiv', 2393 'gl_test_func': 'glGetQueryObjectuiv',
2403 'pepper_interface': 'Query', 2394 'pepper_interface': 'Query',
2404 }, 2395 },
2405 'BindUniformLocationCHROMIUM': { 2396 'BindUniformLocationCHROMIUM': {
2406 'type': 'GLchar', 2397 'type': 'GLchar',
2407 'extension': True, 2398 'extension': True,
2408 'bucket': True, 2399 'data_transfer_methods': ['bucket'],
2409 'needs_size': True, 2400 'needs_size': True,
2410 'gl_test_func': 'DoBindUniformLocationCHROMIUM', 2401 'gl_test_func': 'DoBindUniformLocationCHROMIUM',
2411 'immediate': False,
2412 }, 2402 },
2413 'InsertEventMarkerEXT': { 2403 'InsertEventMarkerEXT': {
2414 'type': 'GLcharN', 2404 'type': 'GLcharN',
2415 'decoder_func': 'DoInsertEventMarkerEXT', 2405 'decoder_func': 'DoInsertEventMarkerEXT',
2416 'expectation': False, 2406 'expectation': False,
2417 'extension': True, 2407 'extension': True,
2418 }, 2408 },
2419 'PushGroupMarkerEXT': { 2409 'PushGroupMarkerEXT': {
2420 'type': 'GLcharN', 2410 'type': 'GLcharN',
2421 'decoder_func': 'DoPushGroupMarkerEXT', 2411 'decoder_func': 'DoPushGroupMarkerEXT',
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
2484 'ShallowFlushCHROMIUM': { 2474 'ShallowFlushCHROMIUM': {
2485 'impl_func': False, 2475 'impl_func': False,
2486 'gen_cmd': False, 2476 'gen_cmd': False,
2487 'extension': True, 2477 'extension': True,
2488 'chromium': True, 2478 'chromium': True,
2489 'client_test': False, 2479 'client_test': False,
2490 }, 2480 },
2491 'TraceBeginCHROMIUM': { 2481 'TraceBeginCHROMIUM': {
2492 'type': 'Custom', 2482 'type': 'Custom',
2493 'impl_func': False, 2483 'impl_func': False,
2494 'immediate': False,
2495 'client_test': False, 2484 'client_test': False,
2496 'cmd_args': 'GLuint bucket_id', 2485 'cmd_args': 'GLuint bucket_id',
2497 'extension': True, 2486 'extension': True,
2498 'chromium': True, 2487 'chromium': True,
2499 }, 2488 },
2500 'TraceEndCHROMIUM': { 2489 'TraceEndCHROMIUM': {
2501 'impl_func': False, 2490 'impl_func': False,
2502 'immediate': False,
2503 'client_test': False, 2491 'client_test': False,
2504 'decoder_func': 'DoTraceEndCHROMIUM', 2492 'decoder_func': 'DoTraceEndCHROMIUM',
2505 'unit_test': False, 2493 'unit_test': False,
2506 'extension': True, 2494 'extension': True,
2507 'chromium': True, 2495 'chromium': True,
2508 }, 2496 },
2509 'AsyncTexImage2DCHROMIUM': { 2497 'AsyncTexImage2DCHROMIUM': {
2510 'type': 'Manual', 2498 'type': 'Manual',
2511 'immediate': False, 2499 'data_transfer_methods': ['shm'],
2512 'client_test': False, 2500 'client_test': False,
2513 'cmd_args': 'GLenumTextureTarget target, GLint level, ' 2501 'cmd_args': 'GLenumTextureTarget target, GLint level, '
2514 'GLintTextureInternalFormat internalformat, ' 2502 'GLintTextureInternalFormat internalformat, '
2515 'GLsizei width, GLsizei height, ' 2503 'GLsizei width, GLsizei height, '
2516 'GLintTextureBorder border, ' 2504 'GLintTextureBorder border, '
2517 'GLenumTextureFormat format, GLenumPixelType type, ' 2505 'GLenumTextureFormat format, GLenumPixelType type, '
2518 'const void* pixels, ' 2506 'const void* pixels, '
2519 'uint32_t async_upload_token, ' 2507 'uint32_t async_upload_token, '
2520 'void* sync_data', 2508 'void* sync_data',
2521 'extension': True, 2509 'extension': True,
2522 'chromium': True, 2510 'chromium': True,
2523 }, 2511 },
2524 'AsyncTexSubImage2DCHROMIUM': { 2512 'AsyncTexSubImage2DCHROMIUM': {
2525 'type': 'Manual', 2513 'type': 'Manual',
2526 'immediate': False, 2514 'data_transfer_methods': ['shm'],
2527 'client_test': False, 2515 'client_test': False,
2528 'cmd_args': 'GLenumTextureTarget target, GLint level, ' 2516 'cmd_args': 'GLenumTextureTarget target, GLint level, '
2529 'GLint xoffset, GLint yoffset, ' 2517 'GLint xoffset, GLint yoffset, '
2530 'GLsizei width, GLsizei height, ' 2518 'GLsizei width, GLsizei height, '
2531 'GLenumTextureFormat format, GLenumPixelType type, ' 2519 'GLenumTextureFormat format, GLenumPixelType type, '
2532 'const void* data, ' 2520 'const void* data, '
2533 'uint32_t async_upload_token, ' 2521 'uint32_t async_upload_token, '
2534 'void* sync_data', 2522 'void* sync_data',
2535 'extension': True, 2523 'extension': True,
2536 'chromium': True, 2524 'chromium': True,
2537 }, 2525 },
2538 'WaitAsyncTexImage2DCHROMIUM': { 2526 'WaitAsyncTexImage2DCHROMIUM': {
2539 'type': 'Manual', 2527 'type': 'Manual',
2540 'immediate': False,
2541 'client_test': False, 2528 'client_test': False,
2542 'extension': True, 2529 'extension': True,
2543 'chromium': True, 2530 'chromium': True,
2544 }, 2531 },
2545 'WaitAllAsyncTexImage2DCHROMIUM': { 2532 'WaitAllAsyncTexImage2DCHROMIUM': {
2546 'type': 'Manual', 2533 'type': 'Manual',
2547 'immediate': False,
2548 'client_test': False, 2534 'client_test': False,
2549 'extension': True, 2535 'extension': True,
2550 'chromium': True, 2536 'chromium': True,
2551 }, 2537 },
2552 'DiscardFramebufferEXT': { 2538 'DiscardFramebufferEXT': {
2553 'type': 'PUTn', 2539 'type': 'PUTn',
2554 'count': 1, 2540 'count': 1,
2555 'cmd_args': 'GLenum target, GLsizei count, ' 2541 'cmd_args': 'GLenum target, GLsizei count, '
2556 'const GLenum* attachments', 2542 'const GLenum* attachments',
2557 'decoder_func': 'DoDiscardFramebufferEXT', 2543 'decoder_func': 'DoDiscardFramebufferEXT',
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
2718 _remove_expected_call_re = re.compile(r' EXPECT_CALL.*?;\n', re.S) 2704 _remove_expected_call_re = re.compile(r' EXPECT_CALL.*?;\n', re.S)
2719 2705
2720 def __init__(self): 2706 def __init__(self):
2721 pass 2707 pass
2722 2708
2723 def InitFunction(self, func): 2709 def InitFunction(self, func):
2724 """Add or adjust anything type specific for this function.""" 2710 """Add or adjust anything type specific for this function."""
2725 if func.GetInfo('needs_size') and not func.name.endswith('Bucket'): 2711 if func.GetInfo('needs_size') and not func.name.endswith('Bucket'):
2726 func.AddCmdArg(DataSizeArgument('data_size')) 2712 func.AddCmdArg(DataSizeArgument('data_size'))
2727 2713
2728 def AddImmediateFunction(self, generator, func): 2714 def NeedsDataTransferFunction(self, func):
2729 """Adds an immediate version of a function.""" 2715 """Overriden from TypeHandler."""
2730 # Generate an immediate command if there is only 1 pointer arg. 2716 return func.num_pointer_args >= 1
2731 immediate = func.GetInfo('immediate') # can be True, False or None
2732 if immediate == True or immediate == None:
2733 if func.num_pointer_args == 1 or immediate:
2734 generator.AddFunction(ImmediateFunction(func))
2735 return True
2736
2737 def AddBucketFunction(self, generator, func):
2738 """Adds a bucket version of a function."""
2739 # Generate an immediate command if there is only 1 pointer arg.
2740 bucket = func.GetInfo('bucket') # can be True, False or None
2741 if bucket:
2742 generator.AddFunction(BucketFunction(func))
2743 2717
2744 def WriteStruct(self, func, file): 2718 def WriteStruct(self, func, file):
2745 """Writes a structure that matches the arguments to a function.""" 2719 """Writes a structure that matches the arguments to a function."""
2746 comment = func.GetInfo('cmd_comment') 2720 comment = func.GetInfo('cmd_comment')
2747 if not comment == None: 2721 if not comment == None:
2748 file.Write(comment) 2722 file.Write(comment)
2749 file.Write("struct %s {\n" % func.name) 2723 file.Write("struct %s {\n" % func.name)
2750 file.Write(" typedef %s ValueType;\n" % func.name) 2724 file.Write(" typedef %s ValueType;\n" % func.name)
2751 file.Write(" static const CommandId kCmdId = k%s;\n" % func.name) 2725 file.Write(" static const CommandId kCmdId = k%s;\n" % func.name)
2752 func.WriteCmdArgFlag(file) 2726 func.WriteCmdArgFlag(file)
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
3587 file.Write(" static_cast<ValueType*>(cmd)->Init(%s);\n" % copy_args) 3561 file.Write(" static_cast<ValueType*>(cmd)->Init(%s);\n" % copy_args)
3588 file.Write(" return NextImmediateCmdAddressTotalSize<ValueType>(" 3562 file.Write(" return NextImmediateCmdAddressTotalSize<ValueType>("
3589 "cmd, total_size);\n") 3563 "cmd, total_size);\n")
3590 file.Write(" }\n") 3564 file.Write(" }\n")
3591 file.Write("\n") 3565 file.Write("\n")
3592 3566
3593 3567
3594 class TodoHandler(CustomHandler): 3568 class TodoHandler(CustomHandler):
3595 """Handle for commands that are not yet implemented.""" 3569 """Handle for commands that are not yet implemented."""
3596 3570
3597 def AddImmediateFunction(self, generator, func): 3571 def NeedsDataTransferFunction(self, func):
3598 """Overrriden from TypeHandler.""" 3572 """Overriden from TypeHandler."""
3599 pass 3573 return False
3600 3574
3601 def WriteImmediateFormatTest(self, func, file): 3575 def WriteImmediateFormatTest(self, func, file):
3602 """Overrriden from TypeHandler.""" 3576 """Overrriden from TypeHandler."""
3603 pass 3577 pass
3604 3578
3605 def WriteGLES2ImplementationUnitTest(self, func, file): 3579 def WriteGLES2ImplementationUnitTest(self, func, file):
3606 """Overrriden from TypeHandler.""" 3580 """Overrriden from TypeHandler."""
3607 pass 3581 pass
3608 3582
3609 def WriteGLES2Implementation(self, func, file): 3583 def WriteGLES2Implementation(self, func, file):
(...skipping 29 matching lines...) Expand all
3639 3613
3640 3614
3641 class HandWrittenHandler(CustomHandler): 3615 class HandWrittenHandler(CustomHandler):
3642 """Handler for comands where everything must be written by hand.""" 3616 """Handler for comands where everything must be written by hand."""
3643 3617
3644 def InitFunction(self, func): 3618 def InitFunction(self, func):
3645 """Add or adjust anything type specific for this function.""" 3619 """Add or adjust anything type specific for this function."""
3646 CustomHandler.InitFunction(self, func) 3620 CustomHandler.InitFunction(self, func)
3647 func.can_auto_generate = False 3621 func.can_auto_generate = False
3648 3622
3623 def NeedsDataTransferFunction(self, func):
3624 """Overriden from TypeHandler."""
3625 # If specified explicitly, force the data transfer method.
3626 if func.GetInfo('data_transfer_methods'):
3627 return True
Kimmo Kinnunen 2014/06/16 06:09:25 Had to add this in order to support correct ...Imm
3628 return False
3629
3649 def WriteStruct(self, func, file): 3630 def WriteStruct(self, func, file):
3650 """Overrriden from TypeHandler.""" 3631 """Overrriden from TypeHandler."""
3651 pass 3632 pass
3652 3633
3653 def WriteDocs(self, func, file): 3634 def WriteDocs(self, func, file):
3654 """Overrriden from TypeHandler.""" 3635 """Overrriden from TypeHandler."""
3655 pass 3636 pass
3656 3637
3657 def WriteServiceUnitTest(self, func, file): 3638 def WriteServiceUnitTest(self, func, file):
3658 """Overrriden from TypeHandler.""" 3639 """Overrriden from TypeHandler."""
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
4608 file.Write("}\n") 4589 file.Write("}\n")
4609 file.Write("\n") 4590 file.Write("\n")
4610 4591
4611 4592
4612 class GETnHandler(TypeHandler): 4593 class GETnHandler(TypeHandler):
4613 """Handler for GETn for glGetBooleanv, glGetFloatv, ... type functions.""" 4594 """Handler for GETn for glGetBooleanv, glGetFloatv, ... type functions."""
4614 4595
4615 def __init__(self): 4596 def __init__(self):
4616 TypeHandler.__init__(self) 4597 TypeHandler.__init__(self)
4617 4598
4618 def AddImmediateFunction(self, generator, func): 4599 def NeedsDataTransferFunction(self, func):
4619 """Overrriden from TypeHandler.""" 4600 """Overriden from TypeHandler."""
4620 pass 4601 return False
4621 4602
4622 def WriteServiceImplementation(self, func, file): 4603 def WriteServiceImplementation(self, func, file):
4623 """Overrriden from TypeHandler.""" 4604 """Overrriden from TypeHandler."""
4624 file.Write( 4605 file.Write(
4625 "error::Error GLES2DecoderImpl::Handle%s(\n" % func.name) 4606 "error::Error GLES2DecoderImpl::Handle%s(\n" % func.name)
4626 file.Write( 4607 file.Write(
4627 " uint32_t immediate_data_size, const gles2::cmds::%s& c) {\n" % 4608 " uint32_t immediate_data_size, const gles2::cmds::%s& c) {\n" %
4628 func.name) 4609 func.name)
4629 last_arg = func.GetLastOriginalArg() 4610 last_arg = func.GetLastOriginalArg()
4630 4611
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
5614 """Handler for functions that pass a single string with an optional len.""" 5595 """Handler for functions that pass a single string with an optional len."""
5615 5596
5616 def __init__(self): 5597 def __init__(self):
5617 CustomHandler.__init__(self) 5598 CustomHandler.__init__(self)
5618 5599
5619 def InitFunction(self, func): 5600 def InitFunction(self, func):
5620 """Overrriden from TypeHandler.""" 5601 """Overrriden from TypeHandler."""
5621 func.cmd_args = [] 5602 func.cmd_args = []
5622 func.AddCmdArg(Argument('bucket_id', 'GLuint')) 5603 func.AddCmdArg(Argument('bucket_id', 'GLuint'))
5623 5604
5624 def AddImmediateFunction(self, generator, func): 5605 def NeedsDataTransferFunction(self, func):
5625 """Overrriden from TypeHandler.""" 5606 """Overriden from TypeHandler."""
5626 pass 5607 return False
5627 5608
5628 def AddBucketFunction(self, generator, func): 5609 def AddBucketFunction(self, generator, func):
5629 """Overrriden from TypeHandler.""" 5610 """Overrriden from TypeHandler."""
5630 pass 5611 pass
5631 5612
5632 def WriteServiceImplementation(self, func, file): 5613 def WriteServiceImplementation(self, func, file):
5633 """Overrriden from TypeHandler.""" 5614 """Overrriden from TypeHandler."""
5634 file.Write("""error::Error GLES2DecoderImpl::Handle%(name)s( 5615 file.Write("""error::Error GLES2DecoderImpl::Handle%(name)s(
5635 uint32_t immediate_data_size, const gles2::cmds::%(name)s& c) { 5616 uint32_t immediate_data_size, const gles2::cmds::%(name)s& c) {
5636 GLuint bucket_id = static_cast<GLuint>(c.%(bucket_id)s); 5617 GLuint bucket_id = static_cast<GLuint>(c.%(bucket_id)s);
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
6772 def GetGLTestFunctionName(self): 6753 def GetGLTestFunctionName(self):
6773 gl_func_name = self.GetInfo('gl_test_func') 6754 gl_func_name = self.GetInfo('gl_test_func')
6774 if gl_func_name == None: 6755 if gl_func_name == None:
6775 gl_func_name = self.GetGLFunctionName() 6756 gl_func_name = self.GetGLFunctionName()
6776 if gl_func_name.startswith("gl"): 6757 if gl_func_name.startswith("gl"):
6777 gl_func_name = gl_func_name[2:] 6758 gl_func_name = gl_func_name[2:]
6778 else: 6759 else:
6779 gl_func_name = self.original_name 6760 gl_func_name = self.original_name
6780 return gl_func_name 6761 return gl_func_name
6781 6762
6763 def GetDataTransferMethods(self):
6764 return self.GetInfo('data_transfer_methods',
6765 ['immediate' if self.num_pointer_args == 1 else 'shm'])
6766
6782 def AddCmdArg(self, arg): 6767 def AddCmdArg(self, arg):
6783 """Adds a cmd argument to this function.""" 6768 """Adds a cmd argument to this function."""
6784 self.cmd_args.append(arg) 6769 self.cmd_args.append(arg)
6785 6770
6786 def GetCmdArgs(self): 6771 def GetCmdArgs(self):
6787 """Gets the command args for this function.""" 6772 """Gets the command args for this function."""
6788 return self.cmd_args 6773 return self.cmd_args
6789 6774
6790 def ClearCmdArgs(self): 6775 def ClearCmdArgs(self):
6791 """Clears the command args for this function.""" 6776 """Clears the command args for this function."""
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
7326 7311
7327 f = Function(func_name, func_info) 7312 f = Function(func_name, func_info)
7328 self.original_functions.append(f) 7313 self.original_functions.append(f)
7329 7314
7330 #for arg in f.GetOriginalArgs(): 7315 #for arg in f.GetOriginalArgs():
7331 # if not isinstance(arg, EnumArgument) and arg.type == 'GLenum': 7316 # if not isinstance(arg, EnumArgument) and arg.type == 'GLenum':
7332 # self.Log("%s uses bare GLenum %s." % (func_name, arg.name)) 7317 # self.Log("%s uses bare GLenum %s." % (func_name, arg.name))
7333 7318
7334 gen_cmd = f.GetInfo('gen_cmd') 7319 gen_cmd = f.GetInfo('gen_cmd')
7335 if gen_cmd == True or gen_cmd == None: 7320 if gen_cmd == True or gen_cmd == None:
7336 if not f.type_handler.AddImmediateFunction(self, f): 7321 if f.type_handler.NeedsDataTransferFunction(f):
7322 methods = f.GetDataTransferMethods()
7323 if 'immediate' in methods:
7324 self.AddFunction(ImmediateFunction(f))
7325 if 'bucket' in methods:
7326 self.AddFunction(BucketFunction(f))
7327 if 'shm' in methods:
7328 self.AddFunction(f)
7329 else:
7337 self.AddFunction(f) 7330 self.AddFunction(f)
7338 f.type_handler.AddBucketFunction(self, f)
7339 7331
7340 self.Log("Auto Generated Functions : %d" % 7332 self.Log("Auto Generated Functions : %d" %
7341 len([f for f in self.functions if f.can_auto_generate or 7333 len([f for f in self.functions if f.can_auto_generate or
7342 (not f.IsType('') and not f.IsType('Custom') and 7334 (not f.IsType('') and not f.IsType('Custom') and
7343 not f.IsType('Todo'))])) 7335 not f.IsType('Todo'))]))
7344 7336
7345 funcs = [f for f in self.functions if not f.can_auto_generate and 7337 funcs = [f for f in self.functions if not f.can_auto_generate and
7346 (f.IsType('') or f.IsType('Custom') or f.IsType('Todo'))] 7338 (f.IsType('') or f.IsType('Custom') or f.IsType('Todo'))]
7347 self.Log("Non Auto Generated Functions: %d" % len(funcs)) 7339 self.Log("Non Auto Generated Functions: %d" % len(funcs))
7348 7340
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
8358 "ppapi/shared_impl/ppb_opengles2_shared.cc"]) 8350 "ppapi/shared_impl/ppb_opengles2_shared.cc"])
8359 8351
8360 if gen.errors > 0: 8352 if gen.errors > 0:
8361 print "%d errors" % gen.errors 8353 print "%d errors" % gen.errors
8362 return 1 8354 return 1
8363 return 0 8355 return 0
8364 8356
8365 8357
8366 if __name__ == '__main__': 8358 if __name__ == '__main__':
8367 sys.exit(main(sys.argv[1:])) 8359 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_cmd_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698