OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file is auto-generated from | 5 // This file is auto-generated from |
6 // gpu/command_buffer/build_gles2_cmd_buffer.py | 6 // gpu/command_buffer/build_gles2_cmd_buffer.py |
7 // DO NOT EDIT! | 7 // DO NOT EDIT! |
8 | 8 |
9 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 9 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
10 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 10 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
(...skipping 9916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9927 uint32 target; | 9927 uint32 target; |
9928 }; | 9928 }; |
9929 | 9929 |
9930 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate) == 8, | 9930 COMPILE_ASSERT(sizeof(ConsumeTextureCHROMIUMImmediate) == 8, |
9931 Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8); | 9931 Sizeof_ConsumeTextureCHROMIUMImmediate_is_not_8); |
9932 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0, | 9932 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, header) == 0, |
9933 OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0); | 9933 OffsetOf_ConsumeTextureCHROMIUMImmediate_header_not_0); |
9934 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4, | 9934 COMPILE_ASSERT(offsetof(ConsumeTextureCHROMIUMImmediate, target) == 4, |
9935 OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4); | 9935 OffsetOf_ConsumeTextureCHROMIUMImmediate_target_not_4); |
9936 | 9936 |
| 9937 struct BindUniformLocationCHROMIUM { |
| 9938 typedef BindUniformLocationCHROMIUM ValueType; |
| 9939 static const CommandId kCmdId = kBindUniformLocationCHROMIUM; |
| 9940 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 9941 |
| 9942 static uint32 ComputeSize() { |
| 9943 return static_cast<uint32>(sizeof(ValueType)); // NOLINT |
| 9944 } |
| 9945 |
| 9946 void SetHeader() { |
| 9947 header.SetCmd<ValueType>(); |
| 9948 } |
| 9949 |
| 9950 void Init( |
| 9951 GLuint _program, GLint _location, uint32 _name_shm_id, |
| 9952 uint32 _name_shm_offset, uint32 _data_size) { |
| 9953 SetHeader(); |
| 9954 program = _program; |
| 9955 location = _location; |
| 9956 name_shm_id = _name_shm_id; |
| 9957 name_shm_offset = _name_shm_offset; |
| 9958 data_size = _data_size; |
| 9959 } |
| 9960 |
| 9961 void* Set( |
| 9962 void* cmd, GLuint _program, GLint _location, uint32 _name_shm_id, |
| 9963 uint32 _name_shm_offset, uint32 _data_size) { |
| 9964 static_cast<ValueType*>( |
| 9965 cmd)->Init( |
| 9966 _program, _location, _name_shm_id, _name_shm_offset, _data_size); |
| 9967 return NextCmdAddress<ValueType>(cmd); |
| 9968 } |
| 9969 |
| 9970 gpu::CommandHeader header; |
| 9971 uint32 program; |
| 9972 int32 location; |
| 9973 uint32 name_shm_id; |
| 9974 uint32 name_shm_offset; |
| 9975 uint32 data_size; |
| 9976 }; |
| 9977 |
| 9978 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUM) == 24, |
| 9979 Sizeof_BindUniformLocationCHROMIUM_is_not_24); |
| 9980 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, header) == 0, |
| 9981 OffsetOf_BindUniformLocationCHROMIUM_header_not_0); |
| 9982 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, program) == 4, |
| 9983 OffsetOf_BindUniformLocationCHROMIUM_program_not_4); |
| 9984 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, location) == 8, |
| 9985 OffsetOf_BindUniformLocationCHROMIUM_location_not_8); |
| 9986 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, name_shm_id) == 12, |
| 9987 OffsetOf_BindUniformLocationCHROMIUM_name_shm_id_not_12); |
| 9988 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, name_shm_offset) == 16, |
| 9989 OffsetOf_BindUniformLocationCHROMIUM_name_shm_offset_not_16); |
| 9990 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUM, data_size) == 20, |
| 9991 OffsetOf_BindUniformLocationCHROMIUM_data_size_not_20); |
| 9992 |
| 9993 struct BindUniformLocationCHROMIUMImmediate { |
| 9994 typedef BindUniformLocationCHROMIUMImmediate ValueType; |
| 9995 static const CommandId kCmdId = kBindUniformLocationCHROMIUMImmediate; |
| 9996 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 9997 |
| 9998 static uint32 ComputeSize(uint32 data_size) { |
| 9999 return static_cast<uint32>( |
| 10000 sizeof(ValueType) + data_size); // NOLINT |
| 10001 } |
| 10002 |
| 10003 void SetHeader(uint32 data_size) { |
| 10004 header.SetCmdBySize<ValueType>(data_size); |
| 10005 } |
| 10006 |
| 10007 void Init( |
| 10008 GLuint _program, GLint _location, const char* _name, uint32 _data_size) { |
| 10009 SetHeader(_data_size); |
| 10010 program = _program; |
| 10011 location = _location; |
| 10012 data_size = _data_size; |
| 10013 memcpy(ImmediateDataAddress(this), _name, _data_size); |
| 10014 } |
| 10015 |
| 10016 void* Set( |
| 10017 void* cmd, GLuint _program, GLint _location, const char* _name, |
| 10018 uint32 _data_size) { |
| 10019 static_cast<ValueType*>(cmd)->Init(_program, _location, _name, _data_size); |
| 10020 return NextImmediateCmdAddress<ValueType>(cmd, _data_size); |
| 10021 } |
| 10022 |
| 10023 gpu::CommandHeader header; |
| 10024 uint32 program; |
| 10025 int32 location; |
| 10026 uint32 data_size; |
| 10027 }; |
| 10028 |
| 10029 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUMImmediate) == 16, |
| 10030 Sizeof_BindUniformLocationCHROMIUMImmediate_is_not_16); |
| 10031 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMImmediate, header) == 0, |
| 10032 OffsetOf_BindUniformLocationCHROMIUMImmediate_header_not_0); |
| 10033 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMImmediate, program) == 4, |
| 10034 OffsetOf_BindUniformLocationCHROMIUMImmediate_program_not_4); |
| 10035 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMImmediate, location) == 8, |
| 10036 OffsetOf_BindUniformLocationCHROMIUMImmediate_location_not_8); |
| 10037 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMImmediate, data_size) == 12, |
| 10038 OffsetOf_BindUniformLocationCHROMIUMImmediate_data_size_not_12); |
| 10039 |
| 10040 struct BindUniformLocationCHROMIUMBucket { |
| 10041 typedef BindUniformLocationCHROMIUMBucket ValueType; |
| 10042 static const CommandId kCmdId = kBindUniformLocationCHROMIUMBucket; |
| 10043 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 10044 |
| 10045 static uint32 ComputeSize() { |
| 10046 return static_cast<uint32>(sizeof(ValueType)); // NOLINT |
| 10047 } |
| 10048 |
| 10049 void SetHeader() { |
| 10050 header.SetCmd<ValueType>(); |
| 10051 } |
| 10052 |
| 10053 void Init(GLuint _program, GLint _location, uint32 _name_bucket_id) { |
| 10054 SetHeader(); |
| 10055 program = _program; |
| 10056 location = _location; |
| 10057 name_bucket_id = _name_bucket_id; |
| 10058 } |
| 10059 |
| 10060 void* Set( |
| 10061 void* cmd, GLuint _program, GLint _location, uint32 _name_bucket_id) { |
| 10062 static_cast<ValueType*>(cmd)->Init(_program, _location, _name_bucket_id); |
| 10063 return NextCmdAddress<ValueType>(cmd); |
| 10064 } |
| 10065 |
| 10066 gpu::CommandHeader header; |
| 10067 uint32 program; |
| 10068 int32 location; |
| 10069 uint32 name_bucket_id; |
| 10070 }; |
| 10071 |
| 10072 COMPILE_ASSERT(sizeof(BindUniformLocationCHROMIUMBucket) == 16, |
| 10073 Sizeof_BindUniformLocationCHROMIUMBucket_is_not_16); |
| 10074 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, header) == 0, |
| 10075 OffsetOf_BindUniformLocationCHROMIUMBucket_header_not_0); |
| 10076 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, program) == 4, |
| 10077 OffsetOf_BindUniformLocationCHROMIUMBucket_program_not_4); |
| 10078 COMPILE_ASSERT(offsetof(BindUniformLocationCHROMIUMBucket, location) == 8, |
| 10079 OffsetOf_BindUniformLocationCHROMIUMBucket_location_not_8); |
| 10080 COMPILE_ASSERT( |
| 10081 offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12, |
| 10082 OffsetOf_BindUniformLocationCHROMIUMBucket_name_bucket_id_not_12)
; // NOLINT |
| 10083 |
9937 | 10084 |
9938 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 10085 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
9939 | 10086 |
OLD | NEW |