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 7575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10855 static uint32_t ComputeSize() { | 10860 static uint32_t ComputeSize() { |
10856 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10861 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10857 } | 10862 } |
10858 | 10863 |
10859 void SetHeader() { header.SetCmd<ValueType>(); } | 10864 void SetHeader() { header.SetCmd<ValueType>(); } |
10860 | 10865 |
10861 void Init(GLenum _target, | 10866 void Init(GLenum _target, |
10862 GLenum _attachment, | 10867 GLenum _attachment, |
10863 GLenum _textarget, | 10868 GLenum _textarget, |
10864 GLuint _texture, | 10869 GLuint _texture, |
| 10870 GLint _level, |
10865 GLsizei _samples) { | 10871 GLsizei _samples) { |
10866 SetHeader(); | 10872 SetHeader(); |
10867 target = _target; | 10873 target = _target; |
10868 attachment = _attachment; | 10874 attachment = _attachment; |
10869 textarget = _textarget; | 10875 textarget = _textarget; |
10870 texture = _texture; | 10876 texture = _texture; |
| 10877 level = _level; |
10871 samples = _samples; | 10878 samples = _samples; |
10872 } | 10879 } |
10873 | 10880 |
10874 void* Set(void* cmd, | 10881 void* Set(void* cmd, |
10875 GLenum _target, | 10882 GLenum _target, |
10876 GLenum _attachment, | 10883 GLenum _attachment, |
10877 GLenum _textarget, | 10884 GLenum _textarget, |
10878 GLuint _texture, | 10885 GLuint _texture, |
| 10886 GLint _level, |
10879 GLsizei _samples) { | 10887 GLsizei _samples) { |
10880 static_cast<ValueType*>(cmd) | 10888 static_cast<ValueType*>(cmd) |
10881 ->Init(_target, _attachment, _textarget, _texture, _samples); | 10889 ->Init(_target, _attachment, _textarget, _texture, _level, _samples); |
10882 return NextCmdAddress<ValueType>(cmd); | 10890 return NextCmdAddress<ValueType>(cmd); |
10883 } | 10891 } |
10884 | 10892 |
10885 gpu::CommandHeader header; | 10893 gpu::CommandHeader header; |
10886 uint32_t target; | 10894 uint32_t target; |
10887 uint32_t attachment; | 10895 uint32_t attachment; |
10888 uint32_t textarget; | 10896 uint32_t textarget; |
10889 uint32_t texture; | 10897 uint32_t texture; |
| 10898 int32_t level; |
10890 int32_t samples; | 10899 int32_t samples; |
10891 static const int32_t level = 0; | |
10892 }; | 10900 }; |
10893 | 10901 |
10894 static_assert(sizeof(FramebufferTexture2DMultisampleEXT) == 24, | 10902 static_assert(sizeof(FramebufferTexture2DMultisampleEXT) == 28, |
10895 "size of FramebufferTexture2DMultisampleEXT should be 24"); | 10903 "size of FramebufferTexture2DMultisampleEXT should be 28"); |
10896 static_assert( | 10904 static_assert( |
10897 offsetof(FramebufferTexture2DMultisampleEXT, header) == 0, | 10905 offsetof(FramebufferTexture2DMultisampleEXT, header) == 0, |
10898 "offset of FramebufferTexture2DMultisampleEXT header should be 0"); | 10906 "offset of FramebufferTexture2DMultisampleEXT header should be 0"); |
10899 static_assert( | 10907 static_assert( |
10900 offsetof(FramebufferTexture2DMultisampleEXT, target) == 4, | 10908 offsetof(FramebufferTexture2DMultisampleEXT, target) == 4, |
10901 "offset of FramebufferTexture2DMultisampleEXT target should be 4"); | 10909 "offset of FramebufferTexture2DMultisampleEXT target should be 4"); |
10902 static_assert( | 10910 static_assert( |
10903 offsetof(FramebufferTexture2DMultisampleEXT, attachment) == 8, | 10911 offsetof(FramebufferTexture2DMultisampleEXT, attachment) == 8, |
10904 "offset of FramebufferTexture2DMultisampleEXT attachment should be 8"); | 10912 "offset of FramebufferTexture2DMultisampleEXT attachment should be 8"); |
10905 static_assert( | 10913 static_assert( |
10906 offsetof(FramebufferTexture2DMultisampleEXT, textarget) == 12, | 10914 offsetof(FramebufferTexture2DMultisampleEXT, textarget) == 12, |
10907 "offset of FramebufferTexture2DMultisampleEXT textarget should be 12"); | 10915 "offset of FramebufferTexture2DMultisampleEXT textarget should be 12"); |
10908 static_assert( | 10916 static_assert( |
10909 offsetof(FramebufferTexture2DMultisampleEXT, texture) == 16, | 10917 offsetof(FramebufferTexture2DMultisampleEXT, texture) == 16, |
10910 "offset of FramebufferTexture2DMultisampleEXT texture should be 16"); | 10918 "offset of FramebufferTexture2DMultisampleEXT texture should be 16"); |
10911 static_assert( | 10919 static_assert( |
10912 offsetof(FramebufferTexture2DMultisampleEXT, samples) == 20, | 10920 offsetof(FramebufferTexture2DMultisampleEXT, level) == 20, |
10913 "offset of FramebufferTexture2DMultisampleEXT samples should be 20"); | 10921 "offset of FramebufferTexture2DMultisampleEXT level should be 20"); |
| 10922 static_assert( |
| 10923 offsetof(FramebufferTexture2DMultisampleEXT, samples) == 24, |
| 10924 "offset of FramebufferTexture2DMultisampleEXT samples should be 24"); |
10914 | 10925 |
10915 struct TexStorage2DEXT { | 10926 struct TexStorage2DEXT { |
10916 typedef TexStorage2DEXT ValueType; | 10927 typedef TexStorage2DEXT ValueType; |
10917 static const CommandId kCmdId = kTexStorage2DEXT; | 10928 static const CommandId kCmdId = kTexStorage2DEXT; |
10918 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 10929 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
10919 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); | 10930 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(2); |
10920 | 10931 |
10921 static uint32_t ComputeSize() { | 10932 static uint32_t ComputeSize() { |
10922 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 10933 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
10923 } | 10934 } |
(...skipping 3547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14471 | 14482 |
14472 gpu::CommandHeader header; | 14483 gpu::CommandHeader header; |
14473 }; | 14484 }; |
14474 | 14485 |
14475 static_assert(sizeof(BlendBarrierKHR) == 4, | 14486 static_assert(sizeof(BlendBarrierKHR) == 4, |
14476 "size of BlendBarrierKHR should be 4"); | 14487 "size of BlendBarrierKHR should be 4"); |
14477 static_assert(offsetof(BlendBarrierKHR, header) == 0, | 14488 static_assert(offsetof(BlendBarrierKHR, header) == 0, |
14478 "offset of BlendBarrierKHR header should be 0"); | 14489 "offset of BlendBarrierKHR header should be 0"); |
14479 | 14490 |
14480 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 14491 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |