| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // It's formatted by clang-format using chromium coding style: | 7 // It's formatted by clang-format using chromium coding style: |
| 8 // clang-format -i -style=chromium filename | 8 // clang-format -i -style=chromium filename |
| 9 // DO NOT EDIT! | 9 // DO NOT EDIT! |
| 10 | 10 |
| (...skipping 12933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12944 static_assert( | 12944 static_assert( |
| 12945 offsetof(BindUniformLocationCHROMIUMBucket, program) == 4, | 12945 offsetof(BindUniformLocationCHROMIUMBucket, program) == 4, |
| 12946 "offset of BindUniformLocationCHROMIUMBucket program should be 4"); | 12946 "offset of BindUniformLocationCHROMIUMBucket program should be 4"); |
| 12947 static_assert( | 12947 static_assert( |
| 12948 offsetof(BindUniformLocationCHROMIUMBucket, location) == 8, | 12948 offsetof(BindUniformLocationCHROMIUMBucket, location) == 8, |
| 12949 "offset of BindUniformLocationCHROMIUMBucket location should be 8"); | 12949 "offset of BindUniformLocationCHROMIUMBucket location should be 8"); |
| 12950 static_assert( | 12950 static_assert( |
| 12951 offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12, | 12951 offsetof(BindUniformLocationCHROMIUMBucket, name_bucket_id) == 12, |
| 12952 "offset of BindUniformLocationCHROMIUMBucket name_bucket_id should be 12"); | 12952 "offset of BindUniformLocationCHROMIUMBucket name_bucket_id should be 12"); |
| 12953 | 12953 |
| 12954 struct GenValuebuffersCHROMIUMImmediate { | |
| 12955 typedef GenValuebuffersCHROMIUMImmediate ValueType; | |
| 12956 static const CommandId kCmdId = kGenValuebuffersCHROMIUMImmediate; | |
| 12957 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | |
| 12958 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
| 12959 | |
| 12960 static uint32_t ComputeDataSize(GLsizei n) { | |
| 12961 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | |
| 12962 } | |
| 12963 | |
| 12964 static uint32_t ComputeSize(GLsizei n) { | |
| 12965 return static_cast<uint32_t>(sizeof(ValueType) + | |
| 12966 ComputeDataSize(n)); // NOLINT | |
| 12967 } | |
| 12968 | |
| 12969 void SetHeader(GLsizei n) { | |
| 12970 header.SetCmdByTotalSize<ValueType>(ComputeSize(n)); | |
| 12971 } | |
| 12972 | |
| 12973 void Init(GLsizei _n, GLuint* _buffers) { | |
| 12974 SetHeader(_n); | |
| 12975 n = _n; | |
| 12976 memcpy(ImmediateDataAddress(this), _buffers, ComputeDataSize(_n)); | |
| 12977 } | |
| 12978 | |
| 12979 void* Set(void* cmd, GLsizei _n, GLuint* _buffers) { | |
| 12980 static_cast<ValueType*>(cmd)->Init(_n, _buffers); | |
| 12981 const uint32_t size = ComputeSize(_n); | |
| 12982 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | |
| 12983 } | |
| 12984 | |
| 12985 gpu::CommandHeader header; | |
| 12986 int32_t n; | |
| 12987 }; | |
| 12988 | |
| 12989 static_assert(sizeof(GenValuebuffersCHROMIUMImmediate) == 8, | |
| 12990 "size of GenValuebuffersCHROMIUMImmediate should be 8"); | |
| 12991 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate, header) == 0, | |
| 12992 "offset of GenValuebuffersCHROMIUMImmediate header should be 0"); | |
| 12993 static_assert(offsetof(GenValuebuffersCHROMIUMImmediate, n) == 4, | |
| 12994 "offset of GenValuebuffersCHROMIUMImmediate n should be 4"); | |
| 12995 | |
| 12996 struct DeleteValuebuffersCHROMIUMImmediate { | |
| 12997 typedef DeleteValuebuffersCHROMIUMImmediate ValueType; | |
| 12998 static const CommandId kCmdId = kDeleteValuebuffersCHROMIUMImmediate; | |
| 12999 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | |
| 13000 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
| 13001 | |
| 13002 static uint32_t ComputeDataSize(GLsizei n) { | |
| 13003 return static_cast<uint32_t>(sizeof(GLuint) * n); // NOLINT | |
| 13004 } | |
| 13005 | |
| 13006 static uint32_t ComputeSize(GLsizei n) { | |
| 13007 return static_cast<uint32_t>(sizeof(ValueType) + | |
| 13008 ComputeDataSize(n)); // NOLINT | |
| 13009 } | |
| 13010 | |
| 13011 void SetHeader(GLsizei n) { | |
| 13012 header.SetCmdByTotalSize<ValueType>(ComputeSize(n)); | |
| 13013 } | |
| 13014 | |
| 13015 void Init(GLsizei _n, const GLuint* _valuebuffers) { | |
| 13016 SetHeader(_n); | |
| 13017 n = _n; | |
| 13018 memcpy(ImmediateDataAddress(this), _valuebuffers, ComputeDataSize(_n)); | |
| 13019 } | |
| 13020 | |
| 13021 void* Set(void* cmd, GLsizei _n, const GLuint* _valuebuffers) { | |
| 13022 static_cast<ValueType*>(cmd)->Init(_n, _valuebuffers); | |
| 13023 const uint32_t size = ComputeSize(_n); | |
| 13024 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); | |
| 13025 } | |
| 13026 | |
| 13027 gpu::CommandHeader header; | |
| 13028 int32_t n; | |
| 13029 }; | |
| 13030 | |
| 13031 static_assert(sizeof(DeleteValuebuffersCHROMIUMImmediate) == 8, | |
| 13032 "size of DeleteValuebuffersCHROMIUMImmediate should be 8"); | |
| 13033 static_assert( | |
| 13034 offsetof(DeleteValuebuffersCHROMIUMImmediate, header) == 0, | |
| 13035 "offset of DeleteValuebuffersCHROMIUMImmediate header should be 0"); | |
| 13036 static_assert(offsetof(DeleteValuebuffersCHROMIUMImmediate, n) == 4, | |
| 13037 "offset of DeleteValuebuffersCHROMIUMImmediate n should be 4"); | |
| 13038 | |
| 13039 struct IsValuebufferCHROMIUM { | |
| 13040 typedef IsValuebufferCHROMIUM ValueType; | |
| 13041 static const CommandId kCmdId = kIsValuebufferCHROMIUM; | |
| 13042 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
| 13043 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
| 13044 | |
| 13045 typedef uint32_t Result; | |
| 13046 | |
| 13047 static uint32_t ComputeSize() { | |
| 13048 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
| 13049 } | |
| 13050 | |
| 13051 void SetHeader() { header.SetCmd<ValueType>(); } | |
| 13052 | |
| 13053 void Init(GLuint _valuebuffer, | |
| 13054 uint32_t _result_shm_id, | |
| 13055 uint32_t _result_shm_offset) { | |
| 13056 SetHeader(); | |
| 13057 valuebuffer = _valuebuffer; | |
| 13058 result_shm_id = _result_shm_id; | |
| 13059 result_shm_offset = _result_shm_offset; | |
| 13060 } | |
| 13061 | |
| 13062 void* Set(void* cmd, | |
| 13063 GLuint _valuebuffer, | |
| 13064 uint32_t _result_shm_id, | |
| 13065 uint32_t _result_shm_offset) { | |
| 13066 static_cast<ValueType*>(cmd)->Init(_valuebuffer, _result_shm_id, | |
| 13067 _result_shm_offset); | |
| 13068 return NextCmdAddress<ValueType>(cmd); | |
| 13069 } | |
| 13070 | |
| 13071 gpu::CommandHeader header; | |
| 13072 uint32_t valuebuffer; | |
| 13073 uint32_t result_shm_id; | |
| 13074 uint32_t result_shm_offset; | |
| 13075 }; | |
| 13076 | |
| 13077 static_assert(sizeof(IsValuebufferCHROMIUM) == 16, | |
| 13078 "size of IsValuebufferCHROMIUM should be 16"); | |
| 13079 static_assert(offsetof(IsValuebufferCHROMIUM, header) == 0, | |
| 13080 "offset of IsValuebufferCHROMIUM header should be 0"); | |
| 13081 static_assert(offsetof(IsValuebufferCHROMIUM, valuebuffer) == 4, | |
| 13082 "offset of IsValuebufferCHROMIUM valuebuffer should be 4"); | |
| 13083 static_assert(offsetof(IsValuebufferCHROMIUM, result_shm_id) == 8, | |
| 13084 "offset of IsValuebufferCHROMIUM result_shm_id should be 8"); | |
| 13085 static_assert(offsetof(IsValuebufferCHROMIUM, result_shm_offset) == 12, | |
| 13086 "offset of IsValuebufferCHROMIUM result_shm_offset should be 12"); | |
| 13087 | |
| 13088 struct BindValuebufferCHROMIUM { | |
| 13089 typedef BindValuebufferCHROMIUM ValueType; | |
| 13090 static const CommandId kCmdId = kBindValuebufferCHROMIUM; | |
| 13091 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
| 13092 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
| 13093 | |
| 13094 static uint32_t ComputeSize() { | |
| 13095 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
| 13096 } | |
| 13097 | |
| 13098 void SetHeader() { header.SetCmd<ValueType>(); } | |
| 13099 | |
| 13100 void Init(GLenum _target, GLuint _valuebuffer) { | |
| 13101 SetHeader(); | |
| 13102 target = _target; | |
| 13103 valuebuffer = _valuebuffer; | |
| 13104 } | |
| 13105 | |
| 13106 void* Set(void* cmd, GLenum _target, GLuint _valuebuffer) { | |
| 13107 static_cast<ValueType*>(cmd)->Init(_target, _valuebuffer); | |
| 13108 return NextCmdAddress<ValueType>(cmd); | |
| 13109 } | |
| 13110 | |
| 13111 gpu::CommandHeader header; | |
| 13112 uint32_t target; | |
| 13113 uint32_t valuebuffer; | |
| 13114 }; | |
| 13115 | |
| 13116 static_assert(sizeof(BindValuebufferCHROMIUM) == 12, | |
| 13117 "size of BindValuebufferCHROMIUM should be 12"); | |
| 13118 static_assert(offsetof(BindValuebufferCHROMIUM, header) == 0, | |
| 13119 "offset of BindValuebufferCHROMIUM header should be 0"); | |
| 13120 static_assert(offsetof(BindValuebufferCHROMIUM, target) == 4, | |
| 13121 "offset of BindValuebufferCHROMIUM target should be 4"); | |
| 13122 static_assert(offsetof(BindValuebufferCHROMIUM, valuebuffer) == 8, | |
| 13123 "offset of BindValuebufferCHROMIUM valuebuffer should be 8"); | |
| 13124 | |
| 13125 struct SubscribeValueCHROMIUM { | |
| 13126 typedef SubscribeValueCHROMIUM ValueType; | |
| 13127 static const CommandId kCmdId = kSubscribeValueCHROMIUM; | |
| 13128 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
| 13129 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
| 13130 | |
| 13131 static uint32_t ComputeSize() { | |
| 13132 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
| 13133 } | |
| 13134 | |
| 13135 void SetHeader() { header.SetCmd<ValueType>(); } | |
| 13136 | |
| 13137 void Init(GLenum _target, GLenum _subscription) { | |
| 13138 SetHeader(); | |
| 13139 target = _target; | |
| 13140 subscription = _subscription; | |
| 13141 } | |
| 13142 | |
| 13143 void* Set(void* cmd, GLenum _target, GLenum _subscription) { | |
| 13144 static_cast<ValueType*>(cmd)->Init(_target, _subscription); | |
| 13145 return NextCmdAddress<ValueType>(cmd); | |
| 13146 } | |
| 13147 | |
| 13148 gpu::CommandHeader header; | |
| 13149 uint32_t target; | |
| 13150 uint32_t subscription; | |
| 13151 }; | |
| 13152 | |
| 13153 static_assert(sizeof(SubscribeValueCHROMIUM) == 12, | |
| 13154 "size of SubscribeValueCHROMIUM should be 12"); | |
| 13155 static_assert(offsetof(SubscribeValueCHROMIUM, header) == 0, | |
| 13156 "offset of SubscribeValueCHROMIUM header should be 0"); | |
| 13157 static_assert(offsetof(SubscribeValueCHROMIUM, target) == 4, | |
| 13158 "offset of SubscribeValueCHROMIUM target should be 4"); | |
| 13159 static_assert(offsetof(SubscribeValueCHROMIUM, subscription) == 8, | |
| 13160 "offset of SubscribeValueCHROMIUM subscription should be 8"); | |
| 13161 | |
| 13162 struct PopulateSubscribedValuesCHROMIUM { | |
| 13163 typedef PopulateSubscribedValuesCHROMIUM ValueType; | |
| 13164 static const CommandId kCmdId = kPopulateSubscribedValuesCHROMIUM; | |
| 13165 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
| 13166 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
| 13167 | |
| 13168 static uint32_t ComputeSize() { | |
| 13169 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
| 13170 } | |
| 13171 | |
| 13172 void SetHeader() { header.SetCmd<ValueType>(); } | |
| 13173 | |
| 13174 void Init(GLenum _target) { | |
| 13175 SetHeader(); | |
| 13176 target = _target; | |
| 13177 } | |
| 13178 | |
| 13179 void* Set(void* cmd, GLenum _target) { | |
| 13180 static_cast<ValueType*>(cmd)->Init(_target); | |
| 13181 return NextCmdAddress<ValueType>(cmd); | |
| 13182 } | |
| 13183 | |
| 13184 gpu::CommandHeader header; | |
| 13185 uint32_t target; | |
| 13186 }; | |
| 13187 | |
| 13188 static_assert(sizeof(PopulateSubscribedValuesCHROMIUM) == 8, | |
| 13189 "size of PopulateSubscribedValuesCHROMIUM should be 8"); | |
| 13190 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM, header) == 0, | |
| 13191 "offset of PopulateSubscribedValuesCHROMIUM header should be 0"); | |
| 13192 static_assert(offsetof(PopulateSubscribedValuesCHROMIUM, target) == 4, | |
| 13193 "offset of PopulateSubscribedValuesCHROMIUM target should be 4"); | |
| 13194 | |
| 13195 struct UniformValuebufferCHROMIUM { | |
| 13196 typedef UniformValuebufferCHROMIUM ValueType; | |
| 13197 static const CommandId kCmdId = kUniformValuebufferCHROMIUM; | |
| 13198 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | |
| 13199 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | |
| 13200 | |
| 13201 static uint32_t ComputeSize() { | |
| 13202 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | |
| 13203 } | |
| 13204 | |
| 13205 void SetHeader() { header.SetCmd<ValueType>(); } | |
| 13206 | |
| 13207 void Init(GLint _location, GLenum _target, GLenum _subscription) { | |
| 13208 SetHeader(); | |
| 13209 location = _location; | |
| 13210 target = _target; | |
| 13211 subscription = _subscription; | |
| 13212 } | |
| 13213 | |
| 13214 void* Set(void* cmd, GLint _location, GLenum _target, GLenum _subscription) { | |
| 13215 static_cast<ValueType*>(cmd)->Init(_location, _target, _subscription); | |
| 13216 return NextCmdAddress<ValueType>(cmd); | |
| 13217 } | |
| 13218 | |
| 13219 gpu::CommandHeader header; | |
| 13220 int32_t location; | |
| 13221 uint32_t target; | |
| 13222 uint32_t subscription; | |
| 13223 }; | |
| 13224 | |
| 13225 static_assert(sizeof(UniformValuebufferCHROMIUM) == 16, | |
| 13226 "size of UniformValuebufferCHROMIUM should be 16"); | |
| 13227 static_assert(offsetof(UniformValuebufferCHROMIUM, header) == 0, | |
| 13228 "offset of UniformValuebufferCHROMIUM header should be 0"); | |
| 13229 static_assert(offsetof(UniformValuebufferCHROMIUM, location) == 4, | |
| 13230 "offset of UniformValuebufferCHROMIUM location should be 4"); | |
| 13231 static_assert(offsetof(UniformValuebufferCHROMIUM, target) == 8, | |
| 13232 "offset of UniformValuebufferCHROMIUM target should be 8"); | |
| 13233 static_assert(offsetof(UniformValuebufferCHROMIUM, subscription) == 12, | |
| 13234 "offset of UniformValuebufferCHROMIUM subscription should be 12"); | |
| 13235 | |
| 13236 struct BindTexImage2DCHROMIUM { | 12954 struct BindTexImage2DCHROMIUM { |
| 13237 typedef BindTexImage2DCHROMIUM ValueType; | 12955 typedef BindTexImage2DCHROMIUM ValueType; |
| 13238 static const CommandId kCmdId = kBindTexImage2DCHROMIUM; | 12956 static const CommandId kCmdId = kBindTexImage2DCHROMIUM; |
| 13239 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 12957 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 13240 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 12958 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 13241 | 12959 |
| 13242 static uint32_t ComputeSize() { | 12960 static uint32_t ComputeSize() { |
| 13243 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 12961 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 13244 } | 12962 } |
| 13245 | 12963 |
| (...skipping 2509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15755 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, | 15473 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, |
| 15756 location) == 4, | 15474 location) == 4, |
| 15757 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " | 15475 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " |
| 15758 "location should be 4"); | 15476 "location should be 4"); |
| 15759 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, | 15477 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, |
| 15760 transpose) == 8, | 15478 transpose) == 8, |
| 15761 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " | 15479 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " |
| 15762 "transpose should be 8"); | 15480 "transpose should be 8"); |
| 15763 | 15481 |
| 15764 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 15482 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
| OLD | NEW |