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 8367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8378 | 8378 |
8379 static_assert(sizeof(Uniform4uivImmediate) == 12, | 8379 static_assert(sizeof(Uniform4uivImmediate) == 12, |
8380 "size of Uniform4uivImmediate should be 12"); | 8380 "size of Uniform4uivImmediate should be 12"); |
8381 static_assert(offsetof(Uniform4uivImmediate, header) == 0, | 8381 static_assert(offsetof(Uniform4uivImmediate, header) == 0, |
8382 "offset of Uniform4uivImmediate header should be 0"); | 8382 "offset of Uniform4uivImmediate header should be 0"); |
8383 static_assert(offsetof(Uniform4uivImmediate, location) == 4, | 8383 static_assert(offsetof(Uniform4uivImmediate, location) == 4, |
8384 "offset of Uniform4uivImmediate location should be 4"); | 8384 "offset of Uniform4uivImmediate location should be 4"); |
8385 static_assert(offsetof(Uniform4uivImmediate, count) == 8, | 8385 static_assert(offsetof(Uniform4uivImmediate, count) == 8, |
8386 "offset of Uniform4uivImmediate count should be 8"); | 8386 "offset of Uniform4uivImmediate count should be 8"); |
8387 | 8387 |
| 8388 struct UniformBlockBinding { |
| 8389 typedef UniformBlockBinding ValueType; |
| 8390 static const CommandId kCmdId = kUniformBlockBinding; |
| 8391 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 8392 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 8393 |
| 8394 static uint32_t ComputeSize() { |
| 8395 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 8396 } |
| 8397 |
| 8398 void SetHeader() { header.SetCmd<ValueType>(); } |
| 8399 |
| 8400 void Init(GLuint _program, GLuint _index, GLuint _binding) { |
| 8401 SetHeader(); |
| 8402 program = _program; |
| 8403 index = _index; |
| 8404 binding = _binding; |
| 8405 } |
| 8406 |
| 8407 void* Set(void* cmd, GLuint _program, GLuint _index, GLuint _binding) { |
| 8408 static_cast<ValueType*>(cmd)->Init(_program, _index, _binding); |
| 8409 return NextCmdAddress<ValueType>(cmd); |
| 8410 } |
| 8411 |
| 8412 gpu::CommandHeader header; |
| 8413 uint32_t program; |
| 8414 uint32_t index; |
| 8415 uint32_t binding; |
| 8416 }; |
| 8417 |
| 8418 static_assert(sizeof(UniformBlockBinding) == 16, |
| 8419 "size of UniformBlockBinding should be 16"); |
| 8420 static_assert(offsetof(UniformBlockBinding, header) == 0, |
| 8421 "offset of UniformBlockBinding header should be 0"); |
| 8422 static_assert(offsetof(UniformBlockBinding, program) == 4, |
| 8423 "offset of UniformBlockBinding program should be 4"); |
| 8424 static_assert(offsetof(UniformBlockBinding, index) == 8, |
| 8425 "offset of UniformBlockBinding index should be 8"); |
| 8426 static_assert(offsetof(UniformBlockBinding, binding) == 12, |
| 8427 "offset of UniformBlockBinding binding should be 12"); |
| 8428 |
8388 struct UniformMatrix2fvImmediate { | 8429 struct UniformMatrix2fvImmediate { |
8389 typedef UniformMatrix2fvImmediate ValueType; | 8430 typedef UniformMatrix2fvImmediate ValueType; |
8390 static const CommandId kCmdId = kUniformMatrix2fvImmediate; | 8431 static const CommandId kCmdId = kUniformMatrix2fvImmediate; |
8391 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; | 8432 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
8392 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 8433 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
8393 | 8434 |
8394 static uint32_t ComputeDataSize(GLsizei count) { | 8435 static uint32_t ComputeDataSize(GLsizei count) { |
8395 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT | 8436 return static_cast<uint32_t>(sizeof(GLfloat) * 4 * count); // NOLINT |
8396 } | 8437 } |
8397 | 8438 |
(...skipping 3974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12372 | 12413 |
12373 gpu::CommandHeader header; | 12414 gpu::CommandHeader header; |
12374 }; | 12415 }; |
12375 | 12416 |
12376 static_assert(sizeof(BlendBarrierKHR) == 4, | 12417 static_assert(sizeof(BlendBarrierKHR) == 4, |
12377 "size of BlendBarrierKHR should be 4"); | 12418 "size of BlendBarrierKHR should be 4"); |
12378 static_assert(offsetof(BlendBarrierKHR, header) == 0, | 12419 static_assert(offsetof(BlendBarrierKHR, header) == 0, |
12379 "offset of BlendBarrierKHR header should be 0"); | 12420 "offset of BlendBarrierKHR header should be 0"); |
12380 | 12421 |
12381 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 12422 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |