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 9088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9099 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_height_not_28); | 9099 OffsetOf_ScheduleOverlayPlaneCHROMIUM_bounds_height_not_28); |
9100 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_x) == 32, | 9100 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_x) == 32, |
9101 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_x_not_32); | 9101 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_x_not_32); |
9102 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_y) == 36, | 9102 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_y) == 36, |
9103 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_y_not_36); | 9103 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_y_not_36); |
9104 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40, | 9104 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40, |
9105 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_width_not_40); | 9105 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_width_not_40); |
9106 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44, | 9106 COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44, |
9107 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_height_not_44); | 9107 OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_height_not_44); |
9108 | 9108 |
| 9109 struct MatrixLoadfCHROMIUMImmediate { |
| 9110 typedef MatrixLoadfCHROMIUMImmediate ValueType; |
| 9111 static const CommandId kCmdId = kMatrixLoadfCHROMIUMImmediate; |
| 9112 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 9113 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 9114 |
| 9115 static uint32_t ComputeDataSize() { |
| 9116 return static_cast<uint32_t>(sizeof(GLfloat) * 16); // NOLINT |
| 9117 } |
| 9118 |
| 9119 static uint32_t ComputeSize() { |
| 9120 return static_cast<uint32_t>(sizeof(ValueType) + |
| 9121 ComputeDataSize()); // NOLINT |
| 9122 } |
| 9123 |
| 9124 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } |
| 9125 |
| 9126 void Init(GLenum _matrixMode, const GLfloat* _m) { |
| 9127 SetHeader(); |
| 9128 matrixMode = _matrixMode; |
| 9129 memcpy(ImmediateDataAddress(this), _m, ComputeDataSize()); |
| 9130 } |
| 9131 |
| 9132 void* Set(void* cmd, GLenum _matrixMode, const GLfloat* _m) { |
| 9133 static_cast<ValueType*>(cmd)->Init(_matrixMode, _m); |
| 9134 const uint32_t size = ComputeSize(); |
| 9135 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 9136 } |
| 9137 |
| 9138 gpu::CommandHeader header; |
| 9139 uint32_t matrixMode; |
| 9140 }; |
| 9141 |
| 9142 COMPILE_ASSERT(sizeof(MatrixLoadfCHROMIUMImmediate) == 8, |
| 9143 Sizeof_MatrixLoadfCHROMIUMImmediate_is_not_8); |
| 9144 COMPILE_ASSERT(offsetof(MatrixLoadfCHROMIUMImmediate, header) == 0, |
| 9145 OffsetOf_MatrixLoadfCHROMIUMImmediate_header_not_0); |
| 9146 COMPILE_ASSERT(offsetof(MatrixLoadfCHROMIUMImmediate, matrixMode) == 4, |
| 9147 OffsetOf_MatrixLoadfCHROMIUMImmediate_matrixMode_not_4); |
| 9148 |
| 9149 struct MatrixLoadIdentityCHROMIUM { |
| 9150 typedef MatrixLoadIdentityCHROMIUM ValueType; |
| 9151 static const CommandId kCmdId = kMatrixLoadIdentityCHROMIUM; |
| 9152 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 9153 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 9154 |
| 9155 static uint32_t ComputeSize() { |
| 9156 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 9157 } |
| 9158 |
| 9159 void SetHeader() { header.SetCmd<ValueType>(); } |
| 9160 |
| 9161 void Init(GLenum _matrixMode) { |
| 9162 SetHeader(); |
| 9163 matrixMode = _matrixMode; |
| 9164 } |
| 9165 |
| 9166 void* Set(void* cmd, GLenum _matrixMode) { |
| 9167 static_cast<ValueType*>(cmd)->Init(_matrixMode); |
| 9168 return NextCmdAddress<ValueType>(cmd); |
| 9169 } |
| 9170 |
| 9171 gpu::CommandHeader header; |
| 9172 uint32_t matrixMode; |
| 9173 }; |
| 9174 |
| 9175 COMPILE_ASSERT(sizeof(MatrixLoadIdentityCHROMIUM) == 8, |
| 9176 Sizeof_MatrixLoadIdentityCHROMIUM_is_not_8); |
| 9177 COMPILE_ASSERT(offsetof(MatrixLoadIdentityCHROMIUM, header) == 0, |
| 9178 OffsetOf_MatrixLoadIdentityCHROMIUM_header_not_0); |
| 9179 COMPILE_ASSERT(offsetof(MatrixLoadIdentityCHROMIUM, matrixMode) == 4, |
| 9180 OffsetOf_MatrixLoadIdentityCHROMIUM_matrixMode_not_4); |
| 9181 |
9109 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 9182 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |