OLD | NEW |
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 3211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3222 | 3222 |
3223 static uint32_t ComputeSize() { | 3223 static uint32_t ComputeSize() { |
3224 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 3224 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
3225 } | 3225 } |
3226 | 3226 |
3227 void SetHeader() { header.SetCmd<ValueType>(); } | 3227 void SetHeader() { header.SetCmd<ValueType>(); } |
3228 | 3228 |
3229 void Init(GLenum _target, | 3229 void Init(GLenum _target, |
3230 GLenum _attachment, | 3230 GLenum _attachment, |
3231 GLenum _textarget, | 3231 GLenum _textarget, |
3232 GLuint _texture) { | 3232 GLuint _texture, |
| 3233 GLint _level) { |
3233 SetHeader(); | 3234 SetHeader(); |
3234 target = _target; | 3235 target = _target; |
3235 attachment = _attachment; | 3236 attachment = _attachment; |
3236 textarget = _textarget; | 3237 textarget = _textarget; |
3237 texture = _texture; | 3238 texture = _texture; |
| 3239 level = _level; |
3238 } | 3240 } |
3239 | 3241 |
3240 void* Set(void* cmd, | 3242 void* Set(void* cmd, |
3241 GLenum _target, | 3243 GLenum _target, |
3242 GLenum _attachment, | 3244 GLenum _attachment, |
3243 GLenum _textarget, | 3245 GLenum _textarget, |
3244 GLuint _texture) { | 3246 GLuint _texture, |
| 3247 GLint _level) { |
3245 static_cast<ValueType*>(cmd) | 3248 static_cast<ValueType*>(cmd) |
3246 ->Init(_target, _attachment, _textarget, _texture); | 3249 ->Init(_target, _attachment, _textarget, _texture, _level); |
3247 return NextCmdAddress<ValueType>(cmd); | 3250 return NextCmdAddress<ValueType>(cmd); |
3248 } | 3251 } |
3249 | 3252 |
3250 gpu::CommandHeader header; | 3253 gpu::CommandHeader header; |
3251 uint32_t target; | 3254 uint32_t target; |
3252 uint32_t attachment; | 3255 uint32_t attachment; |
3253 uint32_t textarget; | 3256 uint32_t textarget; |
3254 uint32_t texture; | 3257 uint32_t texture; |
3255 static const int32_t level = 0; | 3258 int32_t level; |
3256 }; | 3259 }; |
3257 | 3260 |
3258 static_assert(sizeof(FramebufferTexture2D) == 20, | 3261 static_assert(sizeof(FramebufferTexture2D) == 24, |
3259 "size of FramebufferTexture2D should be 20"); | 3262 "size of FramebufferTexture2D should be 24"); |
3260 static_assert(offsetof(FramebufferTexture2D, header) == 0, | 3263 static_assert(offsetof(FramebufferTexture2D, header) == 0, |
3261 "offset of FramebufferTexture2D header should be 0"); | 3264 "offset of FramebufferTexture2D header should be 0"); |
3262 static_assert(offsetof(FramebufferTexture2D, target) == 4, | 3265 static_assert(offsetof(FramebufferTexture2D, target) == 4, |
3263 "offset of FramebufferTexture2D target should be 4"); | 3266 "offset of FramebufferTexture2D target should be 4"); |
3264 static_assert(offsetof(FramebufferTexture2D, attachment) == 8, | 3267 static_assert(offsetof(FramebufferTexture2D, attachment) == 8, |
3265 "offset of FramebufferTexture2D attachment should be 8"); | 3268 "offset of FramebufferTexture2D attachment should be 8"); |
3266 static_assert(offsetof(FramebufferTexture2D, textarget) == 12, | 3269 static_assert(offsetof(FramebufferTexture2D, textarget) == 12, |
3267 "offset of FramebufferTexture2D textarget should be 12"); | 3270 "offset of FramebufferTexture2D textarget should be 12"); |
3268 static_assert(offsetof(FramebufferTexture2D, texture) == 16, | 3271 static_assert(offsetof(FramebufferTexture2D, texture) == 16, |
3269 "offset of FramebufferTexture2D texture should be 16"); | 3272 "offset of FramebufferTexture2D texture should be 16"); |
| 3273 static_assert(offsetof(FramebufferTexture2D, level) == 20, |
| 3274 "offset of FramebufferTexture2D level should be 20"); |
3270 | 3275 |
3271 struct FramebufferTextureLayer { | 3276 struct FramebufferTextureLayer { |
3272 typedef FramebufferTextureLayer ValueType; | 3277 typedef FramebufferTextureLayer ValueType; |
3273 static const CommandId kCmdId = kFramebufferTextureLayer; | 3278 static const CommandId kCmdId = kFramebufferTextureLayer; |
3274 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 3279 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
3275 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); | 3280 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1); |
3276 | 3281 |
3277 static uint32_t ComputeSize() { | 3282 static uint32_t ComputeSize() { |
3278 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 3283 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
3279 } | 3284 } |
(...skipping 7631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10911 static uint32_t ComputeSize() { | 10916 static uint32_t ComputeSize() { |
10912 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10917 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10913 } | 10918 } |
10914 | 10919 |
10915 void SetHeader() { header.SetCmd<ValueType>(); } | 10920 void SetHeader() { header.SetCmd<ValueType>(); } |
10916 | 10921 |
10917 void Init(GLenum _target, | 10922 void Init(GLenum _target, |
10918 GLenum _attachment, | 10923 GLenum _attachment, |
10919 GLenum _textarget, | 10924 GLenum _textarget, |
10920 GLuint _texture, | 10925 GLuint _texture, |
| 10926 GLint _level, |
10921 GLsizei _samples) { | 10927 GLsizei _samples) { |
10922 SetHeader(); | 10928 SetHeader(); |
10923 target = _target; | 10929 target = _target; |
10924 attachment = _attachment; | 10930 attachment = _attachment; |
10925 textarget = _textarget; | 10931 textarget = _textarget; |
10926 texture = _texture; | 10932 texture = _texture; |
| 10933 level = _level; |
10927 samples = _samples; | 10934 samples = _samples; |
10928 } | 10935 } |
10929 | 10936 |
10930 void* Set(void* cmd, | 10937 void* Set(void* cmd, |
10931 GLenum _target, | 10938 GLenum _target, |
10932 GLenum _attachment, | 10939 GLenum _attachment, |
10933 GLenum _textarget, | 10940 GLenum _textarget, |
10934 GLuint _texture, | 10941 GLuint _texture, |
| 10942 GLint _level, |
10935 GLsizei _samples) { | 10943 GLsizei _samples) { |
10936 static_cast<ValueType*>(cmd) | 10944 static_cast<ValueType*>(cmd) |
10937 ->Init(_target, _attachment, _textarget, _texture, _samples); | 10945 ->Init(_target, _attachment, _textarget, _texture, _level, _samples); |
10938 return NextCmdAddress<ValueType>(cmd); | 10946 return NextCmdAddress<ValueType>(cmd); |
10939 } | 10947 } |
10940 | 10948 |
10941 gpu::CommandHeader header; | 10949 gpu::CommandHeader header; |
10942 uint32_t target; | 10950 uint32_t target; |
10943 uint32_t attachment; | 10951 uint32_t attachment; |
10944 uint32_t textarget; | 10952 uint32_t textarget; |
10945 uint32_t texture; | 10953 uint32_t texture; |
| 10954 int32_t level; |
10946 int32_t samples; | 10955 int32_t samples; |
10947 static const int32_t level = 0; | |
10948 }; | 10956 }; |
10949 | 10957 |
10950 static_assert(sizeof(FramebufferTexture2DMultisampleEXT) == 24, | 10958 static_assert(sizeof(FramebufferTexture2DMultisampleEXT) == 28, |
10951 "size of FramebufferTexture2DMultisampleEXT should be 24"); | 10959 "size of FramebufferTexture2DMultisampleEXT should be 28"); |
10952 static_assert( | 10960 static_assert( |
10953 offsetof(FramebufferTexture2DMultisampleEXT, header) == 0, | 10961 offsetof(FramebufferTexture2DMultisampleEXT, header) == 0, |
10954 "offset of FramebufferTexture2DMultisampleEXT header should be 0"); | 10962 "offset of FramebufferTexture2DMultisampleEXT header should be 0"); |
10955 static_assert( | 10963 static_assert( |
10956 offsetof(FramebufferTexture2DMultisampleEXT, target) == 4, | 10964 offsetof(FramebufferTexture2DMultisampleEXT, target) == 4, |
10957 "offset of FramebufferTexture2DMultisampleEXT target should be 4"); | 10965 "offset of FramebufferTexture2DMultisampleEXT target should be 4"); |
10958 static_assert( | 10966 static_assert( |
10959 offsetof(FramebufferTexture2DMultisampleEXT, attachment) == 8, | 10967 offsetof(FramebufferTexture2DMultisampleEXT, attachment) == 8, |
10960 "offset of FramebufferTexture2DMultisampleEXT attachment should be 8"); | 10968 "offset of FramebufferTexture2DMultisampleEXT attachment should be 8"); |
10961 static_assert( | 10969 static_assert( |
10962 offsetof(FramebufferTexture2DMultisampleEXT, textarget) == 12, | 10970 offsetof(FramebufferTexture2DMultisampleEXT, textarget) == 12, |
10963 "offset of FramebufferTexture2DMultisampleEXT textarget should be 12"); | 10971 "offset of FramebufferTexture2DMultisampleEXT textarget should be 12"); |
10964 static_assert( | 10972 static_assert( |
10965 offsetof(FramebufferTexture2DMultisampleEXT, texture) == 16, | 10973 offsetof(FramebufferTexture2DMultisampleEXT, texture) == 16, |
10966 "offset of FramebufferTexture2DMultisampleEXT texture should be 16"); | 10974 "offset of FramebufferTexture2DMultisampleEXT texture should be 16"); |
10967 static_assert( | 10975 static_assert( |
10968 offsetof(FramebufferTexture2DMultisampleEXT, samples) == 20, | 10976 offsetof(FramebufferTexture2DMultisampleEXT, level) == 20, |
10969 "offset of FramebufferTexture2DMultisampleEXT samples should be 20"); | 10977 "offset of FramebufferTexture2DMultisampleEXT level should be 20"); |
| 10978 static_assert( |
| 10979 offsetof(FramebufferTexture2DMultisampleEXT, samples) == 24, |
| 10980 "offset of FramebufferTexture2DMultisampleEXT samples should be 24"); |
10970 | 10981 |
10971 struct TexStorage2DEXT { | 10982 struct TexStorage2DEXT { |
10972 typedef TexStorage2DEXT ValueType; | 10983 typedef TexStorage2DEXT ValueType; |
10973 static const CommandId kCmdId = kTexStorage2DEXT; | 10984 static const CommandId kCmdId = kTexStorage2DEXT; |
10974 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10985 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10975 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); | 10986 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); |
10976 | 10987 |
10977 static uint32_t ComputeSize() { | 10988 static uint32_t ComputeSize() { |
10978 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10989 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10979 } | 10990 } |
(...skipping 4399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15379 gpu::CommandHeader header; | 15390 gpu::CommandHeader header; |
15380 }; | 15391 }; |
15381 | 15392 |
15382 static_assert(sizeof(ApplyScreenSpaceAntialiasingCHROMIUM) == 4, | 15393 static_assert(sizeof(ApplyScreenSpaceAntialiasingCHROMIUM) == 4, |
15383 "size of ApplyScreenSpaceAntialiasingCHROMIUM should be 4"); | 15394 "size of ApplyScreenSpaceAntialiasingCHROMIUM should be 4"); |
15384 static_assert( | 15395 static_assert( |
15385 offsetof(ApplyScreenSpaceAntialiasingCHROMIUM, header) == 0, | 15396 offsetof(ApplyScreenSpaceAntialiasingCHROMIUM, header) == 0, |
15386 "offset of ApplyScreenSpaceAntialiasingCHROMIUM header should be 0"); | 15397 "offset of ApplyScreenSpaceAntialiasingCHROMIUM header should be 0"); |
15387 | 15398 |
15388 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 15399 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |