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 3526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3537 file.Write( | 3537 file.Write( |
3538 "%(return_type)s GLES2Implementation::%(name)s(%(typed_args)s) {\n" % | 3538 "%(return_type)s GLES2Implementation::%(name)s(%(typed_args)s) {\n" % |
3539 args) | 3539 args) |
3540 func.WriteDestinationInitalizationValidation(file) | 3540 func.WriteDestinationInitalizationValidation(file) |
3541 self.WriteClientGLCallLog(func, file) | 3541 self.WriteClientGLCallLog(func, file) |
3542 for arg in func.GetOriginalArgs(): | 3542 for arg in func.GetOriginalArgs(): |
3543 arg.WriteClientSideValidationCode(file, func) | 3543 arg.WriteClientSideValidationCode(file, func) |
3544 code = """ GPU_CLIENT_SINGLE_THREAD_CHECK(); | 3544 code = """ GPU_CLIENT_SINGLE_THREAD_CHECK(); |
3545 GetIdHandler(id_namespaces::k%(resource_types)s)-> | 3545 GetIdHandler(id_namespaces::k%(resource_types)s)-> |
3546 MakeIds(this, 0, %(args)s); | 3546 MakeIds(this, 0, %(args)s); |
| 3547 Gen%(name)sHelper(%(args)s); |
3547 helper_->%(name)sImmediate(%(args)s); | 3548 helper_->%(name)sImmediate(%(args)s); |
3548 helper_->CommandBufferHelper::Flush(); | 3549 helper_->CommandBufferHelper::Flush(); |
3549 %(log_code)s | 3550 %(log_code)s |
3550 } | 3551 } |
3551 | 3552 |
3552 """ | 3553 """ |
3553 file.Write(code % args) | 3554 file.Write(code % args) |
3554 | 3555 |
3555 def WriteGLES2ImplementationUnitTest(self, func, file): | 3556 def WriteGLES2ImplementationUnitTest(self, func, file): |
3556 """Overrriden from TypeHandler.""" | 3557 """Overrriden from TypeHandler.""" |
(...skipping 3829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7386 gen.WriteGLES2Header("../../third_party/khronos/GLES2/gl2chromium.h") | 7387 gen.WriteGLES2Header("../../third_party/khronos/GLES2/gl2chromium.h") |
7387 | 7388 |
7388 if gen.errors > 0: | 7389 if gen.errors > 0: |
7389 print "%d errors" % gen.errors | 7390 print "%d errors" % gen.errors |
7390 return 1 | 7391 return 1 |
7391 return 0 | 7392 return 0 |
7392 | 7393 |
7393 | 7394 |
7394 if __name__ == '__main__': | 7395 if __name__ == '__main__': |
7395 sys.exit(main(sys.argv[1:])) | 7396 sys.exit(main(sys.argv[1:])) |
OLD | NEW |