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

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

Issue 1165553003: Fine tuning glGetInternalformativ. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 4606 matching lines...) Expand 10 before | Expand all | Expand 10 after
4617 4617
4618 static uint32_t ComputeSize() { 4618 static uint32_t ComputeSize() {
4619 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 4619 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
4620 } 4620 }
4621 4621
4622 void SetHeader() { header.SetCmd<ValueType>(); } 4622 void SetHeader() { header.SetCmd<ValueType>(); }
4623 4623
4624 void Init(GLenum _target, 4624 void Init(GLenum _target,
4625 GLenum _format, 4625 GLenum _format,
4626 GLenum _pname, 4626 GLenum _pname,
4627 GLsizei _bufSize,
4628 uint32_t _params_shm_id, 4627 uint32_t _params_shm_id,
4629 uint32_t _params_shm_offset) { 4628 uint32_t _params_shm_offset) {
4630 SetHeader(); 4629 SetHeader();
4631 target = _target; 4630 target = _target;
4632 format = _format; 4631 format = _format;
4633 pname = _pname; 4632 pname = _pname;
4634 bufSize = _bufSize;
4635 params_shm_id = _params_shm_id; 4633 params_shm_id = _params_shm_id;
4636 params_shm_offset = _params_shm_offset; 4634 params_shm_offset = _params_shm_offset;
4637 } 4635 }
4638 4636
4639 void* Set(void* cmd, 4637 void* Set(void* cmd,
4640 GLenum _target, 4638 GLenum _target,
4641 GLenum _format, 4639 GLenum _format,
4642 GLenum _pname, 4640 GLenum _pname,
4643 GLsizei _bufSize,
4644 uint32_t _params_shm_id, 4641 uint32_t _params_shm_id,
4645 uint32_t _params_shm_offset) { 4642 uint32_t _params_shm_offset) {
4646 static_cast<ValueType*>(cmd)->Init(_target, _format, _pname, _bufSize, 4643 static_cast<ValueType*>(cmd)
4647 _params_shm_id, _params_shm_offset); 4644 ->Init(_target, _format, _pname, _params_shm_id, _params_shm_offset);
4648 return NextCmdAddress<ValueType>(cmd); 4645 return NextCmdAddress<ValueType>(cmd);
4649 } 4646 }
4650 4647
4651 gpu::CommandHeader header; 4648 gpu::CommandHeader header;
4652 uint32_t target; 4649 uint32_t target;
4653 uint32_t format; 4650 uint32_t format;
4654 uint32_t pname; 4651 uint32_t pname;
4655 int32_t bufSize;
4656 uint32_t params_shm_id; 4652 uint32_t params_shm_id;
4657 uint32_t params_shm_offset; 4653 uint32_t params_shm_offset;
4658 }; 4654 };
4659 4655
4660 static_assert(sizeof(GetInternalformativ) == 28, 4656 static_assert(sizeof(GetInternalformativ) == 24,
4661 "size of GetInternalformativ should be 28"); 4657 "size of GetInternalformativ should be 24");
4662 static_assert(offsetof(GetInternalformativ, header) == 0, 4658 static_assert(offsetof(GetInternalformativ, header) == 0,
4663 "offset of GetInternalformativ header should be 0"); 4659 "offset of GetInternalformativ header should be 0");
4664 static_assert(offsetof(GetInternalformativ, target) == 4, 4660 static_assert(offsetof(GetInternalformativ, target) == 4,
4665 "offset of GetInternalformativ target should be 4"); 4661 "offset of GetInternalformativ target should be 4");
4666 static_assert(offsetof(GetInternalformativ, format) == 8, 4662 static_assert(offsetof(GetInternalformativ, format) == 8,
4667 "offset of GetInternalformativ format should be 8"); 4663 "offset of GetInternalformativ format should be 8");
4668 static_assert(offsetof(GetInternalformativ, pname) == 12, 4664 static_assert(offsetof(GetInternalformativ, pname) == 12,
4669 "offset of GetInternalformativ pname should be 12"); 4665 "offset of GetInternalformativ pname should be 12");
4670 static_assert(offsetof(GetInternalformativ, bufSize) == 16, 4666 static_assert(offsetof(GetInternalformativ, params_shm_id) == 16,
4671 "offset of GetInternalformativ bufSize should be 16"); 4667 "offset of GetInternalformativ params_shm_id should be 16");
4672 static_assert(offsetof(GetInternalformativ, params_shm_id) == 20, 4668 static_assert(offsetof(GetInternalformativ, params_shm_offset) == 20,
4673 "offset of GetInternalformativ params_shm_id should be 20"); 4669 "offset of GetInternalformativ params_shm_offset should be 20");
4674 static_assert(offsetof(GetInternalformativ, params_shm_offset) == 24,
4675 "offset of GetInternalformativ params_shm_offset should be 24");
4676 4670
4677 struct GetProgramiv { 4671 struct GetProgramiv {
4678 typedef GetProgramiv ValueType; 4672 typedef GetProgramiv ValueType;
4679 static const CommandId kCmdId = kGetProgramiv; 4673 static const CommandId kCmdId = kGetProgramiv;
4680 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 4674 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
4681 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 4675 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
4682 4676
4683 typedef SizedResult<GLint> Result; 4677 typedef SizedResult<GLint> Result;
4684 4678
4685 static uint32_t ComputeSize() { 4679 static uint32_t ComputeSize() {
(...skipping 9037 matching lines...) Expand 10 before | Expand all | Expand 10 after
13723 13717
13724 gpu::CommandHeader header; 13718 gpu::CommandHeader header;
13725 }; 13719 };
13726 13720
13727 static_assert(sizeof(BlendBarrierKHR) == 4, 13721 static_assert(sizeof(BlendBarrierKHR) == 4,
13728 "size of BlendBarrierKHR should be 4"); 13722 "size of BlendBarrierKHR should be 4");
13729 static_assert(offsetof(BlendBarrierKHR, header) == 0, 13723 static_assert(offsetof(BlendBarrierKHR, header) == 0,
13730 "offset of BlendBarrierKHR header should be 0"); 13724 "offset of BlendBarrierKHR header should be 0");
13731 13725
13732 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 13726 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698