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

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

Issue 2150993002: Revert of Always apply UniformMatrix4fvStreamTextureMatrixCHROMIUM matrix argument. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 15439 matching lines...) Expand 10 before | Expand all | Expand 10 after
15450 static uint32_t ComputeDataSize() { 15450 static uint32_t ComputeDataSize() {
15451 return static_cast<uint32_t>(sizeof(GLfloat) * 16); 15451 return static_cast<uint32_t>(sizeof(GLfloat) * 16);
15452 } 15452 }
15453 15453
15454 static uint32_t ComputeSize() { 15454 static uint32_t ComputeSize() {
15455 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize()); 15455 return static_cast<uint32_t>(sizeof(ValueType) + ComputeDataSize());
15456 } 15456 }
15457 15457
15458 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); } 15458 void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
15459 15459
15460 void Init(GLint _location, GLboolean _transpose, const GLfloat* _transform) { 15460 void Init(GLint _location,
15461 GLboolean _transpose,
15462 const GLfloat* _default_value) {
15461 SetHeader(); 15463 SetHeader();
15462 location = _location; 15464 location = _location;
15463 transpose = _transpose; 15465 transpose = _transpose;
15464 memcpy(ImmediateDataAddress(this), _transform, ComputeDataSize()); 15466 memcpy(ImmediateDataAddress(this), _default_value, ComputeDataSize());
15465 } 15467 }
15466 15468
15467 void* Set(void* cmd, 15469 void* Set(void* cmd,
15468 GLint _location, 15470 GLint _location,
15469 GLboolean _transpose, 15471 GLboolean _transpose,
15470 const GLfloat* _transform) { 15472 const GLfloat* _default_value) {
15471 static_cast<ValueType*>(cmd)->Init(_location, _transpose, _transform); 15473 static_cast<ValueType*>(cmd)->Init(_location, _transpose, _default_value);
15472 const uint32_t size = ComputeSize(); 15474 const uint32_t size = ComputeSize();
15473 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size); 15475 return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
15474 } 15476 }
15475 15477
15476 gpu::CommandHeader header; 15478 gpu::CommandHeader header;
15477 int32_t location; 15479 int32_t location;
15478 uint32_t transpose; 15480 uint32_t transpose;
15479 }; 15481 };
15480 15482
15481 static_assert(sizeof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate) == 15483 static_assert(sizeof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate) ==
15482 12, 15484 12,
15483 "size of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " 15485 "size of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
15484 "should be 12"); 15486 "should be 12");
15485 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, 15487 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate,
15486 header) == 0, 15488 header) == 0,
15487 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " 15489 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
15488 "header should be 0"); 15490 "header should be 0");
15489 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, 15491 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate,
15490 location) == 4, 15492 location) == 4,
15491 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " 15493 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
15492 "location should be 4"); 15494 "location should be 4");
15493 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate, 15495 static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate,
15494 transpose) == 8, 15496 transpose) == 8,
15495 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate " 15497 "offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
15496 "transpose should be 8"); 15498 "transpose should be 8");
15497 15499
15498 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 15500 #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