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

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

Issue 2095493002: Improve sync object related command handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve sync object related command handling. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """code generator for GLES2 command buffers.""" 6 """code generator for GLES2 command buffers."""
7 7
8 import itertools 8 import itertools
9 import os 9 import os
10 import os.path 10 import os.path
(...skipping 2852 matching lines...) Expand 10 before | Expand all | Expand 10 after
2863 'impl_func': False, 2863 'impl_func': False,
2864 'client_test': False, 2864 'client_test': False,
2865 }, 2865 },
2866 'EnableVertexAttribArray': { 2866 'EnableVertexAttribArray': {
2867 'decoder_func': 'DoEnableVertexAttribArray', 2867 'decoder_func': 'DoEnableVertexAttribArray',
2868 'impl_decl': False, 2868 'impl_decl': False,
2869 }, 2869 },
2870 'FenceSync': { 2870 'FenceSync': {
2871 'type': 'Create', 2871 'type': 'Create',
2872 'client_test': False, 2872 'client_test': False,
2873 'decoder_func': 'DoFenceSync',
2873 'unsafe': True, 2874 'unsafe': True,
2874 'trace_level': 1, 2875 'trace_level': 1,
2875 }, 2876 },
2876 'Finish': { 2877 'Finish': {
2877 'impl_func': False, 2878 'impl_func': False,
2878 'client_test': False, 2879 'client_test': False,
2879 'decoder_func': 'DoFinish', 2880 'decoder_func': 'DoFinish',
2880 'defer_reads': True, 2881 'defer_reads': True,
2881 'trace_level': 1, 2882 'trace_level': 1,
2882 }, 2883 },
(...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after
4847 'offset': offset, 4848 'offset': offset,
4848 }) 4849 })
4849 offset += _SIZE_OF_UINT32 4850 offset += _SIZE_OF_UINT32
4850 f.write("\n") 4851 f.write("\n")
4851 4852
4852 def WriteHandlerImplementation(self, func, f): 4853 def WriteHandlerImplementation(self, func, f):
4853 """Writes the handler implementation for this command.""" 4854 """Writes the handler implementation for this command."""
4854 if func.IsUnsafe() and func.GetInfo('id_mapping'): 4855 if func.IsUnsafe() and func.GetInfo('id_mapping'):
4855 code_no_gen = """ if (!group_->Get%(type)sServiceId( 4856 code_no_gen = """ if (!group_->Get%(type)sServiceId(
4856 %(var)s, &%(service_var)s)) { 4857 %(var)s, &%(service_var)s)) {
4857 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "%(func)s", "invalid %(var)s id"); 4858 LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "%(func)s", "invalid %(var)s id");
4858 return error::kNoError; 4859 return error::kNoError;
4859 } 4860 }
4860 """ 4861 """
4861 code_gen = """ if (!group_->Get%(type)sServiceId( 4862 code_gen = """ if (!group_->Get%(type)sServiceId(
4862 %(var)s, &%(service_var)s)) { 4863 %(var)s, &%(service_var)s)) {
4863 if (!group_->bind_generates_resource()) { 4864 if (!group_->bind_generates_resource()) {
4864 LOCAL_SET_GL_ERROR( 4865 LOCAL_SET_GL_ERROR(
4865 GL_INVALID_OPERATION, "%(func)s", "invalid %(var)s id"); 4866 GL_INVALID_OPERATION, "%(func)s", "invalid %(var)s id");
4866 return error::kNoError; 4867 return error::kNoError;
4867 } 4868 }
(...skipping 6655 matching lines...) Expand 10 before | Expand all | Expand 10 after
11523 Format(gen.generated_cpp_filenames) 11524 Format(gen.generated_cpp_filenames)
11524 11525
11525 if gen.errors > 0: 11526 if gen.errors > 0:
11526 print "%d errors" % gen.errors 11527 print "%d errors" % gen.errors
11527 return 1 11528 return 1
11528 return 0 11529 return 0
11529 11530
11530 11531
11531 if __name__ == '__main__': 11532 if __name__ == '__main__':
11532 sys.exit(main(sys.argv[1:])) 11533 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698