| 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 2357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2368 # shadowed: True = the value is shadowed so no glGetXXX call will be made. | 2368 # shadowed: True = the value is shadowed so no glGetXXX call will be made. |
| 2369 # first_element_only: For PUT types, True if only the first element of an | 2369 # first_element_only: For PUT types, True if only the first element of an |
| 2370 # array is used and we end up calling the single value | 2370 # array is used and we end up calling the single value |
| 2371 # corresponding function. eg. TexParameteriv -> TexParameteri | 2371 # corresponding function. eg. TexParameteriv -> TexParameteri |
| 2372 # extension: Function is an extension to GL and should not be exposed to | 2372 # extension: Function is an extension to GL and should not be exposed to |
| 2373 # pepper unless pepper_interface is defined. | 2373 # pepper unless pepper_interface is defined. |
| 2374 # extension_flag: Function is an extension and should be enabled only when | 2374 # extension_flag: Function is an extension and should be enabled only when |
| 2375 # the corresponding feature info flag is enabled. Implies | 2375 # the corresponding feature info flag is enabled. Implies |
| 2376 # 'extension': True. | 2376 # 'extension': True. |
| 2377 # not_shared: For GENn types, True if objects can't be shared between contexts | 2377 # not_shared: For GENn types, True if objects can't be shared between contexts |
| 2378 # unsafe: True = no validation is implemented on the service side and the | 2378 # es3: ES3 API. True if the function requires an ES3 or WebGL2 context. |
| 2379 # command is only available with --enable-unsafe-es3-apis. | |
| 2380 # id_mapping: A list of resource type names whose client side IDs need to be | 2379 # id_mapping: A list of resource type names whose client side IDs need to be |
| 2381 # mapped to service side IDs. This is only used for unsafe APIs. | 2380 # mapped to service side IDs. This is only used for ES3 APIs. |
| 2382 | 2381 |
| 2383 _FUNCTION_INFO = { | 2382 _FUNCTION_INFO = { |
| 2384 'ActiveTexture': { | 2383 'ActiveTexture': { |
| 2385 'decoder_func': 'DoActiveTexture', | 2384 'decoder_func': 'DoActiveTexture', |
| 2386 'unit_test': False, | 2385 'unit_test': False, |
| 2387 'impl_func': False, | 2386 'impl_func': False, |
| 2388 'client_test': False, | 2387 'client_test': False, |
| 2389 }, | 2388 }, |
| 2390 'ApplyScreenSpaceAntialiasingCHROMIUM': { | 2389 'ApplyScreenSpaceAntialiasingCHROMIUM': { |
| 2391 'decoder_func': 'DoApplyScreenSpaceAntialiasingCHROMIUM', | 2390 'decoder_func': 'DoApplyScreenSpaceAntialiasingCHROMIUM', |
| (...skipping 11 matching lines...) Expand all Loading... |
| 2403 'BindBuffer': { | 2402 'BindBuffer': { |
| 2404 'type': 'Bind', | 2403 'type': 'Bind', |
| 2405 'decoder_func': 'DoBindBuffer', | 2404 'decoder_func': 'DoBindBuffer', |
| 2406 'gen_func': 'GenBuffersARB', | 2405 'gen_func': 'GenBuffersARB', |
| 2407 }, | 2406 }, |
| 2408 'BindBufferBase': { | 2407 'BindBufferBase': { |
| 2409 'type': 'Bind', | 2408 'type': 'Bind', |
| 2410 'decoder_func': 'DoBindBufferBase', | 2409 'decoder_func': 'DoBindBufferBase', |
| 2411 'gen_func': 'GenBuffersARB', | 2410 'gen_func': 'GenBuffersARB', |
| 2412 'unit_test': False, | 2411 'unit_test': False, |
| 2413 'unsafe': True, | 2412 'es3': True, |
| 2414 }, | 2413 }, |
| 2415 'BindBufferRange': { | 2414 'BindBufferRange': { |
| 2416 'type': 'Bind', | 2415 'type': 'Bind', |
| 2417 'decoder_func': 'DoBindBufferRange', | 2416 'decoder_func': 'DoBindBufferRange', |
| 2418 'gen_func': 'GenBuffersARB', | 2417 'gen_func': 'GenBuffersARB', |
| 2419 'unit_test': False, | 2418 'unit_test': False, |
| 2420 'valid_args': { | 2419 'valid_args': { |
| 2421 '3': '4', | 2420 '3': '4', |
| 2422 '4': '4' | 2421 '4': '4' |
| 2423 }, | 2422 }, |
| 2424 'unsafe': True, | 2423 'es3': True, |
| 2425 }, | 2424 }, |
| 2426 'BindFramebuffer': { | 2425 'BindFramebuffer': { |
| 2427 'type': 'Bind', | 2426 'type': 'Bind', |
| 2428 'decoder_func': 'DoBindFramebuffer', | 2427 'decoder_func': 'DoBindFramebuffer', |
| 2429 'gl_test_func': 'glBindFramebufferEXT', | 2428 'gl_test_func': 'glBindFramebufferEXT', |
| 2430 'gen_func': 'GenFramebuffersEXT', | 2429 'gen_func': 'GenFramebuffersEXT', |
| 2431 'trace_level': 1, | 2430 'trace_level': 1, |
| 2432 }, | 2431 }, |
| 2433 'BindRenderbuffer': { | 2432 'BindRenderbuffer': { |
| 2434 'type': 'Bind', | 2433 'type': 'Bind', |
| 2435 'decoder_func': 'DoBindRenderbuffer', | 2434 'decoder_func': 'DoBindRenderbuffer', |
| 2436 'gl_test_func': 'glBindRenderbufferEXT', | 2435 'gl_test_func': 'glBindRenderbufferEXT', |
| 2437 'gen_func': 'GenRenderbuffersEXT', | 2436 'gen_func': 'GenRenderbuffersEXT', |
| 2438 }, | 2437 }, |
| 2439 'BindSampler': { | 2438 'BindSampler': { |
| 2440 'type': 'Bind', | 2439 'type': 'Bind', |
| 2441 'decoder_func': 'DoBindSampler', | 2440 'decoder_func': 'DoBindSampler', |
| 2442 'unsafe': True, | 2441 'es3': True, |
| 2443 }, | 2442 }, |
| 2444 'BindTexture': { | 2443 'BindTexture': { |
| 2445 'type': 'Bind', | 2444 'type': 'Bind', |
| 2446 'decoder_func': 'DoBindTexture', | 2445 'decoder_func': 'DoBindTexture', |
| 2447 'gen_func': 'GenTextures', | 2446 'gen_func': 'GenTextures', |
| 2448 # TODO: remove this once client side caching works. | 2447 # TODO: remove this once client side caching works. |
| 2449 'client_test': False, | 2448 'client_test': False, |
| 2450 'unit_test': False, | 2449 'unit_test': False, |
| 2451 'trace_level': 2, | 2450 'trace_level': 2, |
| 2452 }, | 2451 }, |
| 2453 'BindTransformFeedback': { | 2452 'BindTransformFeedback': { |
| 2454 'type': 'Bind', | 2453 'type': 'Bind', |
| 2455 'decoder_func': 'DoBindTransformFeedback', | 2454 'decoder_func': 'DoBindTransformFeedback', |
| 2456 'unsafe': True, | 2455 'es3': True, |
| 2457 'unit_test': False, | 2456 'unit_test': False, |
| 2458 }, | 2457 }, |
| 2459 'BlitFramebufferCHROMIUM': { | 2458 'BlitFramebufferCHROMIUM': { |
| 2460 'decoder_func': 'DoBlitFramebufferCHROMIUM', | 2459 'decoder_func': 'DoBlitFramebufferCHROMIUM', |
| 2461 'unit_test': False, | 2460 'unit_test': False, |
| 2462 'extension': 'chromium_framebuffer_multisample', | 2461 'extension': 'chromium_framebuffer_multisample', |
| 2463 'extension_flag': 'chromium_framebuffer_multisample', | 2462 'extension_flag': 'chromium_framebuffer_multisample', |
| 2464 'pepper_interface': 'FramebufferBlit', | 2463 'pepper_interface': 'FramebufferBlit', |
| 2465 'pepper_name': 'BlitFramebufferEXT', | 2464 'pepper_name': 'BlitFramebufferEXT', |
| 2466 'defer_reads': True, | 2465 'defer_reads': True, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 2492 'decoder_func': 'DoClear', | 2491 'decoder_func': 'DoClear', |
| 2493 'defer_draws': True, | 2492 'defer_draws': True, |
| 2494 'trace_level': 2, | 2493 'trace_level': 2, |
| 2495 }, | 2494 }, |
| 2496 'ClearBufferiv': { | 2495 'ClearBufferiv': { |
| 2497 'type': 'PUT', | 2496 'type': 'PUT', |
| 2498 'use_count_func': True, | 2497 'use_count_func': True, |
| 2499 'count': 4, | 2498 'count': 4, |
| 2500 'decoder_func': 'DoClearBufferiv', | 2499 'decoder_func': 'DoClearBufferiv', |
| 2501 'unit_test': False, | 2500 'unit_test': False, |
| 2502 'unsafe': True, | 2501 'es3': True, |
| 2503 'trace_level': 2, | 2502 'trace_level': 2, |
| 2504 }, | 2503 }, |
| 2505 'ClearBufferuiv': { | 2504 'ClearBufferuiv': { |
| 2506 'type': 'PUT', | 2505 'type': 'PUT', |
| 2507 'count': 4, | 2506 'count': 4, |
| 2508 'decoder_func': 'DoClearBufferuiv', | 2507 'decoder_func': 'DoClearBufferuiv', |
| 2509 'unit_test': False, | 2508 'unit_test': False, |
| 2510 'unsafe': True, | 2509 'es3': True, |
| 2511 'trace_level': 2, | 2510 'trace_level': 2, |
| 2512 }, | 2511 }, |
| 2513 'ClearBufferfv': { | 2512 'ClearBufferfv': { |
| 2514 'type': 'PUT', | 2513 'type': 'PUT', |
| 2515 'use_count_func': True, | 2514 'use_count_func': True, |
| 2516 'count': 4, | 2515 'count': 4, |
| 2517 'decoder_func': 'DoClearBufferfv', | 2516 'decoder_func': 'DoClearBufferfv', |
| 2518 'unit_test': False, | 2517 'unit_test': False, |
| 2519 'unsafe': True, | 2518 'es3': True, |
| 2520 'trace_level': 2, | 2519 'trace_level': 2, |
| 2521 }, | 2520 }, |
| 2522 'ClearBufferfi': { | 2521 'ClearBufferfi': { |
| 2523 'unsafe': True, | 2522 'es3': True, |
| 2524 'decoder_func': 'DoClearBufferfi', | 2523 'decoder_func': 'DoClearBufferfi', |
| 2525 'unit_test': False, | 2524 'unit_test': False, |
| 2526 'trace_level': 2, | 2525 'trace_level': 2, |
| 2527 }, | 2526 }, |
| 2528 'ClearColor': { | 2527 'ClearColor': { |
| 2529 'type': 'StateSet', | 2528 'type': 'StateSet', |
| 2530 'state': 'ClearColor', | 2529 'state': 'ClearColor', |
| 2531 }, | 2530 }, |
| 2532 'ClearDepthf': { | 2531 'ClearDepthf': { |
| 2533 'type': 'StateSet', | 2532 'type': 'StateSet', |
| 2534 'state': 'ClearDepthf', | 2533 'state': 'ClearDepthf', |
| 2535 'decoder_func': 'glClearDepth', | 2534 'decoder_func': 'glClearDepth', |
| 2536 'gl_test_func': 'glClearDepth', | 2535 'gl_test_func': 'glClearDepth', |
| 2537 'valid_args': { | 2536 'valid_args': { |
| 2538 '0': '0.5f' | 2537 '0': '0.5f' |
| 2539 }, | 2538 }, |
| 2540 }, | 2539 }, |
| 2541 'ClientWaitSync': { | 2540 'ClientWaitSync': { |
| 2542 'type': 'Custom', | 2541 'type': 'Custom', |
| 2543 'data_transfer_methods': ['shm'], | 2542 'data_transfer_methods': ['shm'], |
| 2544 'cmd_args': 'GLuint sync, GLbitfieldSyncFlushFlags flags, ' | 2543 'cmd_args': 'GLuint sync, GLbitfieldSyncFlushFlags flags, ' |
| 2545 'GLuint64 timeout, GLenum* result', | 2544 'GLuint64 timeout, GLenum* result', |
| 2546 'unsafe': True, | 2545 'es3': True, |
| 2547 'result': ['GLenum'], | 2546 'result': ['GLenum'], |
| 2548 'trace_level': 2, | 2547 'trace_level': 2, |
| 2549 }, | 2548 }, |
| 2550 'ColorMask': { | 2549 'ColorMask': { |
| 2551 'type': 'StateSet', | 2550 'type': 'StateSet', |
| 2552 'state': 'ColorMask', | 2551 'state': 'ColorMask', |
| 2553 'no_gl': True, | 2552 'no_gl': True, |
| 2554 'expectation': False, | 2553 'expectation': False, |
| 2555 }, | 2554 }, |
| 2556 'ConsumeTextureCHROMIUM': { | 2555 'ConsumeTextureCHROMIUM': { |
| 2557 'decoder_func': 'DoConsumeTextureCHROMIUM', | 2556 'decoder_func': 'DoConsumeTextureCHROMIUM', |
| 2558 'impl_func': False, | 2557 'impl_func': False, |
| 2559 'type': 'PUT', | 2558 'type': 'PUT', |
| 2560 'count': 64, # GL_MAILBOX_SIZE_CHROMIUM | 2559 'count': 64, # GL_MAILBOX_SIZE_CHROMIUM |
| 2561 'unit_test': False, | 2560 'unit_test': False, |
| 2562 'client_test': False, | 2561 'client_test': False, |
| 2563 'extension': "CHROMIUM_texture_mailbox", | 2562 'extension': "CHROMIUM_texture_mailbox", |
| 2564 'trace_level': 2, | 2563 'trace_level': 2, |
| 2565 }, | 2564 }, |
| 2566 'CopyBufferSubData': { | 2565 'CopyBufferSubData': { |
| 2567 'decoder_func': 'DoCopyBufferSubData', | 2566 'decoder_func': 'DoCopyBufferSubData', |
| 2568 'unit_test': False, | 2567 'unit_test': False, |
| 2569 'unsafe': True, | 2568 'es3': True, |
| 2570 }, | 2569 }, |
| 2571 'CoverageModulationCHROMIUM': { | 2570 'CoverageModulationCHROMIUM': { |
| 2572 'type': 'StateSet', | 2571 'type': 'StateSet', |
| 2573 'state': 'CoverageModulationCHROMIUM', | 2572 'state': 'CoverageModulationCHROMIUM', |
| 2574 'decoder_func': 'glCoverageModulationNV', | 2573 'decoder_func': 'glCoverageModulationNV', |
| 2575 'extension': 'CHROMIUM_framebuffer_mixed_samples', | 2574 'extension': 'CHROMIUM_framebuffer_mixed_samples', |
| 2576 'extension_flag': 'chromium_framebuffer_mixed_samples', | 2575 'extension_flag': 'chromium_framebuffer_mixed_samples', |
| 2577 }, | 2576 }, |
| 2578 'CreateAndConsumeTextureCHROMIUM': { | 2577 'CreateAndConsumeTextureCHROMIUM': { |
| 2579 'type': 'NoCommand', | 2578 'type': 'NoCommand', |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2621 }, | 2620 }, |
| 2622 'CopyTexSubImage2D': { | 2621 'CopyTexSubImage2D': { |
| 2623 'decoder_func': 'DoCopyTexSubImage2D', | 2622 'decoder_func': 'DoCopyTexSubImage2D', |
| 2624 'defer_reads': True, | 2623 'defer_reads': True, |
| 2625 'trace_level': 1, | 2624 'trace_level': 1, |
| 2626 }, | 2625 }, |
| 2627 'CompressedTexImage3D': { | 2626 'CompressedTexImage3D': { |
| 2628 'type': 'Data', | 2627 'type': 'Data', |
| 2629 'data_transfer_methods': ['bucket', 'shm'], | 2628 'data_transfer_methods': ['bucket', 'shm'], |
| 2630 'decoder_func': 'DoCompressedTexImage3D', | 2629 'decoder_func': 'DoCompressedTexImage3D', |
| 2631 'unsafe': True, | 2630 'es3': True, |
| 2632 'trace_level': 1, | 2631 'trace_level': 1, |
| 2633 }, | 2632 }, |
| 2634 'CompressedTexSubImage3D': { | 2633 'CompressedTexSubImage3D': { |
| 2635 'type': 'Data', | 2634 'type': 'Data', |
| 2636 'data_transfer_methods': ['bucket', 'shm'], | 2635 'data_transfer_methods': ['bucket', 'shm'], |
| 2637 'decoder_func': 'DoCompressedTexSubImage3D', | 2636 'decoder_func': 'DoCompressedTexSubImage3D', |
| 2638 'unsafe': True, | 2637 'es3': True, |
| 2639 'trace_level': 1, | 2638 'trace_level': 1, |
| 2640 }, | 2639 }, |
| 2641 'CopyTexSubImage3D': { | 2640 'CopyTexSubImage3D': { |
| 2642 'decoder_func': 'DoCopyTexSubImage3D', | 2641 'decoder_func': 'DoCopyTexSubImage3D', |
| 2643 'unit_test': False, | 2642 'unit_test': False, |
| 2644 'defer_reads': True, | 2643 'defer_reads': True, |
| 2645 'unsafe': True, | 2644 'es3': True, |
| 2646 'trace_level': 1, | 2645 'trace_level': 1, |
| 2647 }, | 2646 }, |
| 2648 'CreateImageCHROMIUM': { | 2647 'CreateImageCHROMIUM': { |
| 2649 'type': 'NoCommand', | 2648 'type': 'NoCommand', |
| 2650 'cmd_args': | 2649 'cmd_args': |
| 2651 'ClientBuffer buffer, GLsizei width, GLsizei height, ' | 2650 'ClientBuffer buffer, GLsizei width, GLsizei height, ' |
| 2652 'GLenum internalformat', | 2651 'GLenum internalformat', |
| 2653 'result': ['GLuint'], | 2652 'result': ['GLuint'], |
| 2654 'extension': "CHROMIUM_image", | 2653 'extension': "CHROMIUM_image", |
| 2655 'trace_level': 1, | 2654 'trace_level': 1, |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2773 'type': 'DELn', | 2772 'type': 'DELn', |
| 2774 'gl_test_func': 'glDeleteRenderbuffersEXT', | 2773 'gl_test_func': 'glDeleteRenderbuffersEXT', |
| 2775 'resource_type': 'Renderbuffer', | 2774 'resource_type': 'Renderbuffer', |
| 2776 'resource_types': 'Renderbuffers', | 2775 'resource_types': 'Renderbuffers', |
| 2777 'trace_level': 2, | 2776 'trace_level': 2, |
| 2778 }, | 2777 }, |
| 2779 'DeleteSamplers': { | 2778 'DeleteSamplers': { |
| 2780 'type': 'DELn', | 2779 'type': 'DELn', |
| 2781 'resource_type': 'Sampler', | 2780 'resource_type': 'Sampler', |
| 2782 'resource_types': 'Samplers', | 2781 'resource_types': 'Samplers', |
| 2783 'unsafe': True, | 2782 'es3': True, |
| 2784 }, | 2783 }, |
| 2785 'DeleteShader': { 'type': 'Delete' }, | 2784 'DeleteShader': { 'type': 'Delete' }, |
| 2786 'DeleteSync': { | 2785 'DeleteSync': { |
| 2787 'type': 'Delete', | 2786 'type': 'Delete', |
| 2788 'cmd_args': 'GLuint sync', | 2787 'cmd_args': 'GLuint sync', |
| 2789 'resource_type': 'Sync', | 2788 'resource_type': 'Sync', |
| 2790 'unsafe': True, | 2789 'es3': True, |
| 2791 }, | 2790 }, |
| 2792 'DeleteTextures': { | 2791 'DeleteTextures': { |
| 2793 'type': 'DELn', | 2792 'type': 'DELn', |
| 2794 'resource_type': 'Texture', | 2793 'resource_type': 'Texture', |
| 2795 'resource_types': 'Textures', | 2794 'resource_types': 'Textures', |
| 2796 }, | 2795 }, |
| 2797 'DeleteTransformFeedbacks': { | 2796 'DeleteTransformFeedbacks': { |
| 2798 'type': 'DELn', | 2797 'type': 'DELn', |
| 2799 'resource_type': 'TransformFeedback', | 2798 'resource_type': 'TransformFeedback', |
| 2800 'resource_types': 'TransformFeedbacks', | 2799 'resource_types': 'TransformFeedbacks', |
| 2801 'unsafe': True, | 2800 'es3': True, |
| 2802 'unit_test': False, | 2801 'unit_test': False, |
| 2803 }, | 2802 }, |
| 2804 'DepthRangef': { | 2803 'DepthRangef': { |
| 2805 'decoder_func': 'DoDepthRangef', | 2804 'decoder_func': 'DoDepthRangef', |
| 2806 'gl_test_func': 'glDepthRange', | 2805 'gl_test_func': 'glDepthRange', |
| 2807 }, | 2806 }, |
| 2808 'DepthMask': { | 2807 'DepthMask': { |
| 2809 'type': 'StateSet', | 2808 'type': 'StateSet', |
| 2810 'state': 'DepthMask', | 2809 'state': 'DepthMask', |
| 2811 'no_gl': True, | 2810 'no_gl': True, |
| (...skipping 20 matching lines...) Expand all Loading... |
| 2832 'type': 'Custom', | 2831 'type': 'Custom', |
| 2833 'impl_func': False, | 2832 'impl_func': False, |
| 2834 'cmd_args': 'GLenumDrawMode mode, GLsizei count, ' | 2833 'cmd_args': 'GLenumDrawMode mode, GLsizei count, ' |
| 2835 'GLenumIndexType type, GLuint index_offset', | 2834 'GLenumIndexType type, GLuint index_offset', |
| 2836 'client_test': False, | 2835 'client_test': False, |
| 2837 'defer_draws': True, | 2836 'defer_draws': True, |
| 2838 'trace_level': 2, | 2837 'trace_level': 2, |
| 2839 }, | 2838 }, |
| 2840 'DrawRangeElements': { | 2839 'DrawRangeElements': { |
| 2841 'type': 'NoCommand', | 2840 'type': 'NoCommand', |
| 2842 'unsafe': True, | 2841 'es3': True, |
| 2843 }, | 2842 }, |
| 2844 'Enable': { | 2843 'Enable': { |
| 2845 'decoder_func': 'DoEnable', | 2844 'decoder_func': 'DoEnable', |
| 2846 'impl_func': False, | 2845 'impl_func': False, |
| 2847 'client_test': False, | 2846 'client_test': False, |
| 2848 }, | 2847 }, |
| 2849 'EnableVertexAttribArray': { | 2848 'EnableVertexAttribArray': { |
| 2850 'decoder_func': 'DoEnableVertexAttribArray', | 2849 'decoder_func': 'DoEnableVertexAttribArray', |
| 2851 'impl_func': False, | 2850 'impl_func': False, |
| 2852 }, | 2851 }, |
| 2853 'FenceSync': { | 2852 'FenceSync': { |
| 2854 'type': 'Create', | 2853 'type': 'Create', |
| 2855 'client_test': False, | 2854 'client_test': False, |
| 2856 'decoder_func': 'DoFenceSync', | 2855 'decoder_func': 'DoFenceSync', |
| 2857 'unsafe': True, | 2856 'es3': True, |
| 2858 'trace_level': 1, | 2857 'trace_level': 1, |
| 2859 }, | 2858 }, |
| 2860 'Finish': { | 2859 'Finish': { |
| 2861 'impl_func': False, | 2860 'impl_func': False, |
| 2862 'client_test': False, | 2861 'client_test': False, |
| 2863 'decoder_func': 'DoFinish', | 2862 'decoder_func': 'DoFinish', |
| 2864 'defer_reads': True, | 2863 'defer_reads': True, |
| 2865 'trace_level': 1, | 2864 'trace_level': 1, |
| 2866 }, | 2865 }, |
| 2867 'Flush': { | 2866 'Flush': { |
| 2868 'impl_func': False, | 2867 'impl_func': False, |
| 2869 'decoder_func': 'DoFlush', | 2868 'decoder_func': 'DoFlush', |
| 2870 'trace_level': 1, | 2869 'trace_level': 1, |
| 2871 }, | 2870 }, |
| 2872 'FlushMappedBufferRange': { | 2871 'FlushMappedBufferRange': { |
| 2873 'decoder_func': 'DoFlushMappedBufferRange', | 2872 'decoder_func': 'DoFlushMappedBufferRange', |
| 2874 'trace_level': 1, | 2873 'trace_level': 1, |
| 2875 'unit_test': False, | 2874 'unit_test': False, |
| 2876 'unsafe': True, | 2875 'es3': True, |
| 2877 }, | 2876 }, |
| 2878 'FramebufferRenderbuffer': { | 2877 'FramebufferRenderbuffer': { |
| 2879 'decoder_func': 'DoFramebufferRenderbuffer', | 2878 'decoder_func': 'DoFramebufferRenderbuffer', |
| 2880 'gl_test_func': 'glFramebufferRenderbufferEXT', | 2879 'gl_test_func': 'glFramebufferRenderbufferEXT', |
| 2881 'trace_level': 1, | 2880 'trace_level': 1, |
| 2882 }, | 2881 }, |
| 2883 'FramebufferTexture2D': { | 2882 'FramebufferTexture2D': { |
| 2884 'decoder_func': 'DoFramebufferTexture2D', | 2883 'decoder_func': 'DoFramebufferTexture2D', |
| 2885 'gl_test_func': 'glFramebufferTexture2DEXT', | 2884 'gl_test_func': 'glFramebufferTexture2DEXT', |
| 2886 'unit_test': False, | 2885 'unit_test': False, |
| 2887 'trace_level': 1, | 2886 'trace_level': 1, |
| 2888 }, | 2887 }, |
| 2889 'FramebufferTexture2DMultisampleEXT': { | 2888 'FramebufferTexture2DMultisampleEXT': { |
| 2890 'decoder_func': 'DoFramebufferTexture2DMultisample', | 2889 'decoder_func': 'DoFramebufferTexture2DMultisample', |
| 2891 'gl_test_func': 'glFramebufferTexture2DMultisampleEXT', | 2890 'gl_test_func': 'glFramebufferTexture2DMultisampleEXT', |
| 2892 'unit_test': False, | 2891 'unit_test': False, |
| 2893 'extension': 'EXT_multisampled_render_to_texture', | 2892 'extension': 'EXT_multisampled_render_to_texture', |
| 2894 'extension_flag': 'multisampled_render_to_texture', | 2893 'extension_flag': 'multisampled_render_to_texture', |
| 2895 'trace_level': 1, | 2894 'trace_level': 1, |
| 2896 }, | 2895 }, |
| 2897 'FramebufferTextureLayer': { | 2896 'FramebufferTextureLayer': { |
| 2898 'decoder_func': 'DoFramebufferTextureLayer', | 2897 'decoder_func': 'DoFramebufferTextureLayer', |
| 2899 'unsafe': True, | 2898 'es3': True, |
| 2900 'unit_test': False, | 2899 'unit_test': False, |
| 2901 'trace_level': 1, | 2900 'trace_level': 1, |
| 2902 }, | 2901 }, |
| 2903 'GenerateMipmap': { | 2902 'GenerateMipmap': { |
| 2904 'decoder_func': 'DoGenerateMipmap', | 2903 'decoder_func': 'DoGenerateMipmap', |
| 2905 'gl_test_func': 'glGenerateMipmapEXT', | 2904 'gl_test_func': 'glGenerateMipmapEXT', |
| 2906 'trace_level': 1, | 2905 'trace_level': 1, |
| 2907 }, | 2906 }, |
| 2908 'GenBuffers': { | 2907 'GenBuffers': { |
| 2909 'type': 'GENn', | 2908 'type': 'GENn', |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2924 'GenRenderbuffers': { | 2923 'GenRenderbuffers': { |
| 2925 'type': 'GENn', 'gl_test_func': 'glGenRenderbuffersEXT', | 2924 'type': 'GENn', 'gl_test_func': 'glGenRenderbuffersEXT', |
| 2926 'resource_type': 'Renderbuffer', | 2925 'resource_type': 'Renderbuffer', |
| 2927 'resource_types': 'Renderbuffers', | 2926 'resource_types': 'Renderbuffers', |
| 2928 }, | 2927 }, |
| 2929 'GenSamplers': { | 2928 'GenSamplers': { |
| 2930 'type': 'GENn', | 2929 'type': 'GENn', |
| 2931 'gl_test_func': 'glGenSamplers', | 2930 'gl_test_func': 'glGenSamplers', |
| 2932 'resource_type': 'Sampler', | 2931 'resource_type': 'Sampler', |
| 2933 'resource_types': 'Samplers', | 2932 'resource_types': 'Samplers', |
| 2934 'unsafe': True, | 2933 'es3': True, |
| 2935 }, | 2934 }, |
| 2936 'GenTextures': { | 2935 'GenTextures': { |
| 2937 'type': 'GENn', | 2936 'type': 'GENn', |
| 2938 'gl_test_func': 'glGenTextures', | 2937 'gl_test_func': 'glGenTextures', |
| 2939 'resource_type': 'Texture', | 2938 'resource_type': 'Texture', |
| 2940 'resource_types': 'Textures', | 2939 'resource_types': 'Textures', |
| 2941 }, | 2940 }, |
| 2942 'GenTransformFeedbacks': { | 2941 'GenTransformFeedbacks': { |
| 2943 'type': 'GENn', | 2942 'type': 'GENn', |
| 2944 'gl_test_func': 'glGenTransformFeedbacks', | 2943 'gl_test_func': 'glGenTransformFeedbacks', |
| 2945 'resource_type': 'TransformFeedback', | 2944 'resource_type': 'TransformFeedback', |
| 2946 'resource_types': 'TransformFeedbacks', | 2945 'resource_types': 'TransformFeedbacks', |
| 2947 'unsafe': True, | 2946 'es3': True, |
| 2948 }, | 2947 }, |
| 2949 'GetActiveAttrib': { | 2948 'GetActiveAttrib': { |
| 2950 'type': 'Custom', | 2949 'type': 'Custom', |
| 2951 'data_transfer_methods': ['shm'], | 2950 'data_transfer_methods': ['shm'], |
| 2952 'cmd_args': | 2951 'cmd_args': |
| 2953 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' | 2952 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' |
| 2954 'void* result', | 2953 'void* result', |
| 2955 'result': [ | 2954 'result': [ |
| 2956 'int32_t success', | 2955 'int32_t success', |
| 2957 'int32_t size', | 2956 'int32_t size', |
| 2958 'uint32_t type', | 2957 'uint32_t type', |
| 2959 ], | 2958 ], |
| 2960 }, | 2959 }, |
| 2961 'GetActiveUniform': { | 2960 'GetActiveUniform': { |
| 2962 'type': 'Custom', | 2961 'type': 'Custom', |
| 2963 'data_transfer_methods': ['shm'], | 2962 'data_transfer_methods': ['shm'], |
| 2964 'cmd_args': | 2963 'cmd_args': |
| 2965 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' | 2964 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' |
| 2966 'void* result', | 2965 'void* result', |
| 2967 'result': [ | 2966 'result': [ |
| 2968 'int32_t success', | 2967 'int32_t success', |
| 2969 'int32_t size', | 2968 'int32_t size', |
| 2970 'uint32_t type', | 2969 'uint32_t type', |
| 2971 ], | 2970 ], |
| 2972 }, | 2971 }, |
| 2973 'GetActiveUniformBlockiv': { | 2972 'GetActiveUniformBlockiv': { |
| 2974 'type': 'Custom', | 2973 'type': 'Custom', |
| 2975 'data_transfer_methods': ['shm'], | 2974 'data_transfer_methods': ['shm'], |
| 2976 'result': ['SizedResult<GLint>'], | 2975 'result': ['SizedResult<GLint>'], |
| 2977 'unsafe': True, | 2976 'es3': True, |
| 2978 }, | 2977 }, |
| 2979 'GetActiveUniformBlockName': { | 2978 'GetActiveUniformBlockName': { |
| 2980 'type': 'Custom', | 2979 'type': 'Custom', |
| 2981 'data_transfer_methods': ['shm'], | 2980 'data_transfer_methods': ['shm'], |
| 2982 'cmd_args': | 2981 'cmd_args': |
| 2983 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' | 2982 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' |
| 2984 'void* result', | 2983 'void* result', |
| 2985 'result': ['int32_t'], | 2984 'result': ['int32_t'], |
| 2986 'unsafe': True, | 2985 'es3': True, |
| 2987 }, | 2986 }, |
| 2988 'GetActiveUniformsiv': { | 2987 'GetActiveUniformsiv': { |
| 2989 'type': 'Custom', | 2988 'type': 'Custom', |
| 2990 'data_transfer_methods': ['shm'], | 2989 'data_transfer_methods': ['shm'], |
| 2991 'cmd_args': | 2990 'cmd_args': |
| 2992 'GLidProgram program, uint32_t indices_bucket_id, GLenum pname, ' | 2991 'GLidProgram program, uint32_t indices_bucket_id, GLenum pname, ' |
| 2993 'GLint* params', | 2992 'GLint* params', |
| 2994 'result': ['SizedResult<GLint>'], | 2993 'result': ['SizedResult<GLint>'], |
| 2995 'unsafe': True, | 2994 'es3': True, |
| 2996 }, | 2995 }, |
| 2997 'GetAttachedShaders': { | 2996 'GetAttachedShaders': { |
| 2998 'type': 'Custom', | 2997 'type': 'Custom', |
| 2999 'data_transfer_methods': ['shm'], | 2998 'data_transfer_methods': ['shm'], |
| 3000 'cmd_args': 'GLidProgram program, void* result, uint32_t result_size', | 2999 'cmd_args': 'GLidProgram program, void* result, uint32_t result_size', |
| 3001 'result': ['SizedResult<GLuint>'], | 3000 'result': ['SizedResult<GLuint>'], |
| 3002 }, | 3001 }, |
| 3003 'GetAttribLocation': { | 3002 'GetAttribLocation': { |
| 3004 'type': 'Custom', | 3003 'type': 'Custom', |
| 3005 'data_transfer_methods': ['shm'], | 3004 'data_transfer_methods': ['shm'], |
| 3006 'cmd_args': | 3005 'cmd_args': |
| 3007 'GLidProgram program, uint32_t name_bucket_id, GLint* location', | 3006 'GLidProgram program, uint32_t name_bucket_id, GLint* location', |
| 3008 'result': ['GLint'], | 3007 'result': ['GLint'], |
| 3009 'error_return': -1, | 3008 'error_return': -1, |
| 3010 }, | 3009 }, |
| 3011 'GetBufferSubDataAsyncCHROMIUM': { | 3010 'GetBufferSubDataAsyncCHROMIUM': { |
| 3012 'type': 'Custom', | 3011 'type': 'Custom', |
| 3013 'data_transfer_methods': ['shm'], | 3012 'data_transfer_methods': ['shm'], |
| 3014 'cmd_args': 'GLenumBufferTarget target, GLintptrNotNegative offset, ' | 3013 'cmd_args': 'GLenumBufferTarget target, GLintptrNotNegative offset, ' |
| 3015 'GLsizeiptr size, ' | 3014 'GLsizeiptr size, ' |
| 3016 'uint32_t data_shm_id, uint32_t data_shm_offset', | 3015 'uint32_t data_shm_id, uint32_t data_shm_offset', |
| 3017 'unsafe': True, | 3016 'es3': True, |
| 3018 'impl_func': False, | 3017 'impl_func': False, |
| 3019 'client_test': False, | 3018 'client_test': False, |
| 3020 'trace_level': 1, | 3019 'trace_level': 1, |
| 3021 }, | 3020 }, |
| 3022 'GetFragDataIndexEXT': { | 3021 'GetFragDataIndexEXT': { |
| 3023 'type': 'Custom', | 3022 'type': 'Custom', |
| 3024 'data_transfer_methods': ['shm'], | 3023 'data_transfer_methods': ['shm'], |
| 3025 'cmd_args': | 3024 'cmd_args': |
| 3026 'GLidProgram program, uint32_t name_bucket_id, GLint* index', | 3025 'GLidProgram program, uint32_t name_bucket_id, GLint* index', |
| 3027 'result': ['GLint'], | 3026 'result': ['GLint'], |
| 3028 'error_return': -1, | 3027 'error_return': -1, |
| 3029 'extension': 'EXT_blend_func_extended', | 3028 'extension': 'EXT_blend_func_extended', |
| 3030 'extension_flag': 'ext_blend_func_extended', | 3029 'extension_flag': 'ext_blend_func_extended', |
| 3031 }, | 3030 }, |
| 3032 'GetFragDataLocation': { | 3031 'GetFragDataLocation': { |
| 3033 'type': 'Custom', | 3032 'type': 'Custom', |
| 3034 'data_transfer_methods': ['shm'], | 3033 'data_transfer_methods': ['shm'], |
| 3035 'cmd_args': | 3034 'cmd_args': |
| 3036 'GLidProgram program, uint32_t name_bucket_id, GLint* location', | 3035 'GLidProgram program, uint32_t name_bucket_id, GLint* location', |
| 3037 'result': ['GLint'], | 3036 'result': ['GLint'], |
| 3038 'error_return': -1, | 3037 'error_return': -1, |
| 3039 'unsafe': True, | 3038 'es3': True, |
| 3040 }, | 3039 }, |
| 3041 'GetBooleanv': { | 3040 'GetBooleanv': { |
| 3042 'type': 'GETn', | 3041 'type': 'GETn', |
| 3043 'result': ['SizedResult<GLboolean>'], | 3042 'result': ['SizedResult<GLboolean>'], |
| 3044 'decoder_func': 'DoGetBooleanv', | 3043 'decoder_func': 'DoGetBooleanv', |
| 3045 'gl_test_func': 'glGetIntegerv', | 3044 'gl_test_func': 'glGetIntegerv', |
| 3046 }, | 3045 }, |
| 3047 'GetBufferParameteri64v': { | 3046 'GetBufferParameteri64v': { |
| 3048 'type': 'GETn', | 3047 'type': 'GETn', |
| 3049 'result': ['SizedResult<GLint64>'], | 3048 'result': ['SizedResult<GLint64>'], |
| 3050 'decoder_func': 'DoGetBufferParameteri64v', | 3049 'decoder_func': 'DoGetBufferParameteri64v', |
| 3051 'expectation': False, | 3050 'expectation': False, |
| 3052 'shadowed': True, | 3051 'shadowed': True, |
| 3053 'unsafe': True, | 3052 'es3': True, |
| 3054 }, | 3053 }, |
| 3055 'GetBufferParameteriv': { | 3054 'GetBufferParameteriv': { |
| 3056 'type': 'GETn', | 3055 'type': 'GETn', |
| 3057 'result': ['SizedResult<GLint>'], | 3056 'result': ['SizedResult<GLint>'], |
| 3058 'decoder_func': 'DoGetBufferParameteriv', | 3057 'decoder_func': 'DoGetBufferParameteriv', |
| 3059 'expectation': False, | 3058 'expectation': False, |
| 3060 'shadowed': True, | 3059 'shadowed': True, |
| 3061 }, | 3060 }, |
| 3062 'GetError': { | 3061 'GetError': { |
| 3063 'type': 'Is', | 3062 'type': 'Is', |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3082 'type': 'NoCommand', | 3081 'type': 'NoCommand', |
| 3083 'extension': True, | 3082 'extension': True, |
| 3084 'trace_level': 1, | 3083 'trace_level': 1, |
| 3085 }, | 3084 }, |
| 3086 'GetInteger64v': { | 3085 'GetInteger64v': { |
| 3087 'type': 'GETn', | 3086 'type': 'GETn', |
| 3088 'result': ['SizedResult<GLint64>'], | 3087 'result': ['SizedResult<GLint64>'], |
| 3089 'client_test': False, | 3088 'client_test': False, |
| 3090 'decoder_func': 'DoGetInteger64v', | 3089 'decoder_func': 'DoGetInteger64v', |
| 3091 'gl_test_func': 'glGetIntegerv', | 3090 'gl_test_func': 'glGetIntegerv', |
| 3092 'unsafe': True | 3091 'es3': True |
| 3093 }, | 3092 }, |
| 3094 'GetIntegerv': { | 3093 'GetIntegerv': { |
| 3095 'type': 'GETn', | 3094 'type': 'GETn', |
| 3096 'result': ['SizedResult<GLint>'], | 3095 'result': ['SizedResult<GLint>'], |
| 3097 'decoder_func': 'DoGetIntegerv', | 3096 'decoder_func': 'DoGetIntegerv', |
| 3098 'client_test': False, | 3097 'client_test': False, |
| 3099 }, | 3098 }, |
| 3100 'GetInteger64i_v': { | 3099 'GetInteger64i_v': { |
| 3101 'type': 'GETn', | 3100 'type': 'GETn', |
| 3102 'result': ['SizedResult<GLint64>'], | 3101 'result': ['SizedResult<GLint64>'], |
| 3103 'decoder_func': 'DoGetInteger64i_v', | 3102 'decoder_func': 'DoGetInteger64i_v', |
| 3104 'shadowed': True, | 3103 'shadowed': True, |
| 3105 'client_test': False, | 3104 'client_test': False, |
| 3106 'unit_test': False, | 3105 'unit_test': False, |
| 3107 'unsafe': True | 3106 'es3': True |
| 3108 }, | 3107 }, |
| 3109 'GetIntegeri_v': { | 3108 'GetIntegeri_v': { |
| 3110 'type': 'GETn', | 3109 'type': 'GETn', |
| 3111 'result': ['SizedResult<GLint>'], | 3110 'result': ['SizedResult<GLint>'], |
| 3112 'decoder_func': 'DoGetIntegeri_v', | 3111 'decoder_func': 'DoGetIntegeri_v', |
| 3113 'shadowed': True, | 3112 'shadowed': True, |
| 3114 'client_test': False, | 3113 'client_test': False, |
| 3115 'unit_test': False, | 3114 'unit_test': False, |
| 3116 'unsafe': True | 3115 'es3': True |
| 3117 }, | 3116 }, |
| 3118 'GetInternalformativ': { | 3117 'GetInternalformativ': { |
| 3119 'type': 'Custom', | 3118 'type': 'Custom', |
| 3120 'data_transfer_methods': ['shm'], | 3119 'data_transfer_methods': ['shm'], |
| 3121 'result': ['SizedResult<GLint>'], | 3120 'result': ['SizedResult<GLint>'], |
| 3122 'cmd_args': | 3121 'cmd_args': |
| 3123 'GLenumRenderBufferTarget target, GLenumRenderBufferFormat format, ' | 3122 'GLenumRenderBufferTarget target, GLenumRenderBufferFormat format, ' |
| 3124 'GLenumInternalFormatParameter pname, GLint* params', | 3123 'GLenumInternalFormatParameter pname, GLint* params', |
| 3125 'unsafe': True, | 3124 'es3': True, |
| 3126 }, | 3125 }, |
| 3127 'GetMaxValueInBufferCHROMIUM': { | 3126 'GetMaxValueInBufferCHROMIUM': { |
| 3128 'type': 'Is', | 3127 'type': 'Is', |
| 3129 'decoder_func': 'DoGetMaxValueInBufferCHROMIUM', | 3128 'decoder_func': 'DoGetMaxValueInBufferCHROMIUM', |
| 3130 'result': ['GLuint'], | 3129 'result': ['GLuint'], |
| 3131 'unit_test': False, | 3130 'unit_test': False, |
| 3132 'client_test': False, | 3131 'client_test': False, |
| 3133 'extension': True, | 3132 'extension': True, |
| 3134 'impl_func': False, | 3133 'impl_func': False, |
| 3135 }, | 3134 }, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 3158 'GetRenderbufferParameteriv': { | 3157 'GetRenderbufferParameteriv': { |
| 3159 'type': 'GETn', | 3158 'type': 'GETn', |
| 3160 'decoder_func': 'DoGetRenderbufferParameteriv', | 3159 'decoder_func': 'DoGetRenderbufferParameteriv', |
| 3161 'gl_test_func': 'glGetRenderbufferParameterivEXT', | 3160 'gl_test_func': 'glGetRenderbufferParameterivEXT', |
| 3162 'result': ['SizedResult<GLint>'], | 3161 'result': ['SizedResult<GLint>'], |
| 3163 }, | 3162 }, |
| 3164 'GetSamplerParameterfv': { | 3163 'GetSamplerParameterfv': { |
| 3165 'type': 'GETn', | 3164 'type': 'GETn', |
| 3166 'decoder_func': 'DoGetSamplerParameterfv', | 3165 'decoder_func': 'DoGetSamplerParameterfv', |
| 3167 'result': ['SizedResult<GLfloat>'], | 3166 'result': ['SizedResult<GLfloat>'], |
| 3168 'unsafe': True, | 3167 'es3': True, |
| 3169 }, | 3168 }, |
| 3170 'GetSamplerParameteriv': { | 3169 'GetSamplerParameteriv': { |
| 3171 'type': 'GETn', | 3170 'type': 'GETn', |
| 3172 'decoder_func': 'DoGetSamplerParameteriv', | 3171 'decoder_func': 'DoGetSamplerParameteriv', |
| 3173 'result': ['SizedResult<GLint>'], | 3172 'result': ['SizedResult<GLint>'], |
| 3174 'unsafe': True, | 3173 'es3': True, |
| 3175 }, | 3174 }, |
| 3176 'GetShaderiv': { | 3175 'GetShaderiv': { |
| 3177 'type': 'GETn', | 3176 'type': 'GETn', |
| 3178 'decoder_func': 'DoGetShaderiv', | 3177 'decoder_func': 'DoGetShaderiv', |
| 3179 'result': ['SizedResult<GLint>'], | 3178 'result': ['SizedResult<GLint>'], |
| 3180 }, | 3179 }, |
| 3181 'GetShaderInfoLog': { | 3180 'GetShaderInfoLog': { |
| 3182 'type': 'STRn', | 3181 'type': 'STRn', |
| 3183 'get_len_func': 'glGetShaderiv', | 3182 'get_len_func': 'glGetShaderiv', |
| 3184 'get_len_enum': 'GL_INFO_LOG_LENGTH', | 3183 'get_len_enum': 'GL_INFO_LOG_LENGTH', |
| (...skipping 19 matching lines...) Expand all Loading... |
| 3204 'unit_test': False, | 3203 'unit_test': False, |
| 3205 'client_test': False, | 3204 'client_test': False, |
| 3206 }, | 3205 }, |
| 3207 'GetString': { | 3206 'GetString': { |
| 3208 'type': 'Custom', | 3207 'type': 'Custom', |
| 3209 'client_test': False, | 3208 'client_test': False, |
| 3210 'cmd_args': 'GLenumStringType name, uint32_t bucket_id', | 3209 'cmd_args': 'GLenumStringType name, uint32_t bucket_id', |
| 3211 }, | 3210 }, |
| 3212 'GetStringi': { | 3211 'GetStringi': { |
| 3213 'type': 'NoCommand', | 3212 'type': 'NoCommand', |
| 3214 'unsafe': True, | 3213 'es3': True, |
| 3215 }, | 3214 }, |
| 3216 'GetSynciv': { | 3215 'GetSynciv': { |
| 3217 'type': 'GETn', | 3216 'type': 'GETn', |
| 3218 'cmd_args': 'GLuint sync, GLenumSyncParameter pname, void* values', | 3217 'cmd_args': 'GLuint sync, GLenumSyncParameter pname, void* values', |
| 3219 'result': ['SizedResult<GLint>'], | 3218 'result': ['SizedResult<GLint>'], |
| 3220 'id_mapping': ['Sync'], | 3219 'id_mapping': ['Sync'], |
| 3221 'unsafe': True, | 3220 'es3': True, |
| 3222 }, | 3221 }, |
| 3223 'GetTexParameterfv': { | 3222 'GetTexParameterfv': { |
| 3224 'type': 'GETn', | 3223 'type': 'GETn', |
| 3225 'decoder_func': 'DoGetTexParameterfv', | 3224 'decoder_func': 'DoGetTexParameterfv', |
| 3226 'result': ['SizedResult<GLfloat>'] | 3225 'result': ['SizedResult<GLfloat>'] |
| 3227 }, | 3226 }, |
| 3228 'GetTexParameteriv': { | 3227 'GetTexParameteriv': { |
| 3229 'type': 'GETn', | 3228 'type': 'GETn', |
| 3230 'decoder_func': 'DoGetTexParameteriv', | 3229 'decoder_func': 'DoGetTexParameteriv', |
| 3231 'result': ['SizedResult<GLint>'] | 3230 'result': ['SizedResult<GLint>'] |
| 3232 }, | 3231 }, |
| 3233 'GetTranslatedShaderSourceANGLE': { | 3232 'GetTranslatedShaderSourceANGLE': { |
| 3234 'type': 'STRn', | 3233 'type': 'STRn', |
| 3235 'get_len_func': 'DoGetShaderiv', | 3234 'get_len_func': 'DoGetShaderiv', |
| 3236 'get_len_enum': 'GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE', | 3235 'get_len_enum': 'GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE', |
| 3237 'unit_test': False, | 3236 'unit_test': False, |
| 3238 'extension': True, | 3237 'extension': True, |
| 3239 }, | 3238 }, |
| 3240 'GetUniformBlockIndex': { | 3239 'GetUniformBlockIndex': { |
| 3241 'type': 'Custom', | 3240 'type': 'Custom', |
| 3242 'data_transfer_methods': ['shm'], | 3241 'data_transfer_methods': ['shm'], |
| 3243 'cmd_args': | 3242 'cmd_args': |
| 3244 'GLidProgram program, uint32_t name_bucket_id, GLuint* index', | 3243 'GLidProgram program, uint32_t name_bucket_id, GLuint* index', |
| 3245 'result': ['GLuint'], | 3244 'result': ['GLuint'], |
| 3246 'error_return': 'GL_INVALID_INDEX', | 3245 'error_return': 'GL_INVALID_INDEX', |
| 3247 'unsafe': True, | 3246 'es3': True, |
| 3248 }, | 3247 }, |
| 3249 'GetUniformBlocksCHROMIUM': { | 3248 'GetUniformBlocksCHROMIUM': { |
| 3250 'type': 'Custom', | 3249 'type': 'Custom', |
| 3251 'impl_func': False, | 3250 'impl_func': False, |
| 3252 'extension': True, | 3251 'extension': True, |
| 3253 'client_test': False, | 3252 'client_test': False, |
| 3254 'cmd_args': 'GLidProgram program, uint32_t bucket_id', | 3253 'cmd_args': 'GLidProgram program, uint32_t bucket_id', |
| 3255 'result': ['uint32_t'], | 3254 'result': ['uint32_t'], |
| 3256 'unsafe': True, | 3255 'es3': True, |
| 3257 }, | 3256 }, |
| 3258 'GetUniformsES3CHROMIUM': { | 3257 'GetUniformsES3CHROMIUM': { |
| 3259 'type': 'Custom', | 3258 'type': 'Custom', |
| 3260 'impl_func': False, | 3259 'impl_func': False, |
| 3261 'extension': True, | 3260 'extension': True, |
| 3262 'client_test': False, | 3261 'client_test': False, |
| 3263 'cmd_args': 'GLidProgram program, uint32_t bucket_id', | 3262 'cmd_args': 'GLidProgram program, uint32_t bucket_id', |
| 3264 'result': ['uint32_t'], | 3263 'result': ['uint32_t'], |
| 3265 'unsafe': True, | 3264 'es3': True, |
| 3266 }, | 3265 }, |
| 3267 'GetTransformFeedbackVarying': { | 3266 'GetTransformFeedbackVarying': { |
| 3268 'type': 'Custom', | 3267 'type': 'Custom', |
| 3269 'data_transfer_methods': ['shm'], | 3268 'data_transfer_methods': ['shm'], |
| 3270 'cmd_args': | 3269 'cmd_args': |
| 3271 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' | 3270 'GLidProgram program, GLuint index, uint32_t name_bucket_id, ' |
| 3272 'void* result', | 3271 'void* result', |
| 3273 'result': [ | 3272 'result': [ |
| 3274 'int32_t success', | 3273 'int32_t success', |
| 3275 'int32_t size', | 3274 'int32_t size', |
| 3276 'uint32_t type', | 3275 'uint32_t type', |
| 3277 ], | 3276 ], |
| 3278 'unsafe': True, | 3277 'es3': True, |
| 3279 }, | 3278 }, |
| 3280 'GetTransformFeedbackVaryingsCHROMIUM': { | 3279 'GetTransformFeedbackVaryingsCHROMIUM': { |
| 3281 'type': 'Custom', | 3280 'type': 'Custom', |
| 3282 'impl_func': False, | 3281 'impl_func': False, |
| 3283 'extension': True, | 3282 'extension': True, |
| 3284 'client_test': False, | 3283 'client_test': False, |
| 3285 'cmd_args': 'GLidProgram program, uint32_t bucket_id', | 3284 'cmd_args': 'GLidProgram program, uint32_t bucket_id', |
| 3286 'result': ['uint32_t'], | 3285 'result': ['uint32_t'], |
| 3287 'unsafe': True, | 3286 'es3': True, |
| 3288 }, | 3287 }, |
| 3289 'GetUniformfv': { | 3288 'GetUniformfv': { |
| 3290 'type': 'Custom', | 3289 'type': 'Custom', |
| 3291 'data_transfer_methods': ['shm'], | 3290 'data_transfer_methods': ['shm'], |
| 3292 'result': ['SizedResult<GLfloat>'], | 3291 'result': ['SizedResult<GLfloat>'], |
| 3293 }, | 3292 }, |
| 3294 'GetUniformiv': { | 3293 'GetUniformiv': { |
| 3295 'type': 'Custom', | 3294 'type': 'Custom', |
| 3296 'data_transfer_methods': ['shm'], | 3295 'data_transfer_methods': ['shm'], |
| 3297 'result': ['SizedResult<GLint>'], | 3296 'result': ['SizedResult<GLint>'], |
| 3298 }, | 3297 }, |
| 3299 'GetUniformuiv': { | 3298 'GetUniformuiv': { |
| 3300 'type': 'Custom', | 3299 'type': 'Custom', |
| 3301 'data_transfer_methods': ['shm'], | 3300 'data_transfer_methods': ['shm'], |
| 3302 'result': ['SizedResult<GLuint>'], | 3301 'result': ['SizedResult<GLuint>'], |
| 3303 'unsafe': True, | 3302 'es3': True, |
| 3304 }, | 3303 }, |
| 3305 'GetUniformIndices': { | 3304 'GetUniformIndices': { |
| 3306 'type': 'Custom', | 3305 'type': 'Custom', |
| 3307 'data_transfer_methods': ['shm'], | 3306 'data_transfer_methods': ['shm'], |
| 3308 'result': ['SizedResult<GLuint>'], | 3307 'result': ['SizedResult<GLuint>'], |
| 3309 'cmd_args': 'GLidProgram program, uint32_t names_bucket_id, ' | 3308 'cmd_args': 'GLidProgram program, uint32_t names_bucket_id, ' |
| 3310 'GLuint* indices', | 3309 'GLuint* indices', |
| 3311 'unsafe': True, | 3310 'es3': True, |
| 3312 }, | 3311 }, |
| 3313 'GetUniformLocation': { | 3312 'GetUniformLocation': { |
| 3314 'type': 'Custom', | 3313 'type': 'Custom', |
| 3315 'data_transfer_methods': ['shm'], | 3314 'data_transfer_methods': ['shm'], |
| 3316 'cmd_args': | 3315 'cmd_args': |
| 3317 'GLidProgram program, uint32_t name_bucket_id, GLint* location', | 3316 'GLidProgram program, uint32_t name_bucket_id, GLint* location', |
| 3318 'result': ['GLint'], | 3317 'result': ['GLint'], |
| 3319 'error_return': -1, # http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformL
ocation.xml | 3318 'error_return': -1, # http://www.opengl.org/sdk/docs/man/xhtml/glGetUniformL
ocation.xml |
| 3320 }, | 3319 }, |
| 3321 'GetVertexAttribfv': { | 3320 'GetVertexAttribfv': { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 3334 'expectation': False, | 3333 'expectation': False, |
| 3335 'client_test': False, | 3334 'client_test': False, |
| 3336 }, | 3335 }, |
| 3337 'GetVertexAttribIiv': { | 3336 'GetVertexAttribIiv': { |
| 3338 'type': 'GETn', | 3337 'type': 'GETn', |
| 3339 'result': ['SizedResult<GLint>'], | 3338 'result': ['SizedResult<GLint>'], |
| 3340 'impl_func': False, | 3339 'impl_func': False, |
| 3341 'decoder_func': 'DoGetVertexAttribIiv', | 3340 'decoder_func': 'DoGetVertexAttribIiv', |
| 3342 'expectation': False, | 3341 'expectation': False, |
| 3343 'client_test': False, | 3342 'client_test': False, |
| 3344 'unsafe': True, | 3343 'es3': True, |
| 3345 }, | 3344 }, |
| 3346 'GetVertexAttribIuiv': { | 3345 'GetVertexAttribIuiv': { |
| 3347 'type': 'GETn', | 3346 'type': 'GETn', |
| 3348 'result': ['SizedResult<GLuint>'], | 3347 'result': ['SizedResult<GLuint>'], |
| 3349 'impl_func': False, | 3348 'impl_func': False, |
| 3350 'decoder_func': 'DoGetVertexAttribIuiv', | 3349 'decoder_func': 'DoGetVertexAttribIuiv', |
| 3351 'expectation': False, | 3350 'expectation': False, |
| 3352 'client_test': False, | 3351 'client_test': False, |
| 3353 'unsafe': True, | 3352 'es3': True, |
| 3354 }, | 3353 }, |
| 3355 'GetVertexAttribPointerv': { | 3354 'GetVertexAttribPointerv': { |
| 3356 'type': 'Custom', | 3355 'type': 'Custom', |
| 3357 'data_transfer_methods': ['shm'], | 3356 'data_transfer_methods': ['shm'], |
| 3358 'result': ['SizedResult<GLuint>'], | 3357 'result': ['SizedResult<GLuint>'], |
| 3359 'client_test': False, | 3358 'client_test': False, |
| 3360 }, | 3359 }, |
| 3361 'InvalidateFramebuffer': { | 3360 'InvalidateFramebuffer': { |
| 3362 'type': 'PUTn', | 3361 'type': 'PUTn', |
| 3363 'count': 1, | 3362 'count': 1, |
| 3364 'decoder_func': 'DoInvalidateFramebuffer', | 3363 'decoder_func': 'DoInvalidateFramebuffer', |
| 3365 'client_test': False, | 3364 'client_test': False, |
| 3366 'unit_test': False, | 3365 'unit_test': False, |
| 3367 'unsafe': True, | 3366 'es3': True, |
| 3368 }, | 3367 }, |
| 3369 'InvalidateSubFramebuffer': { | 3368 'InvalidateSubFramebuffer': { |
| 3370 'type': 'PUTn', | 3369 'type': 'PUTn', |
| 3371 'count': 1, | 3370 'count': 1, |
| 3372 'decoder_func': 'DoInvalidateSubFramebuffer', | 3371 'decoder_func': 'DoInvalidateSubFramebuffer', |
| 3373 'client_test': False, | 3372 'client_test': False, |
| 3374 'unit_test': False, | 3373 'unit_test': False, |
| 3375 'unsafe': True, | 3374 'es3': True, |
| 3376 }, | 3375 }, |
| 3377 'IsBuffer': { | 3376 'IsBuffer': { |
| 3378 'type': 'Is', | 3377 'type': 'Is', |
| 3379 'decoder_func': 'DoIsBuffer', | 3378 'decoder_func': 'DoIsBuffer', |
| 3380 'expectation': False, | 3379 'expectation': False, |
| 3381 }, | 3380 }, |
| 3382 'IsEnabled': { | 3381 'IsEnabled': { |
| 3383 'type': 'Is', | 3382 'type': 'Is', |
| 3384 'decoder_func': 'DoIsEnabled', | 3383 'decoder_func': 'DoIsEnabled', |
| 3385 'client_test': False, | 3384 'client_test': False, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3403 }, | 3402 }, |
| 3404 'IsShader': { | 3403 'IsShader': { |
| 3405 'type': 'Is', | 3404 'type': 'Is', |
| 3406 'decoder_func': 'DoIsShader', | 3405 'decoder_func': 'DoIsShader', |
| 3407 'expectation': False, | 3406 'expectation': False, |
| 3408 }, | 3407 }, |
| 3409 'IsSampler': { | 3408 'IsSampler': { |
| 3410 'type': 'Is', | 3409 'type': 'Is', |
| 3411 'decoder_func': 'DoIsSampler', | 3410 'decoder_func': 'DoIsSampler', |
| 3412 'expectation': False, | 3411 'expectation': False, |
| 3413 'unsafe': True, | 3412 'es3': True, |
| 3414 }, | 3413 }, |
| 3415 'IsSync': { | 3414 'IsSync': { |
| 3416 'type': 'Is', | 3415 'type': 'Is', |
| 3417 'id_mapping': [ 'Sync' ], | 3416 'id_mapping': [ 'Sync' ], |
| 3418 'cmd_args': 'GLuint sync', | 3417 'cmd_args': 'GLuint sync', |
| 3419 'decoder_func': 'DoIsSync', | 3418 'decoder_func': 'DoIsSync', |
| 3420 'expectation': False, | 3419 'expectation': False, |
| 3421 'unsafe': True, | 3420 'es3': True, |
| 3422 }, | 3421 }, |
| 3423 'IsTexture': { | 3422 'IsTexture': { |
| 3424 'type': 'Is', | 3423 'type': 'Is', |
| 3425 'decoder_func': 'DoIsTexture', | 3424 'decoder_func': 'DoIsTexture', |
| 3426 'expectation': False, | 3425 'expectation': False, |
| 3427 }, | 3426 }, |
| 3428 'IsTransformFeedback': { | 3427 'IsTransformFeedback': { |
| 3429 'type': 'Is', | 3428 'type': 'Is', |
| 3430 'decoder_func': 'DoIsTransformFeedback', | 3429 'decoder_func': 'DoIsTransformFeedback', |
| 3431 'expectation': False, | 3430 'expectation': False, |
| 3432 'unsafe': True, | 3431 'es3': True, |
| 3433 }, | 3432 }, |
| 3434 'GetLastFlushIdCHROMIUM': { | 3433 'GetLastFlushIdCHROMIUM': { |
| 3435 'type': 'NoCommand', | 3434 'type': 'NoCommand', |
| 3436 'impl_func': False, | 3435 'impl_func': False, |
| 3437 'result': ['GLuint'], | 3436 'result': ['GLuint'], |
| 3438 'extension': True, | 3437 'extension': True, |
| 3439 }, | 3438 }, |
| 3440 'LinkProgram': { | 3439 'LinkProgram': { |
| 3441 'decoder_func': 'DoLinkProgram', | 3440 'decoder_func': 'DoLinkProgram', |
| 3442 'impl_func': False, | 3441 'impl_func': False, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 3459 'pepper_interface': 'ChromiumMapSub', | 3458 'pepper_interface': 'ChromiumMapSub', |
| 3460 'trace_level': 1, | 3459 'trace_level': 1, |
| 3461 }, | 3460 }, |
| 3462 'MapBufferRange': { | 3461 'MapBufferRange': { |
| 3463 'type': 'Custom', | 3462 'type': 'Custom', |
| 3464 'data_transfer_methods': ['shm'], | 3463 'data_transfer_methods': ['shm'], |
| 3465 'cmd_args': 'GLenumBufferTarget target, GLintptrNotNegative offset, ' | 3464 'cmd_args': 'GLenumBufferTarget target, GLintptrNotNegative offset, ' |
| 3466 'GLsizeiptr size, GLbitfieldMapBufferAccess access, ' | 3465 'GLsizeiptr size, GLbitfieldMapBufferAccess access, ' |
| 3467 'uint32_t data_shm_id, uint32_t data_shm_offset, ' | 3466 'uint32_t data_shm_id, uint32_t data_shm_offset, ' |
| 3468 'uint32_t result_shm_id, uint32_t result_shm_offset', | 3467 'uint32_t result_shm_id, uint32_t result_shm_offset', |
| 3469 'unsafe': True, | 3468 'es3': True, |
| 3470 'result': ['uint32_t'], | 3469 'result': ['uint32_t'], |
| 3471 'trace_level': 1, | 3470 'trace_level': 1, |
| 3472 }, | 3471 }, |
| 3473 'PauseTransformFeedback': { | 3472 'PauseTransformFeedback': { |
| 3474 'decoder_func': 'DoPauseTransformFeedback', | 3473 'decoder_func': 'DoPauseTransformFeedback', |
| 3475 'unit_test': False, | 3474 'unit_test': False, |
| 3476 'unsafe': True, | 3475 'es3': True, |
| 3477 }, | 3476 }, |
| 3478 'PixelStorei': { | 3477 'PixelStorei': { |
| 3479 'type': 'Custom', | 3478 'type': 'Custom', |
| 3480 'impl_func': False, | 3479 'impl_func': False, |
| 3481 }, | 3480 }, |
| 3482 'PostSubBufferCHROMIUM': { | 3481 'PostSubBufferCHROMIUM': { |
| 3483 'type': 'Custom', | 3482 'type': 'Custom', |
| 3484 'impl_func': False, | 3483 'impl_func': False, |
| 3485 'client_test': False, | 3484 'client_test': False, |
| 3486 'extension': True, | 3485 'extension': True, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3527 'cmd_comment': | 3526 'cmd_comment': |
| 3528 '// GL_EXT_multisampled_render_to_texture\n', | 3527 '// GL_EXT_multisampled_render_to_texture\n', |
| 3529 'decoder_func': 'DoRenderbufferStorageMultisampleEXT', | 3528 'decoder_func': 'DoRenderbufferStorageMultisampleEXT', |
| 3530 'gl_test_func': 'glRenderbufferStorageMultisampleEXT', | 3529 'gl_test_func': 'glRenderbufferStorageMultisampleEXT', |
| 3531 'unit_test': False, | 3530 'unit_test': False, |
| 3532 'extension': 'EXT_multisampled_render_to_texture', | 3531 'extension': 'EXT_multisampled_render_to_texture', |
| 3533 'extension_flag': 'multisampled_render_to_texture', | 3532 'extension_flag': 'multisampled_render_to_texture', |
| 3534 'trace_level': 1, | 3533 'trace_level': 1, |
| 3535 }, | 3534 }, |
| 3536 'ReadBuffer': { | 3535 'ReadBuffer': { |
| 3537 'unsafe': True, | 3536 'es3': True, |
| 3538 'decoder_func': 'DoReadBuffer', | 3537 'decoder_func': 'DoReadBuffer', |
| 3539 'trace_level': 1, | 3538 'trace_level': 1, |
| 3540 }, | 3539 }, |
| 3541 'ReadPixels': { | 3540 'ReadPixels': { |
| 3542 'cmd_comment': | 3541 'cmd_comment': |
| 3543 '// ReadPixels has the result separated from the pixel buffer so that\n' | 3542 '// ReadPixels has the result separated from the pixel buffer so that\n' |
| 3544 '// it is easier to specify the result going to some specific place\n' | 3543 '// it is easier to specify the result going to some specific place\n' |
| 3545 '// that exactly fits the rectangle of pixels.\n', | 3544 '// that exactly fits the rectangle of pixels.\n', |
| 3546 'type': 'Custom', | 3545 'type': 'Custom', |
| 3547 'data_transfer_methods': ['shm'], | 3546 'data_transfer_methods': ['shm'], |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3562 'defer_reads': True, | 3561 'defer_reads': True, |
| 3563 'trace_level': 1, | 3562 'trace_level': 1, |
| 3564 }, | 3563 }, |
| 3565 'ReleaseShaderCompiler': { | 3564 'ReleaseShaderCompiler': { |
| 3566 'decoder_func': 'DoReleaseShaderCompiler', | 3565 'decoder_func': 'DoReleaseShaderCompiler', |
| 3567 'unit_test': False, | 3566 'unit_test': False, |
| 3568 }, | 3567 }, |
| 3569 'ResumeTransformFeedback': { | 3568 'ResumeTransformFeedback': { |
| 3570 'decoder_func': 'DoResumeTransformFeedback', | 3569 'decoder_func': 'DoResumeTransformFeedback', |
| 3571 'unit_test': False, | 3570 'unit_test': False, |
| 3572 'unsafe': True, | 3571 'es3': True, |
| 3573 }, | 3572 }, |
| 3574 'SamplerParameterf': { | 3573 'SamplerParameterf': { |
| 3575 'valid_args': { | 3574 'valid_args': { |
| 3576 '2': 'GL_NEAREST' | 3575 '2': 'GL_NEAREST' |
| 3577 }, | 3576 }, |
| 3578 'decoder_func': 'DoSamplerParameterf', | 3577 'decoder_func': 'DoSamplerParameterf', |
| 3579 'unsafe': True, | 3578 'es3': True, |
| 3580 }, | 3579 }, |
| 3581 'SamplerParameterfv': { | 3580 'SamplerParameterfv': { |
| 3582 'type': 'PUT', | 3581 'type': 'PUT', |
| 3583 'data_value': 'GL_NEAREST', | 3582 'data_value': 'GL_NEAREST', |
| 3584 'count': 1, | 3583 'count': 1, |
| 3585 'gl_test_func': 'glSamplerParameterf', | 3584 'gl_test_func': 'glSamplerParameterf', |
| 3586 'decoder_func': 'DoSamplerParameterfv', | 3585 'decoder_func': 'DoSamplerParameterfv', |
| 3587 'first_element_only': True, | 3586 'first_element_only': True, |
| 3588 'unsafe': True, | 3587 'es3': True, |
| 3589 }, | 3588 }, |
| 3590 'SamplerParameteri': { | 3589 'SamplerParameteri': { |
| 3591 'valid_args': { | 3590 'valid_args': { |
| 3592 '2': 'GL_NEAREST' | 3591 '2': 'GL_NEAREST' |
| 3593 }, | 3592 }, |
| 3594 'decoder_func': 'DoSamplerParameteri', | 3593 'decoder_func': 'DoSamplerParameteri', |
| 3595 'unsafe': True, | 3594 'es3': True, |
| 3596 }, | 3595 }, |
| 3597 'SamplerParameteriv': { | 3596 'SamplerParameteriv': { |
| 3598 'type': 'PUT', | 3597 'type': 'PUT', |
| 3599 'data_value': 'GL_NEAREST', | 3598 'data_value': 'GL_NEAREST', |
| 3600 'count': 1, | 3599 'count': 1, |
| 3601 'gl_test_func': 'glSamplerParameteri', | 3600 'gl_test_func': 'glSamplerParameteri', |
| 3602 'decoder_func': 'DoSamplerParameteriv', | 3601 'decoder_func': 'DoSamplerParameteriv', |
| 3603 'first_element_only': True, | 3602 'first_element_only': True, |
| 3604 'unsafe': True, | 3603 'es3': True, |
| 3605 }, | 3604 }, |
| 3606 'ShaderBinary': { | 3605 'ShaderBinary': { |
| 3607 'type': 'Custom', | 3606 'type': 'Custom', |
| 3608 'client_test': False, | 3607 'client_test': False, |
| 3609 }, | 3608 }, |
| 3610 'ShaderSource': { | 3609 'ShaderSource': { |
| 3611 'type': 'PUTSTR', | 3610 'type': 'PUTSTR', |
| 3612 'decoder_func': 'DoShaderSource', | 3611 'decoder_func': 'DoShaderSource', |
| 3613 'expectation': False, | 3612 'expectation': False, |
| 3614 'data_transfer_methods': ['bucket'], | 3613 'data_transfer_methods': ['bucket'], |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3656 'impl_func': False, | 3655 'impl_func': False, |
| 3657 'data_transfer_methods': ['shm'], | 3656 'data_transfer_methods': ['shm'], |
| 3658 'client_test': False, | 3657 'client_test': False, |
| 3659 'trace_level': 2, | 3658 'trace_level': 2, |
| 3660 }, | 3659 }, |
| 3661 'TexImage3D': { | 3660 'TexImage3D': { |
| 3662 'type': 'Custom', | 3661 'type': 'Custom', |
| 3663 'impl_func': False, | 3662 'impl_func': False, |
| 3664 'data_transfer_methods': ['shm'], | 3663 'data_transfer_methods': ['shm'], |
| 3665 'client_test': False, | 3664 'client_test': False, |
| 3666 'unsafe': True, | 3665 'es3': True, |
| 3667 'trace_level': 2, | 3666 'trace_level': 2, |
| 3668 }, | 3667 }, |
| 3669 'TexParameterf': { | 3668 'TexParameterf': { |
| 3670 'decoder_func': 'DoTexParameterf', | 3669 'decoder_func': 'DoTexParameterf', |
| 3671 'valid_args': { | 3670 'valid_args': { |
| 3672 '2': 'GL_NEAREST' | 3671 '2': 'GL_NEAREST' |
| 3673 }, | 3672 }, |
| 3674 }, | 3673 }, |
| 3675 'TexParameteri': { | 3674 'TexParameteri': { |
| 3676 'decoder_func': 'DoTexParameteri', | 3675 'decoder_func': 'DoTexParameteri', |
| (...skipping 11 matching lines...) Expand all Loading... |
| 3688 }, | 3687 }, |
| 3689 'TexParameteriv': { | 3688 'TexParameteriv': { |
| 3690 'type': 'PUT', | 3689 'type': 'PUT', |
| 3691 'data_value': 'GL_NEAREST', | 3690 'data_value': 'GL_NEAREST', |
| 3692 'count': 1, | 3691 'count': 1, |
| 3693 'decoder_func': 'DoTexParameteriv', | 3692 'decoder_func': 'DoTexParameteriv', |
| 3694 'gl_test_func': 'glTexParameteri', | 3693 'gl_test_func': 'glTexParameteri', |
| 3695 'first_element_only': True, | 3694 'first_element_only': True, |
| 3696 }, | 3695 }, |
| 3697 'TexStorage3D': { | 3696 'TexStorage3D': { |
| 3698 'unsafe': True, | 3697 'es3': True, |
| 3699 'unit_test': False, | 3698 'unit_test': False, |
| 3700 'decoder_func': 'DoTexStorage3D', | 3699 'decoder_func': 'DoTexStorage3D', |
| 3701 'trace_level': 2, | 3700 'trace_level': 2, |
| 3702 }, | 3701 }, |
| 3703 'TexSubImage2D': { | 3702 'TexSubImage2D': { |
| 3704 'type': 'Custom', | 3703 'type': 'Custom', |
| 3705 'impl_func': False, | 3704 'impl_func': False, |
| 3706 'data_transfer_methods': ['shm'], | 3705 'data_transfer_methods': ['shm'], |
| 3707 'client_test': False, | 3706 'client_test': False, |
| 3708 'trace_level': 2, | 3707 'trace_level': 2, |
| 3709 'cmd_args': 'GLenumTextureTarget target, GLint level, ' | 3708 'cmd_args': 'GLenumTextureTarget target, GLint level, ' |
| 3710 'GLint xoffset, GLint yoffset, ' | 3709 'GLint xoffset, GLint yoffset, ' |
| 3711 'GLsizei width, GLsizei height, ' | 3710 'GLsizei width, GLsizei height, ' |
| 3712 'GLenumTextureFormat format, GLenumPixelType type, ' | 3711 'GLenumTextureFormat format, GLenumPixelType type, ' |
| 3713 'const void* pixels, GLboolean internal' | 3712 'const void* pixels, GLboolean internal' |
| 3714 }, | 3713 }, |
| 3715 'TexSubImage3D': { | 3714 'TexSubImage3D': { |
| 3716 'type': 'Custom', | 3715 'type': 'Custom', |
| 3717 'impl_func': False, | 3716 'impl_func': False, |
| 3718 'data_transfer_methods': ['shm'], | 3717 'data_transfer_methods': ['shm'], |
| 3719 'client_test': False, | 3718 'client_test': False, |
| 3720 'trace_level': 2, | 3719 'trace_level': 2, |
| 3721 'cmd_args': 'GLenumTextureTarget target, GLint level, ' | 3720 'cmd_args': 'GLenumTextureTarget target, GLint level, ' |
| 3722 'GLint xoffset, GLint yoffset, GLint zoffset, ' | 3721 'GLint xoffset, GLint yoffset, GLint zoffset, ' |
| 3723 'GLsizei width, GLsizei height, GLsizei depth, ' | 3722 'GLsizei width, GLsizei height, GLsizei depth, ' |
| 3724 'GLenumTextureFormat format, GLenumPixelType type, ' | 3723 'GLenumTextureFormat format, GLenumPixelType type, ' |
| 3725 'const void* pixels, GLboolean internal', | 3724 'const void* pixels, GLboolean internal', |
| 3726 'unsafe': True, | 3725 'es3': True, |
| 3727 }, | 3726 }, |
| 3728 'TransformFeedbackVaryings': { | 3727 'TransformFeedbackVaryings': { |
| 3729 'type': 'PUTSTR', | 3728 'type': 'PUTSTR', |
| 3730 'data_transfer_methods': ['bucket'], | 3729 'data_transfer_methods': ['bucket'], |
| 3731 'decoder_func': 'DoTransformFeedbackVaryings', | 3730 'decoder_func': 'DoTransformFeedbackVaryings', |
| 3732 'cmd_args': | 3731 'cmd_args': |
| 3733 'GLuint program, const char** varyings, GLenum buffermode', | 3732 'GLuint program, const char** varyings, GLenum buffermode', |
| 3734 'expectation': False, | 3733 'expectation': False, |
| 3735 'unsafe': True, | 3734 'es3': True, |
| 3736 }, | 3735 }, |
| 3737 'Uniform1f': {'type': 'PUTXn', 'count': 1}, | 3736 'Uniform1f': {'type': 'PUTXn', 'count': 1}, |
| 3738 'Uniform1fv': { | 3737 'Uniform1fv': { |
| 3739 'type': 'PUTn', | 3738 'type': 'PUTn', |
| 3740 'count': 1, | 3739 'count': 1, |
| 3741 'decoder_func': 'DoUniform1fv', | 3740 'decoder_func': 'DoUniform1fv', |
| 3742 }, | 3741 }, |
| 3743 'Uniform1i': {'decoder_func': 'DoUniform1i', 'unit_test': False}, | 3742 'Uniform1i': {'decoder_func': 'DoUniform1i', 'unit_test': False}, |
| 3744 'Uniform1iv': { | 3743 'Uniform1iv': { |
| 3745 'type': 'PUTn', | 3744 'type': 'PUTn', |
| 3746 'count': 1, | 3745 'count': 1, |
| 3747 'decoder_func': 'DoUniform1iv', | 3746 'decoder_func': 'DoUniform1iv', |
| 3748 'unit_test': False, | 3747 'unit_test': False, |
| 3749 }, | 3748 }, |
| 3750 'Uniform1ui': { | 3749 'Uniform1ui': { |
| 3751 'type': 'PUTXn', | 3750 'type': 'PUTXn', |
| 3752 'count': 1, | 3751 'count': 1, |
| 3753 'unit_test': False, | 3752 'unit_test': False, |
| 3754 'unsafe': True, | 3753 'es3': True, |
| 3755 }, | 3754 }, |
| 3756 'Uniform1uiv': { | 3755 'Uniform1uiv': { |
| 3757 'type': 'PUTn', | 3756 'type': 'PUTn', |
| 3758 'count': 1, | 3757 'count': 1, |
| 3759 'decoder_func': 'DoUniform1uiv', | 3758 'decoder_func': 'DoUniform1uiv', |
| 3760 'unit_test': False, | 3759 'unit_test': False, |
| 3761 'unsafe': True, | 3760 'es3': True, |
| 3762 }, | 3761 }, |
| 3763 'Uniform2i': {'type': 'PUTXn', 'count': 2}, | 3762 'Uniform2i': {'type': 'PUTXn', 'count': 2}, |
| 3764 'Uniform2f': {'type': 'PUTXn', 'count': 2}, | 3763 'Uniform2f': {'type': 'PUTXn', 'count': 2}, |
| 3765 'Uniform2fv': { | 3764 'Uniform2fv': { |
| 3766 'type': 'PUTn', | 3765 'type': 'PUTn', |
| 3767 'count': 2, | 3766 'count': 2, |
| 3768 'decoder_func': 'DoUniform2fv', | 3767 'decoder_func': 'DoUniform2fv', |
| 3769 }, | 3768 }, |
| 3770 'Uniform2iv': { | 3769 'Uniform2iv': { |
| 3771 'type': 'PUTn', | 3770 'type': 'PUTn', |
| 3772 'count': 2, | 3771 'count': 2, |
| 3773 'decoder_func': 'DoUniform2iv', | 3772 'decoder_func': 'DoUniform2iv', |
| 3774 }, | 3773 }, |
| 3775 'Uniform2ui': { | 3774 'Uniform2ui': { |
| 3776 'type': 'PUTXn', | 3775 'type': 'PUTXn', |
| 3777 'count': 2, | 3776 'count': 2, |
| 3778 'unit_test': False, | 3777 'unit_test': False, |
| 3779 'unsafe': True, | 3778 'es3': True, |
| 3780 }, | 3779 }, |
| 3781 'Uniform2uiv': { | 3780 'Uniform2uiv': { |
| 3782 'type': 'PUTn', | 3781 'type': 'PUTn', |
| 3783 'count': 2, | 3782 'count': 2, |
| 3784 'decoder_func': 'DoUniform2uiv', | 3783 'decoder_func': 'DoUniform2uiv', |
| 3785 'unit_test': False, | 3784 'unit_test': False, |
| 3786 'unsafe': True, | 3785 'es3': True, |
| 3787 }, | 3786 }, |
| 3788 'Uniform3i': {'type': 'PUTXn', 'count': 3}, | 3787 'Uniform3i': {'type': 'PUTXn', 'count': 3}, |
| 3789 'Uniform3f': {'type': 'PUTXn', 'count': 3}, | 3788 'Uniform3f': {'type': 'PUTXn', 'count': 3}, |
| 3790 'Uniform3fv': { | 3789 'Uniform3fv': { |
| 3791 'type': 'PUTn', | 3790 'type': 'PUTn', |
| 3792 'count': 3, | 3791 'count': 3, |
| 3793 'decoder_func': 'DoUniform3fv', | 3792 'decoder_func': 'DoUniform3fv', |
| 3794 }, | 3793 }, |
| 3795 'Uniform3iv': { | 3794 'Uniform3iv': { |
| 3796 'type': 'PUTn', | 3795 'type': 'PUTn', |
| 3797 'count': 3, | 3796 'count': 3, |
| 3798 'decoder_func': 'DoUniform3iv', | 3797 'decoder_func': 'DoUniform3iv', |
| 3799 }, | 3798 }, |
| 3800 'Uniform3ui': { | 3799 'Uniform3ui': { |
| 3801 'type': 'PUTXn', | 3800 'type': 'PUTXn', |
| 3802 'count': 3, | 3801 'count': 3, |
| 3803 'unit_test': False, | 3802 'unit_test': False, |
| 3804 'unsafe': True, | 3803 'es3': True, |
| 3805 }, | 3804 }, |
| 3806 'Uniform3uiv': { | 3805 'Uniform3uiv': { |
| 3807 'type': 'PUTn', | 3806 'type': 'PUTn', |
| 3808 'count': 3, | 3807 'count': 3, |
| 3809 'decoder_func': 'DoUniform3uiv', | 3808 'decoder_func': 'DoUniform3uiv', |
| 3810 'unit_test': False, | 3809 'unit_test': False, |
| 3811 'unsafe': True, | 3810 'es3': True, |
| 3812 }, | 3811 }, |
| 3813 'Uniform4i': {'type': 'PUTXn', 'count': 4}, | 3812 'Uniform4i': {'type': 'PUTXn', 'count': 4}, |
| 3814 'Uniform4f': {'type': 'PUTXn', 'count': 4}, | 3813 'Uniform4f': {'type': 'PUTXn', 'count': 4}, |
| 3815 'Uniform4fv': { | 3814 'Uniform4fv': { |
| 3816 'type': 'PUTn', | 3815 'type': 'PUTn', |
| 3817 'count': 4, | 3816 'count': 4, |
| 3818 'decoder_func': 'DoUniform4fv', | 3817 'decoder_func': 'DoUniform4fv', |
| 3819 }, | 3818 }, |
| 3820 'Uniform4iv': { | 3819 'Uniform4iv': { |
| 3821 'type': 'PUTn', | 3820 'type': 'PUTn', |
| 3822 'count': 4, | 3821 'count': 4, |
| 3823 'decoder_func': 'DoUniform4iv', | 3822 'decoder_func': 'DoUniform4iv', |
| 3824 }, | 3823 }, |
| 3825 'Uniform4ui': { | 3824 'Uniform4ui': { |
| 3826 'type': 'PUTXn', | 3825 'type': 'PUTXn', |
| 3827 'count': 4, | 3826 'count': 4, |
| 3828 'unit_test': False, | 3827 'unit_test': False, |
| 3829 'unsafe': True, | 3828 'es3': True, |
| 3830 }, | 3829 }, |
| 3831 'Uniform4uiv': { | 3830 'Uniform4uiv': { |
| 3832 'type': 'PUTn', | 3831 'type': 'PUTn', |
| 3833 'count': 4, | 3832 'count': 4, |
| 3834 'decoder_func': 'DoUniform4uiv', | 3833 'decoder_func': 'DoUniform4uiv', |
| 3835 'unit_test': False, | 3834 'unit_test': False, |
| 3836 'unsafe': True, | 3835 'es3': True, |
| 3837 }, | 3836 }, |
| 3838 'UniformMatrix2fv': { | 3837 'UniformMatrix2fv': { |
| 3839 'type': 'PUTn', | 3838 'type': 'PUTn', |
| 3840 'count': 4, | 3839 'count': 4, |
| 3841 'decoder_func': 'DoUniformMatrix2fv', | 3840 'decoder_func': 'DoUniformMatrix2fv', |
| 3842 'unit_test': False, | 3841 'unit_test': False, |
| 3843 }, | 3842 }, |
| 3844 'UniformMatrix2x3fv': { | 3843 'UniformMatrix2x3fv': { |
| 3845 'type': 'PUTn', | 3844 'type': 'PUTn', |
| 3846 'count': 6, | 3845 'count': 6, |
| 3847 'decoder_func': 'DoUniformMatrix2x3fv', | 3846 'decoder_func': 'DoUniformMatrix2x3fv', |
| 3848 'unsafe': True, | 3847 'es3': True, |
| 3849 }, | 3848 }, |
| 3850 'UniformMatrix2x4fv': { | 3849 'UniformMatrix2x4fv': { |
| 3851 'type': 'PUTn', | 3850 'type': 'PUTn', |
| 3852 'count': 8, | 3851 'count': 8, |
| 3853 'decoder_func': 'DoUniformMatrix2x4fv', | 3852 'decoder_func': 'DoUniformMatrix2x4fv', |
| 3854 'unsafe': True, | 3853 'es3': True, |
| 3855 }, | 3854 }, |
| 3856 'UniformMatrix3fv': { | 3855 'UniformMatrix3fv': { |
| 3857 'type': 'PUTn', | 3856 'type': 'PUTn', |
| 3858 'count': 9, | 3857 'count': 9, |
| 3859 'decoder_func': 'DoUniformMatrix3fv', | 3858 'decoder_func': 'DoUniformMatrix3fv', |
| 3860 'unit_test': False, | 3859 'unit_test': False, |
| 3861 }, | 3860 }, |
| 3862 'UniformMatrix3x2fv': { | 3861 'UniformMatrix3x2fv': { |
| 3863 'type': 'PUTn', | 3862 'type': 'PUTn', |
| 3864 'count': 6, | 3863 'count': 6, |
| 3865 'decoder_func': 'DoUniformMatrix3x2fv', | 3864 'decoder_func': 'DoUniformMatrix3x2fv', |
| 3866 'unsafe': True, | 3865 'es3': True, |
| 3867 }, | 3866 }, |
| 3868 'UniformMatrix3x4fv': { | 3867 'UniformMatrix3x4fv': { |
| 3869 'type': 'PUTn', | 3868 'type': 'PUTn', |
| 3870 'count': 12, | 3869 'count': 12, |
| 3871 'decoder_func': 'DoUniformMatrix3x4fv', | 3870 'decoder_func': 'DoUniformMatrix3x4fv', |
| 3872 'unsafe': True, | 3871 'es3': True, |
| 3873 }, | 3872 }, |
| 3874 'UniformMatrix4fv': { | 3873 'UniformMatrix4fv': { |
| 3875 'type': 'PUTn', | 3874 'type': 'PUTn', |
| 3876 'count': 16, | 3875 'count': 16, |
| 3877 'decoder_func': 'DoUniformMatrix4fv', | 3876 'decoder_func': 'DoUniformMatrix4fv', |
| 3878 'unit_test': False, | 3877 'unit_test': False, |
| 3879 }, | 3878 }, |
| 3880 'UniformMatrix4fvStreamTextureMatrixCHROMIUM': { | 3879 'UniformMatrix4fvStreamTextureMatrixCHROMIUM': { |
| 3881 'type': 'PUT', | 3880 'type': 'PUT', |
| 3882 'count': 16, | 3881 'count': 16, |
| 3883 'decoder_func': 'DoUniformMatrix4fvStreamTextureMatrixCHROMIUM', | 3882 'decoder_func': 'DoUniformMatrix4fvStreamTextureMatrixCHROMIUM', |
| 3884 'extension': "CHROMIUM_uniform_stream_texture_matrix", | 3883 'extension': "CHROMIUM_uniform_stream_texture_matrix", |
| 3885 'unit_test': False, | 3884 'unit_test': False, |
| 3886 'client_test': False, | 3885 'client_test': False, |
| 3887 }, | 3886 }, |
| 3888 'UniformMatrix4x2fv': { | 3887 'UniformMatrix4x2fv': { |
| 3889 'type': 'PUTn', | 3888 'type': 'PUTn', |
| 3890 'count': 8, | 3889 'count': 8, |
| 3891 'decoder_func': 'DoUniformMatrix4x2fv', | 3890 'decoder_func': 'DoUniformMatrix4x2fv', |
| 3892 'unsafe': True, | 3891 'es3': True, |
| 3893 }, | 3892 }, |
| 3894 'UniformMatrix4x3fv': { | 3893 'UniformMatrix4x3fv': { |
| 3895 'type': 'PUTn', | 3894 'type': 'PUTn', |
| 3896 'count': 12, | 3895 'count': 12, |
| 3897 'decoder_func': 'DoUniformMatrix4x3fv', | 3896 'decoder_func': 'DoUniformMatrix4x3fv', |
| 3898 'unsafe': True, | 3897 'es3': True, |
| 3899 }, | 3898 }, |
| 3900 'UniformBlockBinding': { | 3899 'UniformBlockBinding': { |
| 3901 'type': 'Custom', | 3900 'type': 'Custom', |
| 3902 'impl_func': False, | 3901 'impl_func': False, |
| 3903 'unsafe': True, | 3902 'es3': True, |
| 3904 }, | 3903 }, |
| 3905 'UnmapBufferCHROMIUM': { | 3904 'UnmapBufferCHROMIUM': { |
| 3906 'type': 'NoCommand', | 3905 'type': 'NoCommand', |
| 3907 'extension': "CHROMIUM_pixel_transfer_buffer_object", | 3906 'extension': "CHROMIUM_pixel_transfer_buffer_object", |
| 3908 'trace_level': 1, | 3907 'trace_level': 1, |
| 3909 }, | 3908 }, |
| 3910 'UnmapBufferSubDataCHROMIUM': { | 3909 'UnmapBufferSubDataCHROMIUM': { |
| 3911 'type': 'NoCommand', | 3910 'type': 'NoCommand', |
| 3912 'extension': 'CHROMIUM_map_sub', | 3911 'extension': 'CHROMIUM_map_sub', |
| 3913 'pepper_interface': 'ChromiumMapSub', | 3912 'pepper_interface': 'ChromiumMapSub', |
| 3914 'trace_level': 1, | 3913 'trace_level': 1, |
| 3915 }, | 3914 }, |
| 3916 'UnmapBuffer': { | 3915 'UnmapBuffer': { |
| 3917 'type': 'Custom', | 3916 'type': 'Custom', |
| 3918 'unsafe': True, | 3917 'es3': True, |
| 3919 'trace_level': 1, | 3918 'trace_level': 1, |
| 3920 }, | 3919 }, |
| 3921 'UnmapTexSubImage2DCHROMIUM': { | 3920 'UnmapTexSubImage2DCHROMIUM': { |
| 3922 'type': 'NoCommand', | 3921 'type': 'NoCommand', |
| 3923 'extension': "CHROMIUM_sub_image", | 3922 'extension': "CHROMIUM_sub_image", |
| 3924 'pepper_interface': 'ChromiumMapSub', | 3923 'pepper_interface': 'ChromiumMapSub', |
| 3925 'trace_level': 1, | 3924 'trace_level': 1, |
| 3926 }, | 3925 }, |
| 3927 'UseProgram': { | 3926 'UseProgram': { |
| 3928 'type': 'Bind', | 3927 'type': 'Bind', |
| (...skipping 18 matching lines...) Expand all Loading... |
| 3947 'count': 3, | 3946 'count': 3, |
| 3948 'decoder_func': 'DoVertexAttrib3fv', | 3947 'decoder_func': 'DoVertexAttrib3fv', |
| 3949 }, | 3948 }, |
| 3950 'VertexAttrib4f': {'decoder_func': 'DoVertexAttrib4f'}, | 3949 'VertexAttrib4f': {'decoder_func': 'DoVertexAttrib4f'}, |
| 3951 'VertexAttrib4fv': { | 3950 'VertexAttrib4fv': { |
| 3952 'type': 'PUT', | 3951 'type': 'PUT', |
| 3953 'count': 4, | 3952 'count': 4, |
| 3954 'decoder_func': 'DoVertexAttrib4fv', | 3953 'decoder_func': 'DoVertexAttrib4fv', |
| 3955 }, | 3954 }, |
| 3956 'VertexAttribI4i': { | 3955 'VertexAttribI4i': { |
| 3957 'unsafe': True, | 3956 'es3': True, |
| 3958 'decoder_func': 'DoVertexAttribI4i', | 3957 'decoder_func': 'DoVertexAttribI4i', |
| 3959 }, | 3958 }, |
| 3960 'VertexAttribI4iv': { | 3959 'VertexAttribI4iv': { |
| 3961 'type': 'PUT', | 3960 'type': 'PUT', |
| 3962 'count': 4, | 3961 'count': 4, |
| 3963 'unsafe': True, | 3962 'es3': True, |
| 3964 'decoder_func': 'DoVertexAttribI4iv', | 3963 'decoder_func': 'DoVertexAttribI4iv', |
| 3965 }, | 3964 }, |
| 3966 'VertexAttribI4ui': { | 3965 'VertexAttribI4ui': { |
| 3967 'unsafe': True, | 3966 'es3': True, |
| 3968 'decoder_func': 'DoVertexAttribI4ui', | 3967 'decoder_func': 'DoVertexAttribI4ui', |
| 3969 }, | 3968 }, |
| 3970 'VertexAttribI4uiv': { | 3969 'VertexAttribI4uiv': { |
| 3971 'type': 'PUT', | 3970 'type': 'PUT', |
| 3972 'count': 4, | 3971 'count': 4, |
| 3973 'unsafe': True, | 3972 'es3': True, |
| 3974 'decoder_func': 'DoVertexAttribI4uiv', | 3973 'decoder_func': 'DoVertexAttribI4uiv', |
| 3975 }, | 3974 }, |
| 3976 'VertexAttribIPointer': { | 3975 'VertexAttribIPointer': { |
| 3977 'type': 'Custom', | 3976 'type': 'Custom', |
| 3978 'impl_func': False, | 3977 'impl_func': False, |
| 3979 'cmd_args': 'GLuint indx, GLintVertexAttribSize size, ' | 3978 'cmd_args': 'GLuint indx, GLintVertexAttribSize size, ' |
| 3980 'GLenumVertexAttribIType type, GLsizei stride, ' | 3979 'GLenumVertexAttribIType type, GLsizei stride, ' |
| 3981 'GLuint offset', | 3980 'GLuint offset', |
| 3982 'client_test': False, | 3981 'client_test': False, |
| 3983 'unsafe': True, | 3982 'es3': True, |
| 3984 }, | 3983 }, |
| 3985 'VertexAttribPointer': { | 3984 'VertexAttribPointer': { |
| 3986 'type': 'Custom', | 3985 'type': 'Custom', |
| 3987 'impl_func': False, | 3986 'impl_func': False, |
| 3988 'cmd_args': 'GLuint indx, GLintVertexAttribSize size, ' | 3987 'cmd_args': 'GLuint indx, GLintVertexAttribSize size, ' |
| 3989 'GLenumVertexAttribType type, GLboolean normalized, ' | 3988 'GLenumVertexAttribType type, GLboolean normalized, ' |
| 3990 'GLsizei stride, GLuint offset', | 3989 'GLsizei stride, GLuint offset', |
| 3991 'client_test': False, | 3990 'client_test': False, |
| 3992 }, | 3991 }, |
| 3993 'WaitSync': { | 3992 'WaitSync': { |
| 3994 'type': 'Custom', | 3993 'type': 'Custom', |
| 3995 'cmd_args': 'GLuint sync, GLbitfieldSyncFlushFlags flags, ' | 3994 'cmd_args': 'GLuint sync, GLbitfieldSyncFlushFlags flags, ' |
| 3996 'GLuint64 timeout', | 3995 'GLuint64 timeout', |
| 3997 'impl_func': False, | 3996 'impl_func': False, |
| 3998 'client_test': False, | 3997 'client_test': False, |
| 3999 'unsafe': True, | 3998 'es3': True, |
| 4000 'trace_level': 1, | 3999 'trace_level': 1, |
| 4001 }, | 4000 }, |
| 4002 'Scissor': { | 4001 'Scissor': { |
| 4003 'type': 'StateSet', | 4002 'type': 'StateSet', |
| 4004 'state': 'Scissor', | 4003 'state': 'Scissor', |
| 4005 }, | 4004 }, |
| 4006 'Viewport': { | 4005 'Viewport': { |
| 4007 'decoder_func': 'DoViewport', | 4006 'decoder_func': 'DoViewport', |
| 4008 }, | 4007 }, |
| 4009 'ResizeCHROMIUM': { | 4008 'ResizeCHROMIUM': { |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4118 'impl_func': False, | 4117 'impl_func': False, |
| 4119 'cmd_args': 'GLenumQueryTarget target, GLidQuery id, void* sync_data', | 4118 'cmd_args': 'GLenumQueryTarget target, GLidQuery id, void* sync_data', |
| 4120 'data_transfer_methods': ['shm'], | 4119 'data_transfer_methods': ['shm'], |
| 4121 'gl_test_func': 'glBeginQuery', | 4120 'gl_test_func': 'glBeginQuery', |
| 4122 'pepper_interface': 'Query', | 4121 'pepper_interface': 'Query', |
| 4123 'extension': "occlusion_query_EXT", | 4122 'extension': "occlusion_query_EXT", |
| 4124 }, | 4123 }, |
| 4125 'BeginTransformFeedback': { | 4124 'BeginTransformFeedback': { |
| 4126 'decoder_func': 'DoBeginTransformFeedback', | 4125 'decoder_func': 'DoBeginTransformFeedback', |
| 4127 'unit_test': False, | 4126 'unit_test': False, |
| 4128 'unsafe': True, | 4127 'es3': True, |
| 4129 }, | 4128 }, |
| 4130 'EndQueryEXT': { | 4129 'EndQueryEXT': { |
| 4131 'type': 'Custom', | 4130 'type': 'Custom', |
| 4132 'impl_func': False, | 4131 'impl_func': False, |
| 4133 'cmd_args': 'GLenumQueryTarget target, GLuint submit_count', | 4132 'cmd_args': 'GLenumQueryTarget target, GLuint submit_count', |
| 4134 'gl_test_func': 'glEndnQuery', | 4133 'gl_test_func': 'glEndnQuery', |
| 4135 'client_test': False, | 4134 'client_test': False, |
| 4136 'pepper_interface': 'Query', | 4135 'pepper_interface': 'Query', |
| 4137 'extension': "occlusion_query_EXT", | 4136 'extension': "occlusion_query_EXT", |
| 4138 }, | 4137 }, |
| 4139 'EndTransformFeedback': { | 4138 'EndTransformFeedback': { |
| 4140 'decoder_func': 'DoEndTransformFeedback', | 4139 'decoder_func': 'DoEndTransformFeedback', |
| 4141 'unit_test': False, | 4140 'unit_test': False, |
| 4142 'unsafe': True, | 4141 'es3': True, |
| 4143 }, | 4142 }, |
| 4144 'FlushDriverCachesCHROMIUM': { | 4143 'FlushDriverCachesCHROMIUM': { |
| 4145 'decoder_func': 'DoFlushDriverCachesCHROMIUM', | 4144 'decoder_func': 'DoFlushDriverCachesCHROMIUM', |
| 4146 'unit_test': False, | 4145 'unit_test': False, |
| 4147 'extension': True, | 4146 'extension': True, |
| 4148 'trace_level': 1, | 4147 'trace_level': 1, |
| 4149 }, | 4148 }, |
| 4150 'GetQueryivEXT': { | 4149 'GetQueryivEXT': { |
| 4151 'type': 'NoCommand', | 4150 'type': 'NoCommand', |
| 4152 'gl_test_func': 'glGetQueryiv', | 4151 'gl_test_func': 'glGetQueryiv', |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4772 f.write((check.strip() + "\n") % { | 4771 f.write((check.strip() + "\n") % { |
| 4773 'cmd_name': func.name, | 4772 'cmd_name': func.name, |
| 4774 'field_name': name, | 4773 'field_name': name, |
| 4775 'offset': offset, | 4774 'offset': offset, |
| 4776 }) | 4775 }) |
| 4777 offset += _SIZE_OF_UINT32 | 4776 offset += _SIZE_OF_UINT32 |
| 4778 f.write("\n") | 4777 f.write("\n") |
| 4779 | 4778 |
| 4780 def WriteHandlerImplementation(self, func, f): | 4779 def WriteHandlerImplementation(self, func, f): |
| 4781 """Writes the handler implementation for this command.""" | 4780 """Writes the handler implementation for this command.""" |
| 4782 if func.IsUnsafe() and func.GetInfo('id_mapping'): | 4781 if func.IsES3() and func.GetInfo('id_mapping'): |
| 4783 code_no_gen = """ if (!group_->Get%(type)sServiceId( | 4782 code_no_gen = """ if (!group_->Get%(type)sServiceId( |
| 4784 %(var)s, &%(service_var)s)) { | 4783 %(var)s, &%(service_var)s)) { |
| 4785 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "%(func)s", "invalid %(var)s id"); | 4784 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "%(func)s", "invalid %(var)s id"); |
| 4786 return error::kNoError; | 4785 return error::kNoError; |
| 4787 } | 4786 } |
| 4788 """ | 4787 """ |
| 4789 code_gen = """ if (!group_->Get%(type)sServiceId( | 4788 code_gen = """ if (!group_->Get%(type)sServiceId( |
| 4790 %(var)s, &%(service_var)s)) { | 4789 %(var)s, &%(service_var)s)) { |
| 4791 if (!group_->bind_generates_resource()) { | 4790 if (!group_->bind_generates_resource()) { |
| 4792 LOCAL_SET_GL_ERROR( | 4791 LOCAL_SET_GL_ERROR( |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4871 def WriteImmediateFormatTest(self, func, f): | 4870 def WriteImmediateFormatTest(self, func, f): |
| 4872 """Writes a format test for an immediate version of a command.""" | 4871 """Writes a format test for an immediate version of a command.""" |
| 4873 pass | 4872 pass |
| 4874 | 4873 |
| 4875 def WriteGetDataSizeCode(self, func, f): | 4874 def WriteGetDataSizeCode(self, func, f): |
| 4876 """Writes the code to set data_size used in validation""" | 4875 """Writes the code to set data_size used in validation""" |
| 4877 pass | 4876 pass |
| 4878 | 4877 |
| 4879 def __WriteIdMapping(self, func, f): | 4878 def __WriteIdMapping(self, func, f): |
| 4880 """Writes client side / service side ID mapping.""" | 4879 """Writes client side / service side ID mapping.""" |
| 4881 if not func.IsUnsafe() or not func.GetInfo('id_mapping'): | 4880 if not func.IsES3() or not func.GetInfo('id_mapping'): |
| 4882 return | 4881 return |
| 4883 for id_type in func.GetInfo('id_mapping'): | 4882 for id_type in func.GetInfo('id_mapping'): |
| 4884 f.write(" group_->Get%sServiceId(%s, &%s);\n" % | 4883 f.write(" group_->Get%sServiceId(%s, &%s);\n" % |
| 4885 (id_type, id_type.lower(), id_type.lower())) | 4884 (id_type, id_type.lower(), id_type.lower())) |
| 4886 | 4885 |
| 4887 def WriteImmediateHandlerImplementation (self, func, f): | 4886 def WriteImmediateHandlerImplementation (self, func, f): |
| 4888 """Writes the handler impl for the immediate version of a command.""" | 4887 """Writes the handler impl for the immediate version of a command.""" |
| 4889 self.__WriteIdMapping(func, f) | 4888 self.__WriteIdMapping(func, f) |
| 4890 f.write(" %s(%s);\n" % | 4889 f.write(" %s(%s);\n" % |
| 4891 (func.GetGLFunctionName(), func.MakeOriginalArgString(""))) | 4890 (func.GetGLFunctionName(), func.MakeOriginalArgString(""))) |
| 4892 | 4891 |
| 4893 def WriteBucketHandlerImplementation (self, func, f): | 4892 def WriteBucketHandlerImplementation (self, func, f): |
| 4894 """Writes the handler impl for the bucket version of a command.""" | 4893 """Writes the handler impl for the bucket version of a command.""" |
| 4895 self.__WriteIdMapping(func, f) | 4894 self.__WriteIdMapping(func, f) |
| 4896 f.write(" %s(%s);\n" % | 4895 f.write(" %s(%s);\n" % |
| 4897 (func.GetGLFunctionName(), func.MakeOriginalArgString(""))) | 4896 (func.GetGLFunctionName(), func.MakeOriginalArgString(""))) |
| 4898 | 4897 |
| 4899 def WriteServiceHandlerFunctionHeader(self, func, f): | 4898 def WriteServiceHandlerFunctionHeader(self, func, f): |
| 4900 """Writes function header for service implementation handlers.""" | 4899 """Writes function header for service implementation handlers.""" |
| 4901 f.write("""error::Error GLES2DecoderImpl::Handle%(name)s( | 4900 f.write("""error::Error GLES2DecoderImpl::Handle%(name)s( |
| 4902 uint32_t immediate_data_size, const volatile void* cmd_data) { | 4901 uint32_t immediate_data_size, const volatile void* cmd_data) { |
| 4903 """ % {'name': func.name}) | 4902 """ % {'name': func.name}) |
| 4904 if func.IsUnsafe(): | 4903 if func.IsES3(): |
| 4905 f.write("""if (!unsafe_es3_apis_enabled()) | 4904 f.write("""if (!feature_info_->IsWebGL2OrES3Context()) |
| 4906 return error::kUnknownCommand; | 4905 return error::kUnknownCommand; |
| 4907 """) | 4906 """) |
| 4908 if func.GetCmdArgs(): | 4907 if func.GetCmdArgs(): |
| 4909 f.write("""const volatile gles2::cmds::%(name)s& c = | 4908 f.write("""const volatile gles2::cmds::%(name)s& c = |
| 4910 *static_cast<const volatile gles2::cmds::%(name)s*>(cmd_data); | 4909 *static_cast<const volatile gles2::cmds::%(name)s*>(cmd_data); |
| 4911 """ % {'name': func.name}) | 4910 """ % {'name': func.name}) |
| 4912 | 4911 |
| 4913 def WriteServiceHandlerArgGetCode(self, func, f): | 4912 def WriteServiceHandlerArgGetCode(self, func, f): |
| 4914 """Writes the argument unpack code for service handlers.""" | 4913 """Writes the argument unpack code for service handlers.""" |
| 4915 if len(func.GetOriginalArgs()) > 0: | 4914 if len(func.GetOriginalArgs()) > 0: |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5061 for extra in extras: | 5060 for extra in extras: |
| 5062 vars.update(extra) | 5061 vars.update(extra) |
| 5063 old_test = "" | 5062 old_test = "" |
| 5064 while (old_test != test): | 5063 while (old_test != test): |
| 5065 old_test = test | 5064 old_test = test |
| 5066 test = test % vars | 5065 test = test % vars |
| 5067 f.write(test % vars) | 5066 f.write(test % vars) |
| 5068 | 5067 |
| 5069 def WriteInvalidUnitTest(self, func, f, test, *extras): | 5068 def WriteInvalidUnitTest(self, func, f, test, *extras): |
| 5070 """Writes an invalid unit test for the service implementation.""" | 5069 """Writes an invalid unit test for the service implementation.""" |
| 5071 if func.IsUnsafe(): | 5070 if func.IsES3(): |
| 5072 return | 5071 return |
| 5073 for invalid_arg_index, invalid_arg in enumerate(func.GetOriginalArgs()): | 5072 for invalid_arg_index, invalid_arg in enumerate(func.GetOriginalArgs()): |
| 5074 # Service implementation does not test constants, as they are not part of | 5073 # Service implementation does not test constants, as they are not part of |
| 5075 # the call in the service side. | 5074 # the call in the service side. |
| 5076 if invalid_arg.IsConstant(): | 5075 if invalid_arg.IsConstant(): |
| 5077 continue | 5076 continue |
| 5078 | 5077 |
| 5079 num_invalid_values = invalid_arg.GetNumInvalidValues(func) | 5078 num_invalid_values = invalid_arg.GetNumInvalidValues(func) |
| 5080 for value_index in range(0, num_invalid_values): | 5079 for value_index in range(0, num_invalid_values): |
| 5081 arg_strings = [] | 5080 arg_strings = [] |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5130 SpecializedSetup<cmds::%(name)s, 0>(true); | 5129 SpecializedSetup<cmds::%(name)s, 0>(true); |
| 5131 cmds::%(name)s cmd; | 5130 cmds::%(name)s cmd; |
| 5132 cmd.Init(%(args)s);""" | 5131 cmd.Init(%(args)s);""" |
| 5133 else: | 5132 else: |
| 5134 valid_test = """ | 5133 valid_test = """ |
| 5135 TEST_P(%(test_name)s, %(name)sValidArgs) { | 5134 TEST_P(%(test_name)s, %(name)sValidArgs) { |
| 5136 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)); | 5135 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)); |
| 5137 SpecializedSetup<cmds::%(name)s, 0>(true); | 5136 SpecializedSetup<cmds::%(name)s, 0>(true); |
| 5138 cmds::%(name)s cmd; | 5137 cmds::%(name)s cmd; |
| 5139 cmd.Init(%(args)s);""" | 5138 cmd.Init(%(args)s);""" |
| 5140 if func.IsUnsafe(): | 5139 valid_test += """ |
| 5141 valid_test += """ | |
| 5142 decoder_->set_unsafe_es3_apis_enabled(true); | |
| 5143 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | |
| 5144 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | |
| 5145 decoder_->set_unsafe_es3_apis_enabled(false); | |
| 5146 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); | |
| 5147 } | |
| 5148 """ | |
| 5149 else: | |
| 5150 valid_test += """ | |
| 5151 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 5140 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 5152 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 5141 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 5153 } | 5142 } |
| 5154 """ | 5143 """ |
| 5155 self.WriteValidUnitTest(func, f, valid_test, *extras) | 5144 self.WriteValidUnitTest(func, f, valid_test, *extras) |
| 5156 | 5145 |
| 5157 if not func.IsUnsafe(): | 5146 if not func.IsES3(): |
| 5158 invalid_test = """ | 5147 invalid_test = """ |
| 5159 TEST_P(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) { | 5148 TEST_P(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) { |
| 5160 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)).Times(0); | 5149 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)).Times(0); |
| 5161 SpecializedSetup<cmds::%(name)s, 0>(false); | 5150 SpecializedSetup<cmds::%(name)s, 0>(false); |
| 5162 cmds::%(name)s cmd; | 5151 cmds::%(name)s cmd; |
| 5163 cmd.Init(%(args)s); | 5152 cmd.Init(%(args)s); |
| 5164 EXPECT_EQ(error::%(parse_result)s, ExecuteCmd(cmd));%(gl_error_test)s | 5153 EXPECT_EQ(error::%(parse_result)s, ExecuteCmd(cmd));%(gl_error_test)s |
| 5165 } | 5154 } |
| 5166 """ | 5155 """ |
| 5167 self.WriteInvalidUnitTest(func, f, invalid_test, *extras) | 5156 self.WriteInvalidUnitTest(func, f, invalid_test, *extras) |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5803 | 5792 |
| 5804 def WriteServiceUnitTest(self, func, f, *extras): | 5793 def WriteServiceUnitTest(self, func, f, *extras): |
| 5805 """Overrriden from TypeHandler.""" | 5794 """Overrriden from TypeHandler.""" |
| 5806 | 5795 |
| 5807 if len(func.GetOriginalArgs()) == 1: | 5796 if len(func.GetOriginalArgs()) == 1: |
| 5808 valid_test = """ | 5797 valid_test = """ |
| 5809 TEST_P(%(test_name)s, %(name)sValidArgs) { | 5798 TEST_P(%(test_name)s, %(name)sValidArgs) { |
| 5810 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)); | 5799 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)); |
| 5811 SpecializedSetup<cmds::%(name)s, 0>(true); | 5800 SpecializedSetup<cmds::%(name)s, 0>(true); |
| 5812 cmds::%(name)s cmd; | 5801 cmds::%(name)s cmd; |
| 5813 cmd.Init(%(args)s);""" | 5802 cmd.Init(%(args)s); |
| 5814 if func.IsUnsafe(): | |
| 5815 valid_test += """ | |
| 5816 decoder_->set_unsafe_es3_apis_enabled(true); | |
| 5817 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | |
| 5818 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | |
| 5819 decoder_->set_unsafe_es3_apis_enabled(false); | |
| 5820 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); | |
| 5821 } | |
| 5822 """ | |
| 5823 else: | |
| 5824 valid_test += """ | |
| 5825 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 5803 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 5826 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 5804 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 5827 } | 5805 } |
| 5828 """ | 5806 """ |
| 5829 if func.GetInfo("gen_func"): | 5807 if func.GetInfo("gen_func"): |
| 5830 valid_test += """ | 5808 valid_test += """ |
| 5831 TEST_P(%(test_name)s, %(name)sValidArgsNewId) { | 5809 TEST_P(%(test_name)s, %(name)sValidArgsNewId) { |
| 5832 EXPECT_CALL(*gl_, %(gl_func_name)s(kNewServiceId)); | 5810 EXPECT_CALL(*gl_, %(gl_func_name)s(kNewServiceId)); |
| 5833 EXPECT_CALL(*gl_, %(gl_gen_func_name)s(1, _)) | 5811 EXPECT_CALL(*gl_, %(gl_gen_func_name)s(1, _)) |
| 5834 .WillOnce(SetArgumentPointee<1>(kNewServiceId)); | 5812 .WillOnce(SetArgumentPointee<1>(kNewServiceId)); |
| 5835 SpecializedSetup<cmds::%(name)s, 0>(true); | 5813 SpecializedSetup<cmds::%(name)s, 0>(true); |
| 5836 cmds::%(name)s cmd; | 5814 cmds::%(name)s cmd; |
| 5837 cmd.Init(kNewClientId); | 5815 cmd.Init(kNewClientId); |
| 5838 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 5816 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 5839 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 5817 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 5840 EXPECT_TRUE(Get%(resource_type)s(kNewClientId) != NULL); | 5818 EXPECT_TRUE(Get%(resource_type)s(kNewClientId) != NULL); |
| 5841 } | 5819 } |
| 5842 """ | 5820 """ |
| 5843 self.WriteValidUnitTest(func, f, valid_test, { | 5821 self.WriteValidUnitTest(func, f, valid_test, { |
| 5844 'resource_type': func.GetOriginalArgs()[0].resource_type, | 5822 'resource_type': func.GetOriginalArgs()[0].resource_type, |
| 5845 'gl_gen_func_name': func.GetInfo("gen_func"), | 5823 'gl_gen_func_name': func.GetInfo("gen_func"), |
| 5846 }, *extras) | 5824 }, *extras) |
| 5847 else: | 5825 else: |
| 5848 valid_test = """ | 5826 valid_test = """ |
| 5849 TEST_P(%(test_name)s, %(name)sValidArgs) { | 5827 TEST_P(%(test_name)s, %(name)sValidArgs) { |
| 5850 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)); | 5828 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)); |
| 5851 SpecializedSetup<cmds::%(name)s, 0>(true); | 5829 SpecializedSetup<cmds::%(name)s, 0>(true); |
| 5852 cmds::%(name)s cmd; | 5830 cmds::%(name)s cmd; |
| 5853 cmd.Init(%(args)s);""" | 5831 cmd.Init(%(args)s); |
| 5854 if func.IsUnsafe(): | |
| 5855 valid_test += """ | |
| 5856 decoder_->set_unsafe_es3_apis_enabled(true); | |
| 5857 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | |
| 5858 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | |
| 5859 decoder_->set_unsafe_es3_apis_enabled(false); | |
| 5860 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); | |
| 5861 } | |
| 5862 """ | |
| 5863 else: | |
| 5864 valid_test += """ | |
| 5865 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 5832 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 5866 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 5833 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 5867 } | 5834 } |
| 5868 """ | 5835 """ |
| 5869 if func.GetInfo("gen_func"): | 5836 if func.GetInfo("gen_func"): |
| 5870 valid_test += """ | 5837 valid_test += """ |
| 5871 TEST_P(%(test_name)s, %(name)sValidArgsNewId) { | 5838 TEST_P(%(test_name)s, %(name)sValidArgsNewId) { |
| 5872 EXPECT_CALL(*gl_, | 5839 EXPECT_CALL(*gl_, |
| 5873 %(gl_func_name)s(%(gl_args_with_new_id)s)); | 5840 %(gl_func_name)s(%(gl_args_with_new_id)s)); |
| 5874 EXPECT_CALL(*gl_, %(gl_gen_func_name)s(1, _)) | 5841 EXPECT_CALL(*gl_, %(gl_gen_func_name)s(1, _)) |
| 5875 .WillOnce(SetArgumentPointee<1>(kNewServiceId)); | 5842 .WillOnce(SetArgumentPointee<1>(kNewServiceId)); |
| 5876 SpecializedSetup<cmds::%(name)s, 0>(true); | 5843 SpecializedSetup<cmds::%(name)s, 0>(true); |
| 5877 cmds::%(name)s cmd; | 5844 cmds::%(name)s cmd; |
| 5878 cmd.Init(%(args_with_new_id)s);""" | 5845 cmd.Init(%(args_with_new_id)s); |
| 5879 if func.IsUnsafe(): | |
| 5880 valid_test += """ | |
| 5881 decoder_->set_unsafe_es3_apis_enabled(true); | |
| 5882 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 5846 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 5883 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 5847 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 5884 EXPECT_TRUE(Get%(resource_type)s(kNewClientId) != NULL); | 5848 EXPECT_TRUE(Get%(resource_type)s(kNewClientId) != NULL); |
| 5885 decoder_->set_unsafe_es3_apis_enabled(false); | |
| 5886 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); | |
| 5887 } | |
| 5888 """ | |
| 5889 else: | |
| 5890 valid_test += """ | |
| 5891 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | |
| 5892 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | |
| 5893 EXPECT_TRUE(Get%(resource_type)s(kNewClientId) != NULL); | |
| 5894 } | 5849 } |
| 5895 """ | 5850 """ |
| 5896 | 5851 |
| 5897 gl_args_with_new_id = [] | 5852 gl_args_with_new_id = [] |
| 5898 args_with_new_id = [] | 5853 args_with_new_id = [] |
| 5899 for arg in func.GetOriginalArgs(): | 5854 for arg in func.GetOriginalArgs(): |
| 5900 if hasattr(arg, 'resource_type'): | 5855 if hasattr(arg, 'resource_type'): |
| 5901 gl_args_with_new_id.append('kNewServiceId') | 5856 gl_args_with_new_id.append('kNewServiceId') |
| 5902 args_with_new_id.append('kNewClientId') | 5857 args_with_new_id.append('kNewClientId') |
| 5903 else: | 5858 else: |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5961 code = """ | 5916 code = """ |
| 5962 TEST_F(GLES2ImplementationTest, %(name)s) { | 5917 TEST_F(GLES2ImplementationTest, %(name)s) { |
| 5963 struct Cmds { | 5918 struct Cmds { |
| 5964 cmds::%(name)s cmd; | 5919 cmds::%(name)s cmd; |
| 5965 }; | 5920 }; |
| 5966 Cmds expected; | 5921 Cmds expected; |
| 5967 expected.cmd.Init(%(cmd_args)s); | 5922 expected.cmd.Init(%(cmd_args)s); |
| 5968 | 5923 |
| 5969 gl_->%(name)s(%(args)s); | 5924 gl_->%(name)s(%(args)s); |
| 5970 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));""" | 5925 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));""" |
| 5971 if not func.IsUnsafe(): | 5926 if not func.IsES3(): |
| 5972 code += """ | 5927 code += """ |
| 5973 ClearCommands(); | 5928 ClearCommands(); |
| 5974 gl_->%(name)s(%(args)s); | 5929 gl_->%(name)s(%(args)s); |
| 5975 EXPECT_TRUE(NoCommandsWritten());""" | 5930 EXPECT_TRUE(NoCommandsWritten());""" |
| 5976 code += """ | 5931 code += """ |
| 5977 } | 5932 } |
| 5978 """ | 5933 """ |
| 5979 cmd_arg_strings = [ | 5934 cmd_arg_strings = [ |
| 5980 arg.GetValidClientSideCmdArg(func) for arg in func.GetCmdArgs() | 5935 arg.GetValidClientSideCmdArg(func) for arg in func.GetCmdArgs() |
| 5981 ] | 5936 ] |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6099 raise NotImplementedError("GENn functions are immediate") | 6054 raise NotImplementedError("GENn functions are immediate") |
| 6100 | 6055 |
| 6101 def WriteImmediateServiceUnitTest(self, func, f, *extras): | 6056 def WriteImmediateServiceUnitTest(self, func, f, *extras): |
| 6102 """Overrriden from TypeHandler.""" | 6057 """Overrriden from TypeHandler.""" |
| 6103 valid_test = """ | 6058 valid_test = """ |
| 6104 TEST_P(%(test_name)s, %(name)sValidArgs) { | 6059 TEST_P(%(test_name)s, %(name)sValidArgs) { |
| 6105 EXPECT_CALL(*gl_, %(gl_func_name)s(1, _)) | 6060 EXPECT_CALL(*gl_, %(gl_func_name)s(1, _)) |
| 6106 .WillOnce(SetArgumentPointee<1>(kNewServiceId)); | 6061 .WillOnce(SetArgumentPointee<1>(kNewServiceId)); |
| 6107 cmds::%(name)s* cmd = GetImmediateAs<cmds::%(name)s>(); | 6062 cmds::%(name)s* cmd = GetImmediateAs<cmds::%(name)s>(); |
| 6108 GLuint temp = kNewClientId; | 6063 GLuint temp = kNewClientId; |
| 6109 SpecializedSetup<cmds::%(name)s, 0>(true);""" | 6064 SpecializedSetup<cmds::%(name)s, 0>(true); |
| 6110 if func.IsUnsafe(): | |
| 6111 valid_test += """ | |
| 6112 decoder_->set_unsafe_es3_apis_enabled(true);""" | |
| 6113 valid_test += """ | |
| 6114 cmd->Init(1, &temp); | 6065 cmd->Init(1, &temp); |
| 6115 EXPECT_EQ(error::kNoError, | 6066 EXPECT_EQ(error::kNoError, |
| 6116 ExecuteImmediateCmd(*cmd, sizeof(temp))); | 6067 ExecuteImmediateCmd(*cmd, sizeof(temp))); |
| 6117 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 6068 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 6118 EXPECT_TRUE(Get%(resource_name)s(kNewClientId) != NULL); | 6069 EXPECT_TRUE(Get%(resource_name)s(kNewClientId) != NULL); |
| 6119 } | 6070 } |
| 6120 """ | 6071 """ |
| 6121 self.WriteValidUnitTest(func, f, valid_test, { | 6072 self.WriteValidUnitTest(func, f, valid_test, { |
| 6122 'resource_name': func.GetInfo('resource_type'), | 6073 'resource_name': func.GetInfo('resource_type'), |
| 6123 }, *extras) | 6074 }, *extras) |
| 6124 duplicate_id_test = """ | 6075 duplicate_id_test = """ |
| 6125 TEST_P(%(test_name)s, %(name)sDuplicateOrNullIds) { | 6076 TEST_P(%(test_name)s, %(name)sDuplicateOrNullIds) { |
| 6126 EXPECT_CALL(*gl_, %(gl_func_name)s(_, _)).Times(0); | 6077 EXPECT_CALL(*gl_, %(gl_func_name)s(_, _)).Times(0); |
| 6127 cmds::%(name)s* cmd = GetImmediateAs<cmds::%(name)s>(); | 6078 cmds::%(name)s* cmd = GetImmediateAs<cmds::%(name)s>(); |
| 6128 GLuint temp[3] = {kNewClientId, kNewClientId + 1, kNewClientId}; | 6079 GLuint temp[3] = {kNewClientId, kNewClientId + 1, kNewClientId}; |
| 6129 SpecializedSetup<cmds::%(name)s, 1>(true);""" | 6080 SpecializedSetup<cmds::%(name)s, 1>(true); |
| 6130 if func.IsUnsafe(): | |
| 6131 duplicate_id_test += """ | |
| 6132 decoder_->set_unsafe_es3_apis_enabled(true);""" | |
| 6133 duplicate_id_test += """ | |
| 6134 cmd->Init(3, temp); | 6081 cmd->Init(3, temp); |
| 6135 EXPECT_EQ(error::kInvalidArguments, | 6082 EXPECT_EQ(error::kInvalidArguments, |
| 6136 ExecuteImmediateCmd(*cmd, sizeof(temp))); | 6083 ExecuteImmediateCmd(*cmd, sizeof(temp))); |
| 6137 EXPECT_TRUE(Get%(resource_name)s(kNewClientId) == NULL); | 6084 EXPECT_TRUE(Get%(resource_name)s(kNewClientId) == NULL); |
| 6138 EXPECT_TRUE(Get%(resource_name)s(kNewClientId + 1) == NULL); | 6085 EXPECT_TRUE(Get%(resource_name)s(kNewClientId + 1) == NULL); |
| 6139 GLuint null_id[2] = {kNewClientId, 0}; | 6086 GLuint null_id[2] = {kNewClientId, 0}; |
| 6140 cmd->Init(2, null_id); | 6087 cmd->Init(2, null_id); |
| 6141 EXPECT_EQ(error::kInvalidArguments, | 6088 EXPECT_EQ(error::kInvalidArguments, |
| 6142 ExecuteImmediateCmd(*cmd, sizeof(temp))); | 6089 ExecuteImmediateCmd(*cmd, sizeof(temp))); |
| 6143 EXPECT_TRUE(Get%(resource_name)s(kNewClientId) == NULL); | 6090 EXPECT_TRUE(Get%(resource_name)s(kNewClientId) == NULL); |
| 6144 } | 6091 } |
| 6145 """ | 6092 """ |
| 6146 self.WriteValidUnitTest(func, f, duplicate_id_test, { | 6093 self.WriteValidUnitTest(func, f, duplicate_id_test, { |
| 6147 'resource_name': func.GetInfo('resource_type'), | 6094 'resource_name': func.GetInfo('resource_type'), |
| 6148 }, *extras) | 6095 }, *extras) |
| 6149 invalid_test = """ | 6096 invalid_test = """ |
| 6150 TEST_P(%(test_name)s, %(name)sInvalidArgs) { | 6097 TEST_P(%(test_name)s, %(name)sInvalidArgs) { |
| 6151 EXPECT_CALL(*gl_, %(gl_func_name)s(_, _)).Times(0); | 6098 EXPECT_CALL(*gl_, %(gl_func_name)s(_, _)).Times(0); |
| 6152 cmds::%(name)s* cmd = GetImmediateAs<cmds::%(name)s>(); | 6099 cmds::%(name)s* cmd = GetImmediateAs<cmds::%(name)s>(); |
| 6153 SpecializedSetup<cmds::%(name)s, 0>(false); | 6100 SpecializedSetup<cmds::%(name)s, 0>(false); |
| 6154 cmd->Init(1, &client_%(resource_name)s_id_);""" | 6101 cmd->Init(1, &client_%(resource_name)s_id_); |
| 6155 if func.IsUnsafe(): | |
| 6156 invalid_test += """ | |
| 6157 decoder_->set_unsafe_es3_apis_enabled(true); | |
| 6158 EXPECT_EQ(error::kInvalidArguments, | |
| 6159 ExecuteImmediateCmd(*cmd, sizeof(&client_%(resource_name)s_id_))); | |
| 6160 decoder_->set_unsafe_es3_apis_enabled(false); | |
| 6161 } | |
| 6162 """ | |
| 6163 else: | |
| 6164 invalid_test += """ | |
| 6165 EXPECT_EQ(error::kInvalidArguments, | 6102 EXPECT_EQ(error::kInvalidArguments, |
| 6166 ExecuteImmediateCmd(*cmd, sizeof(&client_%(resource_name)s_id_))); | 6103 ExecuteImmediateCmd(*cmd, sizeof(&client_%(resource_name)s_id_))); |
| 6167 } | 6104 } |
| 6168 """ | 6105 """ |
| 6169 self.WriteValidUnitTest(func, f, invalid_test, { | 6106 self.WriteValidUnitTest(func, f, invalid_test, { |
| 6170 'resource_name': func.GetInfo('resource_type').lower(), | 6107 'resource_name': func.GetInfo('resource_type').lower(), |
| 6171 }, *extras) | 6108 }, *extras) |
| 6172 | 6109 |
| 6173 def WriteImmediateCmdComputeSize(self, func, f): | 6110 def WriteImmediateCmdComputeSize(self, func, f): |
| 6174 """Overrriden from TypeHandler.""" | 6111 """Overrriden from TypeHandler.""" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6276 return func.name[6:] # Create* | 6213 return func.name[6:] # Create* |
| 6277 | 6214 |
| 6278 def WriteServiceUnitTest(self, func, f, *extras): | 6215 def WriteServiceUnitTest(self, func, f, *extras): |
| 6279 """Overrriden from TypeHandler.""" | 6216 """Overrriden from TypeHandler.""" |
| 6280 valid_test = """ | 6217 valid_test = """ |
| 6281 TEST_P(%(test_name)s, %(name)sValidArgs) { | 6218 TEST_P(%(test_name)s, %(name)sValidArgs) { |
| 6282 %(id_type_cast)sEXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)) | 6219 %(id_type_cast)sEXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)) |
| 6283 .WillOnce(Return(%(const_service_id)s)); | 6220 .WillOnce(Return(%(const_service_id)s)); |
| 6284 SpecializedSetup<cmds::%(name)s, 0>(true); | 6221 SpecializedSetup<cmds::%(name)s, 0>(true); |
| 6285 cmds::%(name)s cmd; | 6222 cmds::%(name)s cmd; |
| 6286 cmd.Init(%(args)s%(comma)skNewClientId);""" | 6223 cmd.Init(%(args)s%(comma)skNewClientId); |
| 6287 if func.IsUnsafe(): | |
| 6288 valid_test += """ | |
| 6289 decoder_->set_unsafe_es3_apis_enabled(true);""" | |
| 6290 valid_test += """ | |
| 6291 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 6224 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 6292 EXPECT_EQ(GL_NO_ERROR, GetGLError());""" | 6225 EXPECT_EQ(GL_NO_ERROR, GetGLError());""" |
| 6293 if func.IsUnsafe(): | 6226 if func.IsES3(): |
| 6294 valid_test += """ | 6227 valid_test += """ |
| 6295 %(return_type)s service_id = 0; | 6228 %(return_type)s service_id = 0; |
| 6296 EXPECT_TRUE(Get%(resource_type)sServiceId(kNewClientId, &service_id)); | 6229 EXPECT_TRUE(Get%(resource_type)sServiceId(kNewClientId, &service_id)); |
| 6297 EXPECT_EQ(%(const_service_id)s, service_id); | 6230 EXPECT_EQ(%(const_service_id)s, service_id); |
| 6298 decoder_->set_unsafe_es3_apis_enabled(false); | |
| 6299 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); | |
| 6300 } | 6231 } |
| 6301 """ | 6232 """ |
| 6302 else: | 6233 else: |
| 6303 valid_test += """ | 6234 valid_test += """ |
| 6304 EXPECT_TRUE(Get%(resource_type)s(kNewClientId)); | 6235 EXPECT_TRUE(Get%(resource_type)s(kNewClientId)); |
| 6305 } | 6236 } |
| 6306 """ | 6237 """ |
| 6307 comma = "" | 6238 comma = "" |
| 6308 cmd_arg_count = 0 | 6239 cmd_arg_count = 0 |
| 6309 for arg in func.GetOriginalArgs(): | 6240 for arg in func.GetOriginalArgs(): |
| (...skipping 23 matching lines...) Expand all Loading... |
| 6333 cmd.Init(%(args)s%(comma)skNewClientId); | 6264 cmd.Init(%(args)s%(comma)skNewClientId); |
| 6334 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));%(gl_error_test)s | 6265 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));%(gl_error_test)s |
| 6335 } | 6266 } |
| 6336 """ | 6267 """ |
| 6337 self.WriteInvalidUnitTest(func, f, invalid_test, { | 6268 self.WriteInvalidUnitTest(func, f, invalid_test, { |
| 6338 'comma': comma, | 6269 'comma': comma, |
| 6339 }, *extras) | 6270 }, *extras) |
| 6340 | 6271 |
| 6341 def WriteHandlerImplementation (self, func, f): | 6272 def WriteHandlerImplementation (self, func, f): |
| 6342 """Overrriden from TypeHandler.""" | 6273 """Overrriden from TypeHandler.""" |
| 6343 if func.IsUnsafe(): | 6274 if func.IsES3(): |
| 6344 code = """ uint32_t client_id = c.client_id; | 6275 code = """ uint32_t client_id = c.client_id; |
| 6345 %(return_type)s service_id = 0; | 6276 %(return_type)s service_id = 0; |
| 6346 if (group_->Get%(resource_name)sServiceId(client_id, &service_id)) { | 6277 if (group_->Get%(resource_name)sServiceId(client_id, &service_id)) { |
| 6347 return error::kInvalidArguments; | 6278 return error::kInvalidArguments; |
| 6348 } | 6279 } |
| 6349 service_id = %(gl_func_name)s(%(gl_args)s); | 6280 service_id = %(gl_func_name)s(%(gl_args)s); |
| 6350 if (service_id) { | 6281 if (service_id) { |
| 6351 group_->Add%(resource_name)sId(client_id, service_id); | 6282 group_->Add%(resource_name)sId(client_id, service_id); |
| 6352 } | 6283 } |
| 6353 """ | 6284 """ |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6399 | 6330 |
| 6400 def WritePassthroughServiceImplementation(self, func, f): | 6331 def WritePassthroughServiceImplementation(self, func, f): |
| 6401 """Overrriden from TypeHandler.""" | 6332 """Overrriden from TypeHandler.""" |
| 6402 pass | 6333 pass |
| 6403 | 6334 |
| 6404 class DeleteHandler(TypeHandler): | 6335 class DeleteHandler(TypeHandler): |
| 6405 """Handler for glDelete___ single resource type functions.""" | 6336 """Handler for glDelete___ single resource type functions.""" |
| 6406 | 6337 |
| 6407 def WriteServiceImplementation(self, func, f): | 6338 def WriteServiceImplementation(self, func, f): |
| 6408 """Overrriden from TypeHandler.""" | 6339 """Overrriden from TypeHandler.""" |
| 6409 if func.IsUnsafe(): | 6340 if func.IsES3(): |
| 6410 TypeHandler.WriteServiceImplementation(self, func, f) | 6341 TypeHandler.WriteServiceImplementation(self, func, f) |
| 6411 # HandleDeleteShader and HandleDeleteProgram are manually written. | 6342 # HandleDeleteShader and HandleDeleteProgram are manually written. |
| 6412 pass | 6343 pass |
| 6413 | 6344 |
| 6414 def WriteGLES2Implementation(self, func, f): | 6345 def WriteGLES2Implementation(self, func, f): |
| 6415 """Overrriden from TypeHandler.""" | 6346 """Overrriden from TypeHandler.""" |
| 6416 f.write("%s GLES2Implementation::%s(%s) {\n" % | 6347 f.write("%s GLES2Implementation::%s(%s) {\n" % |
| 6417 (func.return_type, func.original_name, | 6348 (func.return_type, func.original_name, |
| 6418 func.MakeTypedOriginalArgString(""))) | 6349 func.MakeTypedOriginalArgString(""))) |
| 6419 f.write(" GPU_CLIENT_SINGLE_THREAD_CHECK();\n") | 6350 f.write(" GPU_CLIENT_SINGLE_THREAD_CHECK();\n") |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6505 def WriteImmediateServiceUnitTest(self, func, f, *extras): | 6436 def WriteImmediateServiceUnitTest(self, func, f, *extras): |
| 6506 """Overrriden from TypeHandler.""" | 6437 """Overrriden from TypeHandler.""" |
| 6507 valid_test = """ | 6438 valid_test = """ |
| 6508 TEST_P(%(test_name)s, %(name)sValidArgs) { | 6439 TEST_P(%(test_name)s, %(name)sValidArgs) { |
| 6509 EXPECT_CALL( | 6440 EXPECT_CALL( |
| 6510 *gl_, | 6441 *gl_, |
| 6511 %(gl_func_name)s(1, Pointee(kService%(upper_resource_name)sId))) | 6442 %(gl_func_name)s(1, Pointee(kService%(upper_resource_name)sId))) |
| 6512 .Times(1); | 6443 .Times(1); |
| 6513 cmds::%(name)s& cmd = *GetImmediateAs<cmds::%(name)s>(); | 6444 cmds::%(name)s& cmd = *GetImmediateAs<cmds::%(name)s>(); |
| 6514 SpecializedSetup<cmds::%(name)s, 0>(true); | 6445 SpecializedSetup<cmds::%(name)s, 0>(true); |
| 6515 cmd.Init(1, &client_%(resource_name)s_id_);""" | 6446 cmd.Init(1, &client_%(resource_name)s_id_); |
| 6516 if func.IsUnsafe(): | |
| 6517 valid_test += """ | |
| 6518 decoder_->set_unsafe_es3_apis_enabled(true);""" | |
| 6519 valid_test += """ | |
| 6520 EXPECT_EQ(error::kNoError, | 6447 EXPECT_EQ(error::kNoError, |
| 6521 ExecuteImmediateCmd(cmd, sizeof(client_%(resource_name)s_id_))); | 6448 ExecuteImmediateCmd(cmd, sizeof(client_%(resource_name)s_id_))); |
| 6522 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 6449 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 6523 EXPECT_TRUE( | 6450 EXPECT_TRUE( |
| 6524 Get%(upper_resource_name)s(client_%(resource_name)s_id_) == NULL); | 6451 Get%(upper_resource_name)s(client_%(resource_name)s_id_) == NULL); |
| 6525 } | 6452 } |
| 6526 """ | 6453 """ |
| 6527 self.WriteValidUnitTest(func, f, valid_test, { | 6454 self.WriteValidUnitTest(func, f, valid_test, { |
| 6528 'resource_name': func.GetInfo('resource_type').lower(), | 6455 'resource_name': func.GetInfo('resource_type').lower(), |
| 6529 'upper_resource_name': func.GetInfo('resource_type'), | 6456 'upper_resource_name': func.GetInfo('resource_type'), |
| 6530 }, *extras) | 6457 }, *extras) |
| 6531 invalid_test = """ | 6458 invalid_test = """ |
| 6532 TEST_P(%(test_name)s, %(name)sInvalidArgs) { | 6459 TEST_P(%(test_name)s, %(name)sInvalidArgs) { |
| 6533 cmds::%(name)s& cmd = *GetImmediateAs<cmds::%(name)s>(); | 6460 cmds::%(name)s& cmd = *GetImmediateAs<cmds::%(name)s>(); |
| 6534 SpecializedSetup<cmds::%(name)s, 0>(false); | 6461 SpecializedSetup<cmds::%(name)s, 0>(false); |
| 6535 GLuint temp = kInvalidClientId; | 6462 GLuint temp = kInvalidClientId; |
| 6536 cmd.Init(1, &temp);""" | 6463 cmd.Init(1, &temp); |
| 6537 if func.IsUnsafe(): | |
| 6538 invalid_test += """ | |
| 6539 decoder_->set_unsafe_es3_apis_enabled(true); | |
| 6540 EXPECT_EQ(error::kNoError, | |
| 6541 ExecuteImmediateCmd(cmd, sizeof(temp))); | |
| 6542 decoder_->set_unsafe_es3_apis_enabled(false); | |
| 6543 EXPECT_EQ(error::kUnknownCommand, | |
| 6544 ExecuteImmediateCmd(cmd, sizeof(temp))); | |
| 6545 } | |
| 6546 """ | |
| 6547 else: | |
| 6548 invalid_test += """ | |
| 6549 EXPECT_EQ(error::kNoError, | 6464 EXPECT_EQ(error::kNoError, |
| 6550 ExecuteImmediateCmd(cmd, sizeof(temp))); | 6465 ExecuteImmediateCmd(cmd, sizeof(temp))); |
| 6551 } | 6466 } |
| 6552 """ | 6467 """ |
| 6553 self.WriteValidUnitTest(func, f, invalid_test, *extras) | 6468 self.WriteValidUnitTest(func, f, invalid_test, *extras) |
| 6554 | 6469 |
| 6555 def WriteHandlerImplementation (self, func, f): | 6470 def WriteHandlerImplementation (self, func, f): |
| 6556 """Overrriden from TypeHandler.""" | 6471 """Overrriden from TypeHandler.""" |
| 6557 f.write(" %sHelper(n, %s);\n" % | 6472 f.write(" %sHelper(n, %s);\n" % |
| 6558 (func.name, func.GetLastOriginalArg().name)) | 6473 (func.name, func.GetLastOriginalArg().name)) |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6916 valid_test = """ | 6831 valid_test = """ |
| 6917 TEST_P(%(test_name)s, %(name)sValidArgs) { | 6832 TEST_P(%(test_name)s, %(name)sValidArgs) { |
| 6918 EXPECT_CALL(*gl_, GetError()) | 6833 EXPECT_CALL(*gl_, GetError()) |
| 6919 .WillRepeatedly(Return(GL_NO_ERROR)); | 6834 .WillRepeatedly(Return(GL_NO_ERROR)); |
| 6920 SpecializedSetup<cmds::%(name)s, 0>(true); | 6835 SpecializedSetup<cmds::%(name)s, 0>(true); |
| 6921 typedef cmds::%(name)s::Result Result; | 6836 typedef cmds::%(name)s::Result Result; |
| 6922 Result* result = static_cast<Result*>(shared_memory_address_); | 6837 Result* result = static_cast<Result*>(shared_memory_address_); |
| 6923 EXPECT_CALL(*gl_, %(gl_func_name)s(%(local_gl_args)s)); | 6838 EXPECT_CALL(*gl_, %(gl_func_name)s(%(local_gl_args)s)); |
| 6924 result->size = 0; | 6839 result->size = 0; |
| 6925 cmds::%(name)s cmd; | 6840 cmds::%(name)s cmd; |
| 6926 cmd.Init(%(cmd_args)s);""" | 6841 cmd.Init(%(cmd_args)s); |
| 6927 if func.IsUnsafe(): | |
| 6928 valid_test += """ | |
| 6929 decoder_->set_unsafe_es3_apis_enabled(true);""" | |
| 6930 valid_test += """ | |
| 6931 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 6842 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 6932 EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( | 6843 EXPECT_EQ(decoder_->GetGLES2Util()->GLGetNumValuesReturned( |
| 6933 %(valid_pname)s), | 6844 %(valid_pname)s), |
| 6934 result->GetNumResults()); | 6845 result->GetNumResults()); |
| 6935 EXPECT_EQ(GL_NO_ERROR, GetGLError());""" | 6846 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 6936 if func.IsUnsafe(): | |
| 6937 valid_test += """ | |
| 6938 decoder_->set_unsafe_es3_apis_enabled(false); | |
| 6939 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd));""" | |
| 6940 valid_test += """ | |
| 6941 } | 6847 } |
| 6942 """ | 6848 """ |
| 6943 gl_arg_strings = [] | 6849 gl_arg_strings = [] |
| 6944 cmd_arg_strings = [] | 6850 cmd_arg_strings = [] |
| 6945 valid_pname = '' | 6851 valid_pname = '' |
| 6946 for arg in func.GetOriginalArgs()[:-1]: | 6852 for arg in func.GetOriginalArgs()[:-1]: |
| 6947 if arg.name == 'length': | 6853 if arg.name == 'length': |
| 6948 gl_arg_value = 'nullptr' | 6854 gl_arg_value = 'nullptr' |
| 6949 elif arg.name.endswith('size'): | 6855 elif arg.name.endswith('size'): |
| 6950 gl_arg_value = ("decoder_->GetGLES2Util()->GLGetNumValuesReturned(%s)" % | 6856 gl_arg_value = ("decoder_->GetGLES2Util()->GLGetNumValuesReturned(%s)" % |
| (...skipping 18 matching lines...) Expand all Loading... |
| 6969 gl_arg_strings.append("result->GetData()") | 6875 gl_arg_strings.append("result->GetData()") |
| 6970 cmd_arg_strings.append("shared_memory_id_") | 6876 cmd_arg_strings.append("shared_memory_id_") |
| 6971 cmd_arg_strings.append("shared_memory_offset_") | 6877 cmd_arg_strings.append("shared_memory_offset_") |
| 6972 | 6878 |
| 6973 self.WriteValidUnitTest(func, f, valid_test, { | 6879 self.WriteValidUnitTest(func, f, valid_test, { |
| 6974 'local_gl_args': ", ".join(gl_arg_strings), | 6880 'local_gl_args': ", ".join(gl_arg_strings), |
| 6975 'cmd_args': ", ".join(cmd_arg_strings), | 6881 'cmd_args': ", ".join(cmd_arg_strings), |
| 6976 'valid_pname': valid_pname, | 6882 'valid_pname': valid_pname, |
| 6977 }, *extras) | 6883 }, *extras) |
| 6978 | 6884 |
| 6979 if not func.IsUnsafe(): | 6885 if not func.IsES3(): |
| 6980 invalid_test = """ | 6886 invalid_test = """ |
| 6981 TEST_P(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) { | 6887 TEST_P(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) { |
| 6982 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)).Times(0); | 6888 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)).Times(0); |
| 6983 SpecializedSetup<cmds::%(name)s, 0>(false); | 6889 SpecializedSetup<cmds::%(name)s, 0>(false); |
| 6984 cmds::%(name)s::Result* result = | 6890 cmds::%(name)s::Result* result = |
| 6985 static_cast<cmds::%(name)s::Result*>(shared_memory_address_); | 6891 static_cast<cmds::%(name)s::Result*>(shared_memory_address_); |
| 6986 result->size = 0; | 6892 result->size = 0; |
| 6987 cmds::%(name)s cmd; | 6893 cmds::%(name)s cmd; |
| 6988 cmd.Init(%(args)s); | 6894 cmd.Init(%(args)s); |
| 6989 EXPECT_EQ(error::%(parse_result)s, ExecuteCmd(cmd)); | 6895 EXPECT_EQ(error::%(parse_result)s, ExecuteCmd(cmd)); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7059 def WriteImmediateServiceUnitTest(self, func, f, *extras): | 6965 def WriteImmediateServiceUnitTest(self, func, f, *extras): |
| 7060 """Writes the service unit test for a command.""" | 6966 """Writes the service unit test for a command.""" |
| 7061 valid_test = """ | 6967 valid_test = """ |
| 7062 TEST_P(%(test_name)s, %(name)sValidArgs) { | 6968 TEST_P(%(test_name)s, %(name)sValidArgs) { |
| 7063 cmds::%(name)s& cmd = *GetImmediateAs<cmds::%(name)s>(); | 6969 cmds::%(name)s& cmd = *GetImmediateAs<cmds::%(name)s>(); |
| 7064 SpecializedSetup<cmds::%(name)s, 0>(true); | 6970 SpecializedSetup<cmds::%(name)s, 0>(true); |
| 7065 %(data_type)s temp[%(data_count)s] = { %(data_value)s, }; | 6971 %(data_type)s temp[%(data_count)s] = { %(data_value)s, }; |
| 7066 cmd.Init(%(gl_client_args)s, &temp[0]); | 6972 cmd.Init(%(gl_client_args)s, &temp[0]); |
| 7067 EXPECT_CALL( | 6973 EXPECT_CALL( |
| 7068 *gl_, | 6974 *gl_, |
| 7069 %(gl_func_name)s(%(gl_args)s, %(expectation)s));""" | 6975 %(gl_func_name)s(%(gl_args)s, %(expectation)s)); |
| 7070 if func.IsUnsafe(): | |
| 7071 valid_test += """ | |
| 7072 decoder_->set_unsafe_es3_apis_enabled(true);""" | |
| 7073 valid_test += """ | |
| 7074 EXPECT_EQ(error::kNoError, | 6976 EXPECT_EQ(error::kNoError, |
| 7075 ExecuteImmediateCmd(cmd, sizeof(temp))); | 6977 ExecuteImmediateCmd(cmd, sizeof(temp))); |
| 7076 EXPECT_EQ(GL_NO_ERROR, GetGLError());""" | 6978 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 7077 if func.IsUnsafe(): | |
| 7078 valid_test += """ | |
| 7079 decoder_->set_unsafe_es3_apis_enabled(false); | |
| 7080 EXPECT_EQ(error::kUnknownCommand, | |
| 7081 ExecuteImmediateCmd(cmd, sizeof(temp)));""" | |
| 7082 valid_test += """ | |
| 7083 } | 6979 } |
| 7084 """ | 6980 """ |
| 7085 gl_client_arg_strings = [ | 6981 gl_client_arg_strings = [ |
| 7086 arg.GetValidArg(func) for arg in func.GetOriginalArgs()[0:-1] | 6982 arg.GetValidArg(func) for arg in func.GetOriginalArgs()[0:-1] |
| 7087 ] | 6983 ] |
| 7088 gl_arg_strings = [ | 6984 gl_arg_strings = [ |
| 7089 arg.GetValidGLArg(func) for arg in func.GetOriginalArgs()[0:-1] | 6985 arg.GetValidGLArg(func) for arg in func.GetOriginalArgs()[0:-1] |
| 7090 ] | 6986 ] |
| 7091 gl_any_strings = ["_"] * len(gl_arg_strings) | 6987 gl_any_strings = ["_"] * len(gl_arg_strings) |
| 7092 data_count = self.GetArrayCount(func) | 6988 data_count = self.GetArrayCount(func) |
| 7093 if func.GetInfo('first_element_only'): | 6989 if func.GetInfo('first_element_only'): |
| 7094 expectation = "temp[0]" | 6990 expectation = "temp[0]" |
| 7095 else: | 6991 else: |
| 7096 expectation = "PointsToArray(temp, %s)" % data_count | 6992 expectation = "PointsToArray(temp, %s)" % data_count |
| 7097 | 6993 |
| 7098 extra = { | 6994 extra = { |
| 7099 'expectation': expectation, | 6995 'expectation': expectation, |
| 7100 'data_type': self.GetArrayType(func), | 6996 'data_type': self.GetArrayType(func), |
| 7101 'data_count': data_count, | 6997 'data_count': data_count, |
| 7102 'data_value': func.GetInfo('data_value') or '0', | 6998 'data_value': func.GetInfo('data_value') or '0', |
| 7103 'gl_client_args': ", ".join(gl_client_arg_strings), | 6999 'gl_client_args': ", ".join(gl_client_arg_strings), |
| 7104 'gl_args': ", ".join(gl_arg_strings), | 7000 'gl_args': ", ".join(gl_arg_strings), |
| 7105 'gl_any_args': ", ".join(gl_any_strings), | 7001 'gl_any_args': ", ".join(gl_any_strings), |
| 7106 } | 7002 } |
| 7107 self.WriteValidUnitTest(func, f, valid_test, extra, *extras) | 7003 self.WriteValidUnitTest(func, f, valid_test, extra, *extras) |
| 7108 | 7004 |
| 7109 invalid_test = """ | 7005 invalid_test = """ |
| 7110 TEST_P(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) { | 7006 TEST_P(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) { |
| 7111 cmds::%(name)s& cmd = *GetImmediateAs<cmds::%(name)s>();""" | 7007 cmds::%(name)s& cmd = *GetImmediateAs<cmds::%(name)s>();""" |
| 7112 if func.IsUnsafe(): | 7008 if func.IsES3(): |
| 7113 invalid_test += """ | 7009 invalid_test += """ |
| 7114 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_any_args)s, _)).Times(1); | 7010 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_any_args)s, _)).Times(1); |
| 7115 """ | 7011 """ |
| 7116 else: | 7012 else: |
| 7117 invalid_test += """ | 7013 invalid_test += """ |
| 7118 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_any_args)s, _)).Times(0); | 7014 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_any_args)s, _)).Times(0); |
| 7119 """ | 7015 """ |
| 7120 invalid_test += """ | 7016 invalid_test += """ |
| 7121 SpecializedSetup<cmds::%(name)s, 0>(false); | 7017 SpecializedSetup<cmds::%(name)s, 0>(false); |
| 7122 %(data_type)s temp[%(data_count)s] = { %(data_value)s, }; | 7018 %(data_type)s temp[%(data_count)s] = { %(data_value)s, }; |
| 7123 cmd.Init(%(all_but_last_args)s, &temp[0]);""" | 7019 cmd.Init(%(all_but_last_args)s, &temp[0]); |
| 7124 if func.IsUnsafe(): | |
| 7125 invalid_test += """ | |
| 7126 decoder_->set_unsafe_es3_apis_enabled(true); | |
| 7127 EXPECT_EQ(error::%(parse_result)s, | |
| 7128 ExecuteImmediateCmd(cmd, sizeof(temp))); | |
| 7129 decoder_->set_unsafe_es3_apis_enabled(false); | |
| 7130 } | |
| 7131 """ | |
| 7132 else: | |
| 7133 invalid_test += """ | |
| 7134 EXPECT_EQ(error::%(parse_result)s, | 7020 EXPECT_EQ(error::%(parse_result)s, |
| 7135 ExecuteImmediateCmd(cmd, sizeof(temp))); | 7021 ExecuteImmediateCmd(cmd, sizeof(temp))); |
| 7136 %(gl_error_test)s | 7022 %(gl_error_test)s |
| 7137 } | 7023 } |
| 7138 """ | 7024 """ |
| 7139 self.WriteInvalidUnitTest(func, f, invalid_test, extra, *extras) | 7025 self.WriteInvalidUnitTest(func, f, invalid_test, extra, *extras) |
| 7140 | 7026 |
| 7141 def WriteGetDataSizeCode(self, func, f): | 7027 def WriteGetDataSizeCode(self, func, f): |
| 7142 """Overrriden from TypeHandler.""" | 7028 """Overrriden from TypeHandler.""" |
| 7143 code = """ uint32_t data_size; | 7029 code = """ uint32_t data_size; |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7392 """Overridden from TypeHandler.""" | 7278 """Overridden from TypeHandler.""" |
| 7393 valid_test = """ | 7279 valid_test = """ |
| 7394 TEST_P(%(test_name)s, %(name)sValidArgs) { | 7280 TEST_P(%(test_name)s, %(name)sValidArgs) { |
| 7395 cmds::%(name)s& cmd = *GetImmediateAs<cmds::%(name)s>(); | 7281 cmds::%(name)s& cmd = *GetImmediateAs<cmds::%(name)s>(); |
| 7396 SpecializedSetup<cmds::%(name)s, 0>(true); | 7282 SpecializedSetup<cmds::%(name)s, 0>(true); |
| 7397 %(data_type)s temp[%(data_count)s * 2] = { 0, }; | 7283 %(data_type)s temp[%(data_count)s * 2] = { 0, }; |
| 7398 EXPECT_CALL( | 7284 EXPECT_CALL( |
| 7399 *gl_, | 7285 *gl_, |
| 7400 %(gl_func_name)s(%(gl_args)s, | 7286 %(gl_func_name)s(%(gl_args)s, |
| 7401 PointsToArray(temp, %(data_count)s))); | 7287 PointsToArray(temp, %(data_count)s))); |
| 7402 cmd.Init(%(args)s, &temp[0]);""" | 7288 cmd.Init(%(args)s, &temp[0]); |
| 7403 if func.IsUnsafe(): | |
| 7404 valid_test += """ | |
| 7405 decoder_->set_unsafe_es3_apis_enabled(true);""" | |
| 7406 valid_test += """ | |
| 7407 EXPECT_EQ(error::kNoError, | 7289 EXPECT_EQ(error::kNoError, |
| 7408 ExecuteImmediateCmd(cmd, sizeof(temp))); | 7290 ExecuteImmediateCmd(cmd, sizeof(temp))); |
| 7409 EXPECT_EQ(GL_NO_ERROR, GetGLError());""" | 7291 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 7410 if func.IsUnsafe(): | |
| 7411 valid_test += """ | |
| 7412 decoder_->set_unsafe_es3_apis_enabled(false); | |
| 7413 EXPECT_EQ(error::kUnknownCommand, | |
| 7414 ExecuteImmediateCmd(cmd, sizeof(temp)));""" | |
| 7415 valid_test += """ | |
| 7416 } | 7292 } |
| 7417 """ | 7293 """ |
| 7418 gl_arg_strings = [] | 7294 gl_arg_strings = [] |
| 7419 gl_any_strings = [] | 7295 gl_any_strings = [] |
| 7420 arg_strings = [] | 7296 arg_strings = [] |
| 7421 for arg in func.GetOriginalArgs()[0:-1]: | 7297 for arg in func.GetOriginalArgs()[0:-1]: |
| 7422 gl_arg_strings.append(arg.GetValidGLArg(func)) | 7298 gl_arg_strings.append(arg.GetValidGLArg(func)) |
| 7423 gl_any_strings.append("_") | 7299 gl_any_strings.append("_") |
| 7424 if not arg.IsConstant(): | 7300 if not arg.IsConstant(): |
| 7425 arg_strings.append(arg.GetValidArg(func)) | 7301 arg_strings.append(arg.GetValidArg(func)) |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7928 test = """ | 7804 test = """ |
| 7929 TEST_P(%(test_name)s, %(name)sValidArgs) { | 7805 TEST_P(%(test_name)s, %(name)sValidArgs) { |
| 7930 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)); | 7806 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)); |
| 7931 const uint32_t kBucketId = 123; | 7807 const uint32_t kBucketId = 123; |
| 7932 const char kSource0[] = "hello"; | 7808 const char kSource0[] = "hello"; |
| 7933 const char* kSource[] = { kSource0 }; | 7809 const char* kSource[] = { kSource0 }; |
| 7934 const char kValidStrEnd = 0; | 7810 const char kValidStrEnd = 0; |
| 7935 SetBucketAsCStrings(kBucketId, 1, kSource, 1, kValidStrEnd); | 7811 SetBucketAsCStrings(kBucketId, 1, kSource, 1, kValidStrEnd); |
| 7936 cmds::%(name)s cmd; | 7812 cmds::%(name)s cmd; |
| 7937 cmd.Init(%(cmd_args)s); | 7813 cmd.Init(%(cmd_args)s); |
| 7938 decoder_->set_unsafe_es3_apis_enabled(true); | |
| 7939 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));""" | 7814 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));""" |
| 7940 if func.IsUnsafe(): | |
| 7941 test += """ | |
| 7942 decoder_->set_unsafe_es3_apis_enabled(false); | |
| 7943 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd)); | |
| 7944 """ | |
| 7945 test += """ | 7815 test += """ |
| 7946 } | 7816 } |
| 7947 """ | 7817 """ |
| 7948 self.WriteValidUnitTest(func, f, test, { | 7818 self.WriteValidUnitTest(func, f, test, { |
| 7949 'cmd_args': ", ".join(cmd_args), | 7819 'cmd_args': ", ".join(cmd_args), |
| 7950 'gl_args': ", ".join(gl_args), | 7820 'gl_args': ", ".join(gl_args), |
| 7951 }, *extras) | 7821 }, *extras) |
| 7952 | 7822 |
| 7953 test = """ | 7823 test = """ |
| 7954 TEST_P(%(test_name)s, %(name)sInvalidArgs) { | 7824 TEST_P(%(test_name)s, %(name)sInvalidArgs) { |
| 7955 const uint32_t kBucketId = 123; | 7825 const uint32_t kBucketId = 123; |
| 7956 const char kSource0[] = "hello"; | 7826 const char kSource0[] = "hello"; |
| 7957 const char* kSource[] = { kSource0 }; | 7827 const char* kSource[] = { kSource0 }; |
| 7958 const char kValidStrEnd = 0; | 7828 const char kValidStrEnd = 0; |
| 7959 decoder_->set_unsafe_es3_apis_enabled(true); | |
| 7960 cmds::%(name)s cmd; | 7829 cmds::%(name)s cmd; |
| 7961 // Test no bucket. | 7830 // Test no bucket. |
| 7962 cmd.Init(%(cmd_args)s); | 7831 cmd.Init(%(cmd_args)s); |
| 7963 EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); | 7832 EXPECT_NE(error::kNoError, ExecuteCmd(cmd)); |
| 7964 // Test invalid client. | 7833 // Test invalid client. |
| 7965 SetBucketAsCStrings(kBucketId, 1, kSource, 1, kValidStrEnd); | 7834 SetBucketAsCStrings(kBucketId, 1, kSource, 1, kValidStrEnd); |
| 7966 cmd.Init(%(cmd_args_with_invalid_id)s); | 7835 cmd.Init(%(cmd_args_with_invalid_id)s); |
| 7967 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 7836 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 7968 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); | 7837 EXPECT_EQ(GL_INVALID_VALUE, GetGLError()); |
| 7969 } | 7838 } |
| 7970 """ | 7839 """ |
| 7971 self.WriteValidUnitTest(func, f, test, { | 7840 self.WriteValidUnitTest(func, f, test, { |
| 7972 'cmd_args': ", ".join(cmd_args), | 7841 'cmd_args': ", ".join(cmd_args), |
| 7973 'cmd_args_with_invalid_id': ", ".join(cmd_args_with_invalid_id), | 7842 'cmd_args_with_invalid_id': ", ".join(cmd_args_with_invalid_id), |
| 7974 }, *extras) | 7843 }, *extras) |
| 7975 | 7844 |
| 7976 test = """ | 7845 test = """ |
| 7977 TEST_P(%(test_name)s, %(name)sInvalidHeader) { | 7846 TEST_P(%(test_name)s, %(name)sInvalidHeader) { |
| 7978 const uint32_t kBucketId = 123; | 7847 const uint32_t kBucketId = 123; |
| 7979 const char kSource0[] = "hello"; | 7848 const char kSource0[] = "hello"; |
| 7980 const char* kSource[] = { kSource0 }; | 7849 const char* kSource[] = { kSource0 }; |
| 7981 const char kValidStrEnd = 0; | 7850 const char kValidStrEnd = 0; |
| 7982 const GLsizei kCount = static_cast<GLsizei>(arraysize(kSource)); | 7851 const GLsizei kCount = static_cast<GLsizei>(arraysize(kSource)); |
| 7983 const GLsizei kTests[] = { | 7852 const GLsizei kTests[] = { |
| 7984 kCount + 1, | 7853 kCount + 1, |
| 7985 0, | 7854 0, |
| 7986 std::numeric_limits<GLsizei>::max(), | 7855 std::numeric_limits<GLsizei>::max(), |
| 7987 -1, | 7856 -1, |
| 7988 }; | 7857 }; |
| 7989 decoder_->set_unsafe_es3_apis_enabled(true); | |
| 7990 for (size_t ii = 0; ii < arraysize(kTests); ++ii) { | 7858 for (size_t ii = 0; ii < arraysize(kTests); ++ii) { |
| 7991 SetBucketAsCStrings(kBucketId, 1, kSource, kTests[ii], kValidStrEnd); | 7859 SetBucketAsCStrings(kBucketId, 1, kSource, kTests[ii], kValidStrEnd); |
| 7992 cmds::%(name)s cmd; | 7860 cmds::%(name)s cmd; |
| 7993 cmd.Init(%(cmd_args)s); | 7861 cmd.Init(%(cmd_args)s); |
| 7994 EXPECT_EQ(error::kInvalidArguments, ExecuteCmd(cmd)); | 7862 EXPECT_EQ(error::kInvalidArguments, ExecuteCmd(cmd)); |
| 7995 } | 7863 } |
| 7996 } | 7864 } |
| 7997 """ | 7865 """ |
| 7998 self.WriteValidUnitTest(func, f, test, { | 7866 self.WriteValidUnitTest(func, f, test, { |
| 7999 'cmd_args': ", ".join(cmd_args), | 7867 'cmd_args': ", ".join(cmd_args), |
| 8000 }, *extras) | 7868 }, *extras) |
| 8001 | 7869 |
| 8002 test = """ | 7870 test = """ |
| 8003 TEST_P(%(test_name)s, %(name)sInvalidStringEnding) { | 7871 TEST_P(%(test_name)s, %(name)sInvalidStringEnding) { |
| 8004 const uint32_t kBucketId = 123; | 7872 const uint32_t kBucketId = 123; |
| 8005 const char kSource0[] = "hello"; | 7873 const char kSource0[] = "hello"; |
| 8006 const char* kSource[] = { kSource0 }; | 7874 const char* kSource[] = { kSource0 }; |
| 8007 const char kInvalidStrEnd = '*'; | 7875 const char kInvalidStrEnd = '*'; |
| 8008 SetBucketAsCStrings(kBucketId, 1, kSource, 1, kInvalidStrEnd); | 7876 SetBucketAsCStrings(kBucketId, 1, kSource, 1, kInvalidStrEnd); |
| 8009 cmds::%(name)s cmd; | 7877 cmds::%(name)s cmd; |
| 8010 cmd.Init(%(cmd_args)s); | 7878 cmd.Init(%(cmd_args)s); |
| 8011 decoder_->set_unsafe_es3_apis_enabled(true); | |
| 8012 EXPECT_EQ(error::kInvalidArguments, ExecuteCmd(cmd)); | 7879 EXPECT_EQ(error::kInvalidArguments, ExecuteCmd(cmd)); |
| 8013 } | 7880 } |
| 8014 """ | 7881 """ |
| 8015 self.WriteValidUnitTest(func, f, test, { | 7882 self.WriteValidUnitTest(func, f, test, { |
| 8016 'cmd_args': ", ".join(cmd_args), | 7883 'cmd_args': ", ".join(cmd_args), |
| 8017 }, *extras) | 7884 }, *extras) |
| 8018 | 7885 |
| 8019 | 7886 |
| 8020 class PUTXnHandler(ArrayArgTypeHandler): | 7887 class PUTXnHandler(ArrayArgTypeHandler): |
| 8021 """Handler for glUniform?f functions.""" | 7888 """Handler for glUniform?f functions.""" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 8041 'values': values, | 7908 'values': values, |
| 8042 }) | 7909 }) |
| 8043 | 7910 |
| 8044 def WriteServiceUnitTest(self, func, f, *extras): | 7911 def WriteServiceUnitTest(self, func, f, *extras): |
| 8045 """Overrriden from TypeHandler.""" | 7912 """Overrriden from TypeHandler.""" |
| 8046 valid_test = """ | 7913 valid_test = """ |
| 8047 TEST_P(%(test_name)s, %(name)sValidArgs) { | 7914 TEST_P(%(test_name)s, %(name)sValidArgs) { |
| 8048 EXPECT_CALL(*gl_, %(name)sv(%(local_args)s)); | 7915 EXPECT_CALL(*gl_, %(name)sv(%(local_args)s)); |
| 8049 SpecializedSetup<cmds::%(name)s, 0>(true); | 7916 SpecializedSetup<cmds::%(name)s, 0>(true); |
| 8050 cmds::%(name)s cmd; | 7917 cmds::%(name)s cmd; |
| 8051 cmd.Init(%(args)s);""" | 7918 cmd.Init(%(args)s); |
| 8052 if func.IsUnsafe(): | |
| 8053 valid_test += """ | |
| 8054 decoder_->set_unsafe_es3_apis_enabled(true);""" | |
| 8055 valid_test += """ | |
| 8056 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 7919 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 8057 EXPECT_EQ(GL_NO_ERROR, GetGLError());""" | 7920 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 8058 if func.IsUnsafe(): | |
| 8059 valid_test += """ | |
| 8060 decoder_->set_unsafe_es3_apis_enabled(false); | |
| 8061 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd));""" | |
| 8062 valid_test += """ | |
| 8063 } | 7921 } |
| 8064 """ | 7922 """ |
| 8065 args = func.GetOriginalArgs() | 7923 args = func.GetOriginalArgs() |
| 8066 local_args = "%s, 1, _" % args[0].GetValidGLArg(func) | 7924 local_args = "%s, 1, _" % args[0].GetValidGLArg(func) |
| 8067 self.WriteValidUnitTest(func, f, valid_test, { | 7925 self.WriteValidUnitTest(func, f, valid_test, { |
| 8068 'name': func.name, | 7926 'name': func.name, |
| 8069 'count': self.GetArrayCount(func), | 7927 'count': self.GetArrayCount(func), |
| 8070 'local_args': local_args, | 7928 'local_args': local_args, |
| 8071 }, *extras) | 7929 }, *extras) |
| 8072 | 7930 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8247 func.AddInfo('result', ['uint32_t']) | 8105 func.AddInfo('result', ['uint32_t']) |
| 8248 func.passthrough_service_doer_args.append(Argument('result', 'uint32_t*')) | 8106 func.passthrough_service_doer_args.append(Argument('result', 'uint32_t*')) |
| 8249 | 8107 |
| 8250 def WriteServiceUnitTest(self, func, f, *extras): | 8108 def WriteServiceUnitTest(self, func, f, *extras): |
| 8251 """Overrriden from TypeHandler.""" | 8109 """Overrriden from TypeHandler.""" |
| 8252 valid_test = """ | 8110 valid_test = """ |
| 8253 TEST_P(%(test_name)s, %(name)sValidArgs) { | 8111 TEST_P(%(test_name)s, %(name)sValidArgs) { |
| 8254 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)); | 8112 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)); |
| 8255 SpecializedSetup<cmds::%(name)s, 0>(true); | 8113 SpecializedSetup<cmds::%(name)s, 0>(true); |
| 8256 cmds::%(name)s cmd; | 8114 cmds::%(name)s cmd; |
| 8257 cmd.Init(%(args)s%(comma)sshared_memory_id_, shared_memory_offset_);""" | 8115 cmd.Init(%(args)s%(comma)sshared_memory_id_, shared_memory_offset_); |
| 8258 if func.IsUnsafe(): | |
| 8259 valid_test += """ | |
| 8260 decoder_->set_unsafe_es3_apis_enabled(true);""" | |
| 8261 valid_test += """ | |
| 8262 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 8116 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 8263 EXPECT_EQ(GL_NO_ERROR, GetGLError());""" | 8117 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 8264 if func.IsUnsafe(): | |
| 8265 valid_test += """ | |
| 8266 decoder_->set_unsafe_es3_apis_enabled(false); | |
| 8267 EXPECT_EQ(error::kUnknownCommand, ExecuteCmd(cmd));""" | |
| 8268 valid_test += """ | |
| 8269 } | 8118 } |
| 8270 """ | 8119 """ |
| 8271 comma = "" | 8120 comma = "" |
| 8272 if len(func.GetOriginalArgs()): | 8121 if len(func.GetOriginalArgs()): |
| 8273 comma =", " | 8122 comma =", " |
| 8274 self.WriteValidUnitTest(func, f, valid_test, { | 8123 self.WriteValidUnitTest(func, f, valid_test, { |
| 8275 'comma': comma, | 8124 'comma': comma, |
| 8276 }, *extras) | 8125 }, *extras) |
| 8277 | 8126 |
| 8278 invalid_test = """ | 8127 invalid_test = """ |
| 8279 TEST_P(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) { | 8128 TEST_P(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) { |
| 8280 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)).Times(0); | 8129 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)).Times(0); |
| 8281 SpecializedSetup<cmds::%(name)s, 0>(false); | 8130 SpecializedSetup<cmds::%(name)s, 0>(false); |
| 8282 cmds::%(name)s cmd; | 8131 cmds::%(name)s cmd; |
| 8283 cmd.Init(%(args)s%(comma)sshared_memory_id_, shared_memory_offset_); | 8132 cmd.Init(%(args)s%(comma)sshared_memory_id_, shared_memory_offset_); |
| 8284 EXPECT_EQ(error::%(parse_result)s, ExecuteCmd(cmd));%(gl_error_test)s | 8133 EXPECT_EQ(error::%(parse_result)s, ExecuteCmd(cmd));%(gl_error_test)s |
| 8285 } | 8134 } |
| 8286 """ | 8135 """ |
| 8287 self.WriteInvalidUnitTest(func, f, invalid_test, { | 8136 self.WriteInvalidUnitTest(func, f, invalid_test, { |
| 8288 'comma': comma, | 8137 'comma': comma, |
| 8289 }, *extras) | 8138 }, *extras) |
| 8290 | 8139 |
| 8291 invalid_test = """ | 8140 invalid_test = """ |
| 8292 TEST_P(%(test_name)s, %(name)sInvalidArgsBadSharedMemoryId) { | 8141 TEST_P(%(test_name)s, %(name)sInvalidArgsBadSharedMemoryId) { |
| 8293 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)).Times(0); | 8142 EXPECT_CALL(*gl_, %(gl_func_name)s(%(gl_args)s)).Times(0); |
| 8294 SpecializedSetup<cmds::%(name)s, 0>(false);""" | 8143 SpecializedSetup<cmds::%(name)s, 0>(false); |
| 8295 if func.IsUnsafe(): | |
| 8296 invalid_test += """ | |
| 8297 decoder_->set_unsafe_es3_apis_enabled(true);""" | |
| 8298 invalid_test += """ | |
| 8299 cmds::%(name)s cmd; | 8144 cmds::%(name)s cmd; |
| 8300 cmd.Init(%(args)s%(comma)skInvalidSharedMemoryId, shared_memory_offset_); | 8145 cmd.Init(%(args)s%(comma)skInvalidSharedMemoryId, shared_memory_offset_); |
| 8301 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); | 8146 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); |
| 8302 cmd.Init(%(args)s%(comma)sshared_memory_id_, kInvalidSharedMemoryOffset); | 8147 cmd.Init(%(args)s%(comma)sshared_memory_id_, kInvalidSharedMemoryOffset); |
| 8303 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd));""" | 8148 EXPECT_EQ(error::kOutOfBounds, ExecuteCmd(cmd)); |
| 8304 if func.IsUnsafe(): | |
| 8305 invalid_test += """ | |
| 8306 decoder_->set_unsafe_es3_apis_enabled(true);""" | |
| 8307 invalid_test += """ | |
| 8308 } | 8149 } |
| 8309 """ | 8150 """ |
| 8310 self.WriteValidUnitTest(func, f, invalid_test, { | 8151 self.WriteValidUnitTest(func, f, invalid_test, { |
| 8311 'comma': comma, | 8152 'comma': comma, |
| 8312 }, *extras) | 8153 }, *extras) |
| 8313 | 8154 |
| 8314 def WriteServiceImplementation(self, func, f): | 8155 def WriteServiceImplementation(self, func, f): |
| 8315 """Overrriden from TypeHandler.""" | 8156 """Overrriden from TypeHandler.""" |
| 8316 self.WriteServiceHandlerFunctionHeader(func, f) | 8157 self.WriteServiceHandlerFunctionHeader(func, f) |
| 8317 self.WriteHandlerExtensionCheck(func, f) | 8158 self.WriteHandlerExtensionCheck(func, f) |
| (...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9433 | 9274 |
| 9434 if self.return_arg: | 9275 if self.return_arg: |
| 9435 self.init_args.append(self.return_arg) | 9276 self.init_args.append(self.return_arg) |
| 9436 | 9277 |
| 9437 self.type_handler.InitFunction(self) | 9278 self.type_handler.InitFunction(self) |
| 9438 | 9279 |
| 9439 def IsImmediate(self): | 9280 def IsImmediate(self): |
| 9440 """Returns whether the function is immediate data function or not.""" | 9281 """Returns whether the function is immediate data function or not.""" |
| 9441 return False | 9282 return False |
| 9442 | 9283 |
| 9443 def IsUnsafe(self): | 9284 def IsES3(self): |
| 9444 """Returns whether the function has service side validation or not.""" | 9285 """Returns whether the function requires an ES3 context or not.""" |
| 9445 return self.GetInfo('unsafe', False) | 9286 return self.GetInfo('es3', False) |
| 9446 | 9287 |
| 9447 def GetInfo(self, name, default = None): | 9288 def GetInfo(self, name, default = None): |
| 9448 """Returns a value from the function info for this function.""" | 9289 """Returns a value from the function info for this function.""" |
| 9449 if name in self.info: | 9290 if name in self.info: |
| 9450 return self.info[name] | 9291 return self.info[name] |
| 9451 return default | 9292 return default |
| 9452 | 9293 |
| 9453 def GetValidArg(self, arg): | 9294 def GetValidArg(self, arg): |
| 9454 """Gets a valid argument value for the parameter arg from the function info | 9295 """Gets a valid argument value for the parameter arg from the function info |
| 9455 if one exists.""" | 9296 if one exists.""" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 9466 def AddInfo(self, name, value): | 9307 def AddInfo(self, name, value): |
| 9467 """Adds an info.""" | 9308 """Adds an info.""" |
| 9468 self.info[name] = value | 9309 self.info[name] = value |
| 9469 | 9310 |
| 9470 def IsExtension(self): | 9311 def IsExtension(self): |
| 9471 return self.GetInfo('extension') or self.GetInfo('extension_flag') | 9312 return self.GetInfo('extension') or self.GetInfo('extension_flag') |
| 9472 | 9313 |
| 9473 def IsCoreGLFunction(self): | 9314 def IsCoreGLFunction(self): |
| 9474 return (not self.IsExtension() and | 9315 return (not self.IsExtension() and |
| 9475 not self.GetInfo('pepper_interface') and | 9316 not self.GetInfo('pepper_interface') and |
| 9476 not self.IsUnsafe()) | 9317 not self.IsES3()) |
| 9477 | 9318 |
| 9478 def InPepperInterface(self, interface): | 9319 def InPepperInterface(self, interface): |
| 9479 ext = self.GetInfo('pepper_interface') | 9320 ext = self.GetInfo('pepper_interface') |
| 9480 if not interface.GetName(): | 9321 if not interface.GetName(): |
| 9481 return self.IsCoreGLFunction() | 9322 return self.IsCoreGLFunction() |
| 9482 return ext == interface.GetName() | 9323 return ext == interface.GetName() |
| 9483 | 9324 |
| 9484 def InAnyPepperExtension(self): | 9325 def InAnyPepperExtension(self): |
| 9485 return self.IsCoreGLFunction() or self.GetInfo('pepper_interface') | 9326 return self.IsCoreGLFunction() or self.GetInfo('pepper_interface') |
| 9486 | 9327 |
| (...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10604 """Writes the service decorder unit tests.""" | 10445 """Writes the service decorder unit tests.""" |
| 10605 num_tests = len(self.functions) | 10446 num_tests = len(self.functions) |
| 10606 FUNCTIONS_PER_FILE = 98 # hard code this so it doesn't change. | 10447 FUNCTIONS_PER_FILE = 98 # hard code this so it doesn't change. |
| 10607 count = 0 | 10448 count = 0 |
| 10608 for test_num in range(0, num_tests, FUNCTIONS_PER_FILE): | 10449 for test_num in range(0, num_tests, FUNCTIONS_PER_FILE): |
| 10609 count += 1 | 10450 count += 1 |
| 10610 filename = filename_pattern % count | 10451 filename = filename_pattern % count |
| 10611 comment = "// It is included by gles2_cmd_decoder_unittest_%d.cc\n" \ | 10452 comment = "// It is included by gles2_cmd_decoder_unittest_%d.cc\n" \ |
| 10612 % count | 10453 % count |
| 10613 with CHeaderWriter(filename, comment) as f: | 10454 with CHeaderWriter(filename, comment) as f: |
| 10614 test_name = 'GLES2DecoderTest%d' % count | |
| 10615 end = test_num + FUNCTIONS_PER_FILE | 10455 end = test_num + FUNCTIONS_PER_FILE |
| 10616 if end > num_tests: | 10456 if end > num_tests: |
| 10617 end = num_tests | 10457 end = num_tests |
| 10618 for idx in range(test_num, end): | 10458 for idx in range(test_num, end): |
| 10619 func = self.functions[idx] | 10459 func = self.functions[idx] |
| 10460 test_name = 'GLES2DecoderTest%d' % count |
| 10461 if func.IsES3(): |
| 10462 test_name = 'GLES3DecoderTest%d' % count |
| 10620 | 10463 |
| 10621 # Do any filtering of the functions here, so that the functions | 10464 # Do any filtering of the functions here, so that the functions |
| 10622 # will not move between the numbered files if filtering properties | 10465 # will not move between the numbered files if filtering properties |
| 10623 # are changed. | 10466 # are changed. |
| 10624 if func.GetInfo('extension_flag'): | 10467 if func.GetInfo('extension_flag'): |
| 10625 continue | 10468 continue |
| 10626 | 10469 |
| 10627 if func.GetInfo('unit_test') != False: | 10470 if func.GetInfo('unit_test') != False: |
| 10628 func.WriteServiceUnitTest(f, { | 10471 func.WriteServiceUnitTest(f, { |
| 10629 'test_name': test_name | 10472 'test_name': test_name |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10728 baseclass to turn on the extension. | 10571 baseclass to turn on the extension. |
| 10729 """ | 10572 """ |
| 10730 functions = [f for f in self.functions if f.GetInfo('extension_flag')] | 10573 functions = [f for f in self.functions if f.GetInfo('extension_flag')] |
| 10731 comment = "// It is included by gles2_cmd_decoder_unittest_extensions.cc\n" | 10574 comment = "// It is included by gles2_cmd_decoder_unittest_extensions.cc\n" |
| 10732 with CHeaderWriter(filename, comment) as f: | 10575 with CHeaderWriter(filename, comment) as f: |
| 10733 for func in functions: | 10576 for func in functions: |
| 10734 if True: | 10577 if True: |
| 10735 if func.GetInfo('unit_test') != False: | 10578 if func.GetInfo('unit_test') != False: |
| 10736 extension = ToCamelCase( | 10579 extension = ToCamelCase( |
| 10737 ToGLExtensionString(func.GetInfo('extension_flag'))) | 10580 ToGLExtensionString(func.GetInfo('extension_flag'))) |
| 10581 test_name = 'GLES2DecoderTestWith%s' % extension |
| 10582 if func.IsES3(): |
| 10583 test_name = 'GLES3DecoderTestWith%s' % extension |
| 10738 func.WriteServiceUnitTest(f, { | 10584 func.WriteServiceUnitTest(f, { |
| 10739 'test_name': 'GLES2DecoderTestWith%s' % extension | 10585 'test_name': test_name |
| 10740 }) | 10586 }) |
| 10741 self.generated_cpp_filenames.append(filename) | 10587 self.generated_cpp_filenames.append(filename) |
| 10742 | 10588 |
| 10743 def WriteGLES2Header(self, filename): | 10589 def WriteGLES2Header(self, filename): |
| 10744 """Writes the GLES2 header.""" | 10590 """Writes the GLES2 header.""" |
| 10745 comment = "// This file contains Chromium-specific GLES2 declarations.\n\n" | 10591 comment = "// This file contains Chromium-specific GLES2 declarations.\n\n" |
| 10746 with CHeaderWriter(filename, comment) as f: | 10592 with CHeaderWriter(filename, comment) as f: |
| 10747 for func in self.original_functions: | 10593 for func in self.original_functions: |
| 10748 func.WriteGLES2Header(f) | 10594 func.WriteGLES2Header(f) |
| 10749 f.write("\n") | 10595 f.write("\n") |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11354 Format(gen.generated_cpp_filenames) | 11200 Format(gen.generated_cpp_filenames) |
| 11355 | 11201 |
| 11356 if gen.errors > 0: | 11202 if gen.errors > 0: |
| 11357 print "%d errors" % gen.errors | 11203 print "%d errors" % gen.errors |
| 11358 return 1 | 11204 return 1 |
| 11359 return 0 | 11205 return 0 |
| 11360 | 11206 |
| 11361 | 11207 |
| 11362 if __name__ == '__main__': | 11208 if __name__ == '__main__': |
| 11363 sys.exit(main(sys.argv[1:])) | 11209 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |