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 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 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 10921 matching lines...) Expand 10 before | Expand all | Expand 10 after
10932 "size of EnableFeatureCHROMIUM should be 16"); 10932 "size of EnableFeatureCHROMIUM should be 16");
10933 static_assert(offsetof(EnableFeatureCHROMIUM, header) == 0, 10933 static_assert(offsetof(EnableFeatureCHROMIUM, header) == 0,
10934 "offset of EnableFeatureCHROMIUM header should be 0"); 10934 "offset of EnableFeatureCHROMIUM header should be 0");
10935 static_assert(offsetof(EnableFeatureCHROMIUM, bucket_id) == 4, 10935 static_assert(offsetof(EnableFeatureCHROMIUM, bucket_id) == 4,
10936 "offset of EnableFeatureCHROMIUM bucket_id should be 4"); 10936 "offset of EnableFeatureCHROMIUM bucket_id should be 4");
10937 static_assert(offsetof(EnableFeatureCHROMIUM, result_shm_id) == 8, 10937 static_assert(offsetof(EnableFeatureCHROMIUM, result_shm_id) == 8,
10938 "offset of EnableFeatureCHROMIUM result_shm_id should be 8"); 10938 "offset of EnableFeatureCHROMIUM result_shm_id should be 8");
10939 static_assert(offsetof(EnableFeatureCHROMIUM, result_shm_offset) == 12, 10939 static_assert(offsetof(EnableFeatureCHROMIUM, result_shm_offset) == 12,
10940 "offset of EnableFeatureCHROMIUM result_shm_offset should be 12"); 10940 "offset of EnableFeatureCHROMIUM result_shm_offset should be 12");
10941 10941
10942 struct MapBufferRange {
10943 typedef MapBufferRange ValueType;
10944 static const CommandId kCmdId = kMapBufferRange;
10945 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10946 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10947
10948 typedef uint32_t Result;
10949
10950 static uint32_t ComputeSize() {
10951 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10952 }
10953
10954 void SetHeader() { header.SetCmd<ValueType>(); }
10955
10956 void Init(GLenum _target,
10957 GLintptr _offset,
10958 GLsizeiptr _size,
10959 GLbitfield _access,
10960 uint32_t _data_shm_id,
10961 uint32_t _data_shm_offset,
10962 uint32_t _result_shm_id,
10963 uint32_t _result_shm_offset) {
10964 SetHeader();
10965 target = _target;
10966 offset = _offset;
10967 size = _size;
10968 access = _access;
10969 data_shm_id = _data_shm_id;
10970 data_shm_offset = _data_shm_offset;
10971 result_shm_id = _result_shm_id;
10972 result_shm_offset = _result_shm_offset;
10973 }
10974
10975 void* Set(void* cmd,
10976 GLenum _target,
10977 GLintptr _offset,
10978 GLsizeiptr _size,
10979 GLbitfield _access,
10980 uint32_t _data_shm_id,
10981 uint32_t _data_shm_offset,
10982 uint32_t _result_shm_id,
10983 uint32_t _result_shm_offset) {
10984 static_cast<ValueType*>(cmd)->Init(_target, _offset, _size, _access,
10985 _data_shm_id, _data_shm_offset,
10986 _result_shm_id, _result_shm_offset);
10987 return NextCmdAddress<ValueType>(cmd);
10988 }
10989
10990 gpu::CommandHeader header;
10991 uint32_t target;
10992 int32_t offset;
10993 int32_t size;
10994 uint32_t access;
10995 uint32_t data_shm_id;
10996 uint32_t data_shm_offset;
10997 uint32_t result_shm_id;
10998 uint32_t result_shm_offset;
10999 };
11000
11001 static_assert(sizeof(MapBufferRange) == 36,
11002 "size of MapBufferRange should be 36");
11003 static_assert(offsetof(MapBufferRange, header) == 0,
11004 "offset of MapBufferRange header should be 0");
11005 static_assert(offsetof(MapBufferRange, target) == 4,
11006 "offset of MapBufferRange target should be 4");
11007 static_assert(offsetof(MapBufferRange, offset) == 8,
11008 "offset of MapBufferRange offset should be 8");
11009 static_assert(offsetof(MapBufferRange, size) == 12,
11010 "offset of MapBufferRange size should be 12");
11011 static_assert(offsetof(MapBufferRange, access) == 16,
11012 "offset of MapBufferRange access should be 16");
11013 static_assert(offsetof(MapBufferRange, data_shm_id) == 20,
11014 "offset of MapBufferRange data_shm_id should be 20");
11015 static_assert(offsetof(MapBufferRange, data_shm_offset) == 24,
11016 "offset of MapBufferRange data_shm_offset should be 24");
11017 static_assert(offsetof(MapBufferRange, result_shm_id) == 28,
11018 "offset of MapBufferRange result_shm_id should be 28");
11019 static_assert(offsetof(MapBufferRange, result_shm_offset) == 32,
11020 "offset of MapBufferRange result_shm_offset should be 32");
11021
11022 struct UnmapBuffer {
11023 typedef UnmapBuffer ValueType;
11024 static const CommandId kCmdId = kUnmapBuffer;
11025 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
11026 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
11027
11028 static uint32_t ComputeSize() {
11029 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
11030 }
11031
11032 void SetHeader() { header.SetCmd<ValueType>(); }
11033
11034 void Init(GLenum _target) {
11035 SetHeader();
11036 target = _target;
11037 }
11038
11039 void* Set(void* cmd, GLenum _target) {
11040 static_cast<ValueType*>(cmd)->Init(_target);
11041 return NextCmdAddress<ValueType>(cmd);
11042 }
11043
11044 gpu::CommandHeader header;
11045 uint32_t target;
11046 };
11047
11048 static_assert(sizeof(UnmapBuffer) == 8, "size of UnmapBuffer should be 8");
11049 static_assert(offsetof(UnmapBuffer, header) == 0,
11050 "offset of UnmapBuffer header should be 0");
11051 static_assert(offsetof(UnmapBuffer, target) == 4,
11052 "offset of UnmapBuffer target should be 4");
11053
10942 struct ResizeCHROMIUM { 11054 struct ResizeCHROMIUM {
10943 typedef ResizeCHROMIUM ValueType; 11055 typedef ResizeCHROMIUM ValueType;
10944 static const CommandId kCmdId = kResizeCHROMIUM; 11056 static const CommandId kCmdId = kResizeCHROMIUM;
10945 static const cmd::ArgFlags kArgFlags = cmd::kFixed; 11057 static const cmd::ArgFlags kArgFlags = cmd::kFixed;
10946 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); 11058 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
10947 11059
10948 static uint32_t ComputeSize() { 11060 static uint32_t ComputeSize() {
10949 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT 11061 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
10950 } 11062 }
10951 11063
(...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after
12913 13025
12914 gpu::CommandHeader header; 13026 gpu::CommandHeader header;
12915 }; 13027 };
12916 13028
12917 static_assert(sizeof(BlendBarrierKHR) == 4, 13029 static_assert(sizeof(BlendBarrierKHR) == 4,
12918 "size of BlendBarrierKHR should be 4"); 13030 "size of BlendBarrierKHR should be 4");
12919 static_assert(offsetof(BlendBarrierKHR, header) == 0, 13031 static_assert(offsetof(BlendBarrierKHR, header) == 0,
12920 "offset of BlendBarrierKHR header should be 0"); 13032 "offset of BlendBarrierKHR header should be 0");
12921 13033
12922 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ 13034 #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