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

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

Issue 763383002: GPU: Flush in glBind* to avoid being executed after future glDelete* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address a review issue Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """code generator for GLES2 command buffers.""" 6 """code generator for GLES2 command buffers."""
7 7
8 import itertools 8 import itertools
9 import os 9 import os
10 import os.path 10 import os.path
(...skipping 4100 matching lines...) Expand 10 before | Expand all | Expand 10 after
4111 file.Write(" GPU_CLIENT_SINGLE_THREAD_CHECK();\n") 4111 file.Write(" GPU_CLIENT_SINGLE_THREAD_CHECK();\n")
4112 func.WriteDestinationInitalizationValidation(file) 4112 func.WriteDestinationInitalizationValidation(file)
4113 self.WriteClientGLCallLog(func, file) 4113 self.WriteClientGLCallLog(func, file)
4114 for arg in func.GetOriginalArgs(): 4114 for arg in func.GetOriginalArgs():
4115 arg.WriteClientSideValidationCode(file, func) 4115 arg.WriteClientSideValidationCode(file, func)
4116 4116
4117 code = """ if (Is%(type)sReservedId(%(id)s)) { 4117 code = """ if (Is%(type)sReservedId(%(id)s)) {
4118 SetGLError(GL_INVALID_OPERATION, "%(name)s\", \"%(id)s reserved id"); 4118 SetGLError(GL_INVALID_OPERATION, "%(name)s\", \"%(id)s reserved id");
4119 return; 4119 return;
4120 } 4120 }
4121 if (%(name)sHelper(%(arg_string)s)) { 4121 %(name)sHelper(%(arg_string)s);
4122 helper_->%(name)s(%(arg_string)s);
4123 }
4124 CheckGLError(); 4122 CheckGLError();
4125 } 4123 }
4126 4124
4127 """ 4125 """
4128 name_arg = None 4126 name_arg = None
4129 if len(func.GetOriginalArgs()) == 1: 4127 if len(func.GetOriginalArgs()) == 1:
4130 # Bind functions that have no target (like BindVertexArrayOES) 4128 # Bind functions that have no target (like BindVertexArrayOES)
4131 name_arg = func.GetOriginalArgs()[0] 4129 name_arg = func.GetOriginalArgs()[0]
4132 else: 4130 else:
4133 # Bind functions that have both a target and a name (like BindTexture) 4131 # Bind functions that have both a target and a name (like BindTexture)
(...skipping 4588 matching lines...) Expand 10 before | Expand all | Expand 10 after
8722 Format(gen.generated_cpp_filenames) 8720 Format(gen.generated_cpp_filenames)
8723 8721
8724 if gen.errors > 0: 8722 if gen.errors > 0:
8725 print "%d errors" % gen.errors 8723 print "%d errors" % gen.errors
8726 return 1 8724 return 1
8727 return 0 8725 return 0
8728 8726
8729 8727
8730 if __name__ == '__main__': 8728 if __name__ == '__main__':
8731 sys.exit(main(sys.argv[1:])) 8729 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698