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 8242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8253 uint32_t target; | 8253 uint32_t target; |
8254 }; | 8254 }; |
8255 | 8255 |
8256 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUMImmediate) == 8, | 8256 COMPILE_ASSERT(sizeof(ProduceTextureCHROMIUMImmediate) == 8, |
8257 Sizeof_ProduceTextureCHROMIUMImmediate_is_not_8); | 8257 Sizeof_ProduceTextureCHROMIUMImmediate_is_not_8); |
8258 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0, | 8258 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, header) == 0, |
8259 OffsetOf_ProduceTextureCHROMIUMImmediate_header_not_0); | 8259 OffsetOf_ProduceTextureCHROMIUMImmediate_header_not_0); |
8260 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4, | 8260 COMPILE_ASSERT(offsetof(ProduceTextureCHROMIUMImmediate, target) == 4, |
8261 OffsetOf_ProduceTextureCHROMIUMImmediate_target_not_4); | 8261 OffsetOf_ProduceTextureCHROMIUMImmediate_target_not_4); |
8262 | 8262 |
| 8263 struct ProduceTextureDirectCHROMIUMImmediate { |
| 8264 typedef ProduceTextureDirectCHROMIUMImmediate ValueType; |
| 8265 static const CommandId kCmdId = kProduceTextureDirectCHROMIUMImmediate; |
| 8266 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 8267 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
| 8268 |
| 8269 static uint32_t ComputeDataSize() { |
| 8270 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT |
| 8271 } |
| 8272 |
| 8273 static uint32_t ComputeSize() { |
| 8274 return static_cast<uint32_t>(sizeof(ValueType) + |
| 8275 ComputeDataSize()); // NOLINT |
| 8276 } |
| 8277 |
| 8278 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } |
| 8279 |
| 8280 void Init(GLuint _texture, GLenum _target, const GLbyte* _mailbox) { |
| 8281 SetHeader(); |
| 8282 texture = _texture; |
| 8283 target = _target; |
| 8284 memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize()); |
| 8285 } |
| 8286 |
| 8287 void* Set(void* cmd, |
| 8288 GLuint _texture, |
| 8289 GLenum _target, |
| 8290 const GLbyte* _mailbox) { |
| 8291 static_cast<ValueType*>(cmd)->Init(_texture, _target, _mailbox); |
| 8292 const uint32_t size = ComputeSize(); |
| 8293 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 8294 } |
| 8295 |
| 8296 gpu::CommandHeader header; |
| 8297 uint32_t texture; |
| 8298 uint32_t target; |
| 8299 }; |
| 8300 |
| 8301 COMPILE_ASSERT(sizeof(ProduceTextureDirectCHROMIUMImmediate) == 12, |
| 8302 Sizeof_ProduceTextureDirectCHROMIUMImmediate_is_not_12); |
| 8303 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate, header) == 0, |
| 8304 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_header_not_0); |
| 8305 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate, texture) == 4, |
| 8306 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_texture_not_4); |
| 8307 COMPILE_ASSERT(offsetof(ProduceTextureDirectCHROMIUMImmediate, target) == 8, |
| 8308 OffsetOf_ProduceTextureDirectCHROMIUMImmediate_target_not_8); |
| 8309 |
8263 struct ConsumeTextureCHROMIUMImmediate { | 8310 struct ConsumeTextureCHROMIUMImmediate { |
8264 typedef ConsumeTextureCHROMIUMImmediate ValueType; | 8311 typedef ConsumeTextureCHROMIUMImmediate ValueType; |
8265 static const CommandId kCmdId = kConsumeTextureCHROMIUMImmediate; | 8312 static const CommandId kCmdId = kConsumeTextureCHROMIUMImmediate; |
8266 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 8313 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
8267 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 8314 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
8268 | 8315 |
8269 static uint32_t ComputeDataSize() { | 8316 static uint32_t ComputeDataSize() { |
8270 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT | 8317 return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT |
8271 } | 8318 } |
8272 | 8319 |
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9113 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_x) == 32, | 9160 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_x) == 32, |
9114 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_x_not_32); | 9161 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_x_not_32); |
9115 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_y) == 36, | 9162 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_y) == 36, |
9116 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_y_not_36); | 9163 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_y_not_36); |
9117 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40, | 9164 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40, |
9118 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_width_not_40); | 9165 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_width_not_40); |
9119 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44, | 9166 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44, |
9120 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_height_not_44); | 9167 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_height_not_44); |
9121 | 9168 |
9122 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 9169 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |