Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_format_autogen.h

Issue 1818073002: Always apply UniformMatrix4fvStreamTextureMatrixCHROMIUM matrix argument. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 15703 matching lines...) Expand 10 before | Expand all | Expand 10 after
15714 static uint32_t ComputeDataSize() { 15714 static uint32_t ComputeDataSize() {
15715 return static_cast<uint32_t>(sizeof(GLfloat) * 16); 15715 return static_cast<uint32_t>(sizeof(GLfloat) * 16);
15716 } 15716 }
15717 15717
15718 static uint32_t ComputeSize() { 15718 static uint32_t ComputeSize() {
15719 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize()); 15719 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
15720 } 15720 }
15721 15721
15722 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } 15722 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
15723 15723
15724 void Init(GLint _location, 15724 void Init(GLint _location, GLboolean _transpose, const GLfloat* _transform) {
15725 GLboolean _transpose,
15726 const GLfloat* _default_value) {
15727 SetHeader(); 15725 SetHeader();
15728 location = _location; 15726 location = _location;
15729 transpose = _transpose; 15727 transpose = _transpose;
15730 memcpy(ImmediateDataAddress(this), _default_value, ComputeDataSize()); 15728 memcpy(ImmediateDataAddress(this), _transform, ComputeDataSize());
15731 } 15729 }
15732 15730
15733 void* Set(void* cmd, 15731 void* Set(void* cmd,
15734 GLint _location, 15732 GLint _location,
15735 GLboolean _transpose, 15733 GLboolean _transpose,
15736 const GLfloat* _default_value) { 15734 const GLfloat* _transform) {
15737 static_cast<ValueType*>(cmd)->Init(_location, _transpose, _default_value); 15735 static_cast<ValueType*>(cmd)->Init(_location, _transpose, _transform);
15738 const uint32_t size = ComputeSize(); 15736 const uint32_t size = ComputeSize();
15739 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); 15737 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
15740 } 15738 }
15741 15739
15742 gpu::CommandHeader header; 15740 gpu::CommandHeader header;
15743 int32_t location; 15741 int32_t location;
15744 uint32_t transpose; 15742 uint32_t transpose;
15745 }; 15743 };
15746 15744
15747 static_assert(sizeof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate) == 15745 static_assert(sizeof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate) ==
15748 12, 15746 12,
15749 "size of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " 15747 "size of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
15750 "should be 12"); 15748 "should be 12");
15751 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, 15749 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate,
15752 header) == 0, 15750 header) == 0,
15753 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " 15751 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
15754 "header should be 0"); 15752 "header should be 0");
15755 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, 15753 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate,
15756 location) == 4, 15754 location) == 4,
15757 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " 15755 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
15758 "location should be 4"); 15756 "location should be 4");
15759 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, 15757 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate,
15760 transpose) == 8, 15758 transpose) == 8,
15761 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " 15759 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
15762 "transpose should be 8"); 15760 "transpose should be 8");
15763 15761
15764 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 15762 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698