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

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

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 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
11 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 11 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
12 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 12 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
13 13
14 #define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
15
14 struct ActiveTexture { 16 struct ActiveTexture {
15 typedef ActiveTexture ValueType; 17 typedef ActiveTexture ValueType;
16 static const CommandId kCmdId = kActiveTexture; 18 static const CommandId kCmdId = kActiveTexture;
17 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 19 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
18 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 20 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
19 21
20 static uint32_t ComputeSize() { 22 static uint32_t ComputeSize() {
21 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 23 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
22 } 24 }
23 25
(...skipping 2564 matching lines...) Expand 10 before | Expand all | Expand 10 after
2588 client_id = _client_id; 2590 client_id = _client_id;
2589 } 2591 }
2590 2592
2591 void* Set(void* cmd, uint32_t _client_id) { 2593 void* Set(void* cmd, uint32_t _client_id) {
2592 static_cast<ValueType*>(cmd)->Init(_client_id); 2594 static_cast<ValueType*>(cmd)->Init(_client_id);
2593 return NextCmdAddress<ValueType>(cmd); 2595 return NextCmdAddress<ValueType>(cmd);
2594 } 2596 }
2595 2597
2596 gpu::CommandHeader header; 2598 gpu::CommandHeader header;
2597 uint32_t client_id; 2599 uint32_t client_id;
2598 static const uint32_t condition = 0x9117; 2600 static const uint32_t condition = GL_SYNC_GPU_COMMANDS_COMPLETE;
2599 static const uint32_t flags = 0; 2601 static const uint32_t flags = 0;
2600 }; 2602 };
2601 2603
2602 static_assert(sizeof(FenceSync) == 8, "size of FenceSync should be 8"); 2604 static_assert(sizeof(FenceSync) == 8, "size of FenceSync should be 8");
2603 static_assert(offsetof(FenceSync, header) == 0, 2605 static_assert(offsetof(FenceSync, header) == 0,
2604 "offset of FenceSync header should be 0"); 2606 "offset of FenceSync header should be 0");
2605 static_assert(offsetof(FenceSync, client_id) == 4, 2607 static_assert(offsetof(FenceSync, client_id) == 4,
2606 "offset of FenceSync client_id should be 4"); 2608 "offset of FenceSync client_id should be 4");
2607 2609
2608 struct Finish { 2610 struct Finish {
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
3581 static_assert(sizeof(GetFloatv) == 16, "size of GetFloatv should be 16"); 3583 static_assert(sizeof(GetFloatv) == 16, "size of GetFloatv should be 16");
3582 static_assert(offsetof(GetFloatv, header) == 0, 3584 static_assert(offsetof(GetFloatv, header) == 0,
3583 "offset of GetFloatv header should be 0"); 3585 "offset of GetFloatv header should be 0");
3584 static_assert(offsetof(GetFloatv, pname) == 4, 3586 static_assert(offsetof(GetFloatv, pname) == 4,
3585 "offset of GetFloatv pname should be 4"); 3587 "offset of GetFloatv pname should be 4");
3586 static_assert(offsetof(GetFloatv, params_shm_id) == 8, 3588 static_assert(offsetof(GetFloatv, params_shm_id) == 8,
3587 "offset of GetFloatv params_shm_id should be 8"); 3589 "offset of GetFloatv params_shm_id should be 8");
3588 static_assert(offsetof(GetFloatv, params_shm_offset) == 12, 3590 static_assert(offsetof(GetFloatv, params_shm_offset) == 12,
3589 "offset of GetFloatv params_shm_offset should be 12"); 3591 "offset of GetFloatv params_shm_offset should be 12");
3590 3592
3593 struct GetFragDataLocation {
3594 typedef GetFragDataLocation ValueType;
3595 static const CommandId kCmdId = kGetFragDataLocation;
3596 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3597 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3598
3599 typedef GLint Result;
3600
3601 static uint32_t ComputeSize() {
3602 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
3603 }
3604
3605 void SetHeader() { header.SetCmd<ValueType>(); }
3606
3607 void Init(GLuint _program,
3608 uint32_t _name_bucket_id,
3609 uint32_t _location_shm_id,
3610 uint32_t _location_shm_offset) {
3611 SetHeader();
3612 program = _program;
3613 name_bucket_id = _name_bucket_id;
3614 location_shm_id = _location_shm_id;
3615 location_shm_offset = _location_shm_offset;
3616 }
3617
3618 void* Set(void* cmd,
3619 GLuint _program,
3620 uint32_t _name_bucket_id,
3621 uint32_t _location_shm_id,
3622 uint32_t _location_shm_offset) {
3623 static_cast<ValueType*>(cmd)->Init(_program, _name_bucket_id,
3624 _location_shm_id, _location_shm_offset);
3625 return NextCmdAddress<ValueType>(cmd);
3626 }
3627
3628 gpu::CommandHeader header;
3629 uint32_t program;
3630 uint32_t name_bucket_id;
3631 uint32_t location_shm_id;
3632 uint32_t location_shm_offset;
3633 };
3634
3635 static_assert(sizeof(GetFragDataLocation) == 20,
3636 "size of GetFragDataLocation should be 20");
3637 static_assert(offsetof(GetFragDataLocation, header) == 0,
3638 "offset of GetFragDataLocation header should be 0");
3639 static_assert(offsetof(GetFragDataLocation, program) == 4,
3640 "offset of GetFragDataLocation program should be 4");
3641 static_assert(offsetof(GetFragDataLocation, name_bucket_id) == 8,
3642 "offset of GetFragDataLocation name_bucket_id should be 8");
3643 static_assert(offsetof(GetFragDataLocation, location_shm_id) == 12,
3644 "offset of GetFragDataLocation location_shm_id should be 12");
3645 static_assert(offsetof(GetFragDataLocation, location_shm_offset) == 16,
3646 "offset of GetFragDataLocation location_shm_offset should be 16");
3647
3591 struct GetFramebufferAttachmentParameteriv { 3648 struct GetFramebufferAttachmentParameteriv {
3592 typedef GetFramebufferAttachmentParameteriv ValueType; 3649 typedef GetFramebufferAttachmentParameteriv ValueType;
3593 static const CommandId kCmdId = kGetFramebufferAttachmentParameteriv; 3650 static const CommandId kCmdId = kGetFramebufferAttachmentParameteriv;
3594 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 3651 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
3595 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 3652 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
3596 3653
3597 typedef SizedResult<GLint> Result; 3654 typedef SizedResult<GLint> Result;
3598 3655
3599 static uint32_t ComputeSize() { 3656 static uint32_t ComputeSize() {
3600 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 3657 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
(...skipping 8365 matching lines...) Expand 10 before | Expand all | Expand 10 after
11966 12023
11967 gpu::CommandHeader header; 12024 gpu::CommandHeader header;
11968 }; 12025 };
11969 12026
11970 static_assert(sizeof(BlendBarrierKHR) == 4, 12027 static_assert(sizeof(BlendBarrierKHR) == 4,
11971 "size of BlendBarrierKHR should be 4"); 12028 "size of BlendBarrierKHR should be 4");
11972 static_assert(offsetof(BlendBarrierKHR, header) == 0, 12029 static_assert(offsetof(BlendBarrierKHR, header) == 0,
11973 "offset of BlendBarrierKHR header should be 0"); 12030 "offset of BlendBarrierKHR header should be 0");
11974 12031
11975 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 12032 #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/common/gles2_cmd_format_test_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698