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 9981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9992 "size of UniformMatrix4x3fvImmediate should be 16"); | 9992 "size of UniformMatrix4x3fvImmediate should be 16"); |
9993 static_assert(offsetof(UniformMatrix4x3fvImmediate, header) == 0, | 9993 static_assert(offsetof(UniformMatrix4x3fvImmediate, header) == 0, |
9994 "offset of UniformMatrix4x3fvImmediate header should be 0"); | 9994 "offset of UniformMatrix4x3fvImmediate header should be 0"); |
9995 static_assert(offsetof(UniformMatrix4x3fvImmediate, location) == 4, | 9995 static_assert(offsetof(UniformMatrix4x3fvImmediate, location) == 4, |
9996 "offset of UniformMatrix4x3fvImmediate location should be 4"); | 9996 "offset of UniformMatrix4x3fvImmediate location should be 4"); |
9997 static_assert(offsetof(UniformMatrix4x3fvImmediate, count) == 8, | 9997 static_assert(offsetof(UniformMatrix4x3fvImmediate, count) == 8, |
9998 "offset of UniformMatrix4x3fvImmediate count should be 8"); | 9998 "offset of UniformMatrix4x3fvImmediate count should be 8"); |
9999 static_assert(offsetof(UniformMatrix4x3fvImmediate, transpose) == 12, | 9999 static_assert(offsetof(UniformMatrix4x3fvImmediate, transpose) == 12, |
10000 "offset of UniformMatrix4x3fvImmediate transpose should be 12"); | 10000 "offset of UniformMatrix4x3fvImmediate transpose should be 12"); |
10001 | 10001 |
| 10002 struct UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate { |
| 10003 typedef UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate ValueType; |
| 10004 static const CommandId kCmdId = |
| 10005 kUniformMatrix4fvWithCustomMatrixCHROMIUMImmediate; |
| 10006 static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN; |
| 10007 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 10008 |
| 10009 static uint32_t ComputeDataSize(GLsizei count) { |
| 10010 return static_cast<uint32_t>(sizeof(GLfloat) * 16 * count); // NOLINT |
| 10011 } |
| 10012 |
| 10013 static uint32_t ComputeSize(GLsizei count) { |
| 10014 return static_cast<uint32_t>(sizeof(ValueType) + |
| 10015 ComputeDataSize(count)); // NOLINT |
| 10016 } |
| 10017 |
| 10018 void SetHeader(GLsizei count) { |
| 10019 header.SetCmdByTotalSize<ValueType>(ComputeSize(count)); |
| 10020 } |
| 10021 |
| 10022 void Init(GLint _location, |
| 10023 GLsizei _count, |
| 10024 GLint _custom_matrix_id, |
| 10025 GLboolean _transpose, |
| 10026 const GLfloat* _default_value) { |
| 10027 SetHeader(_count); |
| 10028 location = _location; |
| 10029 count = _count; |
| 10030 custom_matrix_id = _custom_matrix_id; |
| 10031 transpose = _transpose; |
| 10032 memcpy(ImmediateDataAddress(this), _default_value, ComputeDataSize(_count)); |
| 10033 } |
| 10034 |
| 10035 void* Set(void* cmd, |
| 10036 GLint _location, |
| 10037 GLsizei _count, |
| 10038 GLint _custom_matrix_id, |
| 10039 GLboolean _transpose, |
| 10040 const GLfloat* _default_value) { |
| 10041 static_cast<ValueType*>(cmd)->Init(_location, _count, _custom_matrix_id, |
| 10042 _transpose, _default_value); |
| 10043 const uint32_t size = ComputeSize(_count); |
| 10044 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); |
| 10045 } |
| 10046 |
| 10047 gpu::CommandHeader header; |
| 10048 int32_t location; |
| 10049 int32_t count; |
| 10050 int32_t custom_matrix_id; |
| 10051 uint32_t transpose; |
| 10052 }; |
| 10053 |
| 10054 static_assert( |
| 10055 sizeof(UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate) == 20, |
| 10056 "size of UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate should be 20"); |
| 10057 static_assert(offsetof(UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate, |
| 10058 header) == 0, |
| 10059 "offset of UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate " |
| 10060 "header should be 0"); |
| 10061 static_assert(offsetof(UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate, |
| 10062 location) == 4, |
| 10063 "offset of UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate " |
| 10064 "location should be 4"); |
| 10065 static_assert(offsetof(UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate, |
| 10066 count) == 8, |
| 10067 "offset of UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate " |
| 10068 "count should be 8"); |
| 10069 static_assert(offsetof(UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate, |
| 10070 custom_matrix_id) == 12, |
| 10071 "offset of UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate " |
| 10072 "custom_matrix_id should be 12"); |
| 10073 static_assert(offsetof(UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate, |
| 10074 transpose) == 16, |
| 10075 "offset of UniformMatrix4fvWithCustomMatrixCHROMIUMImmediate " |
| 10076 "transpose should be 16"); |
| 10077 |
10002 struct UseProgram { | 10078 struct UseProgram { |
10003 typedef UseProgram ValueType; | 10079 typedef UseProgram ValueType; |
10004 static const CommandId kCmdId = kUseProgram; | 10080 static const CommandId kCmdId = kUseProgram; |
10005 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10081 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10006 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 10082 static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
10007 | 10083 |
10008 static uint32_t ComputeSize() { | 10084 static uint32_t ComputeSize() { |
10009 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10085 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10010 } | 10086 } |
10011 | 10087 |
(...skipping 5686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15698 static_assert(offsetof(GetFragDataIndexEXT, program) == 4, | 15774 static_assert(offsetof(GetFragDataIndexEXT, program) == 4, |
15699 "offset of GetFragDataIndexEXT program should be 4"); | 15775 "offset of GetFragDataIndexEXT program should be 4"); |
15700 static_assert(offsetof(GetFragDataIndexEXT, name_bucket_id) == 8, | 15776 static_assert(offsetof(GetFragDataIndexEXT, name_bucket_id) == 8, |
15701 "offset of GetFragDataIndexEXT name_bucket_id should be 8"); | 15777 "offset of GetFragDataIndexEXT name_bucket_id should be 8"); |
15702 static_assert(offsetof(GetFragDataIndexEXT, index_shm_id) == 12, | 15778 static_assert(offsetof(GetFragDataIndexEXT, index_shm_id) == 12, |
15703 "offset of GetFragDataIndexEXT index_shm_id should be 12"); | 15779 "offset of GetFragDataIndexEXT index_shm_id should be 12"); |
15704 static_assert(offsetof(GetFragDataIndexEXT, index_shm_offset) == 16, | 15780 static_assert(offsetof(GetFragDataIndexEXT, index_shm_offset) == 16, |
15705 "offset of GetFragDataIndexEXT index_shm_offset should be 16"); | 15781 "offset of GetFragDataIndexEXT index_shm_offset should be 16"); |
15706 | 15782 |
15707 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 15783 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |