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

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 [If you wait by the river long enough, the bodies of your gyp files will float by] Created 4 years, 4 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 15534 matching lines...) Expand 10 before | Expand all | Expand 10 after
15545 static uint32_t ComputeDataSize() { 15545 static uint32_t ComputeDataSize() {
15546 return static_cast<uint32_t>(sizeof(GLfloat) * 16); 15546 return static_cast<uint32_t>(sizeof(GLfloat) * 16);
15547 } 15547 }
15548 15548
15549 static uint32_t ComputeSize() { 15549 static uint32_t ComputeSize() {
15550 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize()); 15550 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
15551 } 15551 }
15552 15552
15553 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } 15553 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
15554 15554
15555 void Init(GLint _location, 15555 void Init(GLint _location, GLboolean _transpose, const GLfloat* _transform) {
15556 GLboolean _transpose,
15557 const GLfloat* _default_value) {
15558 SetHeader(); 15556 SetHeader();
15559 location = _location; 15557 location = _location;
15560 transpose = _transpose; 15558 transpose = _transpose;
15561 memcpy(ImmediateDataAddress(this), _default_value, ComputeDataSize()); 15559 memcpy(ImmediateDataAddress(this), _transform, ComputeDataSize());
15562 } 15560 }
15563 15561
15564 void* Set(void* cmd, 15562 void* Set(void* cmd,
15565 GLint _location, 15563 GLint _location,
15566 GLboolean _transpose, 15564 GLboolean _transpose,
15567 const GLfloat* _default_value) { 15565 const GLfloat* _transform) {
15568 static_cast<ValueType*>(cmd)->Init(_location, _transpose, _default_value); 15566 static_cast<ValueType*>(cmd)->Init(_location, _transpose, _transform);
15569 const uint32_t size = ComputeSize(); 15567 const uint32_t size = ComputeSize();
15570 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); 15568 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
15571 } 15569 }
15572 15570
15573 gpu::CommandHeader header; 15571 gpu::CommandHeader header;
15574 int32_t location; 15572 int32_t location;
15575 uint32_t transpose; 15573 uint32_t transpose;
15576 }; 15574 };
15577 15575
15578 static_assert(sizeof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate) == 15576 static_assert(sizeof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate) ==
15579 12, 15577 12,
15580 "size of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " 15578 "size of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
15581 "should be 12"); 15579 "should be 12");
15582 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, 15580 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate,
15583 header) == 0, 15581 header) == 0,
15584 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " 15582 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
15585 "header should be 0"); 15583 "header should be 0");
15586 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, 15584 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate,
15587 location) == 4, 15585 location) == 4,
15588 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " 15586 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
15589 "location should be 4"); 15587 "location should be 4");
15590 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, 15588 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate,
15591 transpose) == 8, 15589 transpose) == 8,
15592 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " 15590 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
15593 "transpose should be 8"); 15591 "transpose should be 8");
15594 15592
15595 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 15593 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/cmd_buffer_functions.txt ('k') | gpu/command_buffer/service/gl_stream_texture_image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698