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 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1766 "offset of CopyTexSubImage2D yoffset should be 16"); | 1766 "offset of CopyTexSubImage2D yoffset should be 16"); |
1767 static_assert(offsetof(CopyTexSubImage2D, x) == 20, | 1767 static_assert(offsetof(CopyTexSubImage2D, x) == 20, |
1768 "offset of CopyTexSubImage2D x should be 20"); | 1768 "offset of CopyTexSubImage2D x should be 20"); |
1769 static_assert(offsetof(CopyTexSubImage2D, y) == 24, | 1769 static_assert(offsetof(CopyTexSubImage2D, y) == 24, |
1770 "offset of CopyTexSubImage2D y should be 24"); | 1770 "offset of CopyTexSubImage2D y should be 24"); |
1771 static_assert(offsetof(CopyTexSubImage2D, width) == 28, | 1771 static_assert(offsetof(CopyTexSubImage2D, width) == 28, |
1772 "offset of CopyTexSubImage2D width should be 28"); | 1772 "offset of CopyTexSubImage2D width should be 28"); |
1773 static_assert(offsetof(CopyTexSubImage2D, height) == 32, | 1773 static_assert(offsetof(CopyTexSubImage2D, height) == 32, |
1774 "offset of CopyTexSubImage2D height should be 32"); | 1774 "offset of CopyTexSubImage2D height should be 32"); |
1775 | 1775 |
| 1776 struct CopyTexSubImage3D { |
| 1777 typedef CopyTexSubImage3D ValueType; |
| 1778 static const CommandId kCmdId = kCopyTexSubImage3D; |
| 1779 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 1780 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 1781 |
| 1782 static uint32_t ComputeSize() { |
| 1783 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 1784 } |
| 1785 |
| 1786 void SetHeader() { header.SetCmd<ValueType>(); } |
| 1787 |
| 1788 void Init(GLenum _target, |
| 1789 GLint _level, |
| 1790 GLint _xoffset, |
| 1791 GLint _yoffset, |
| 1792 GLint _zoffset, |
| 1793 GLint _x, |
| 1794 GLint _y, |
| 1795 GLsizei _width, |
| 1796 GLsizei _height) { |
| 1797 SetHeader(); |
| 1798 target = _target; |
| 1799 level = _level; |
| 1800 xoffset = _xoffset; |
| 1801 yoffset = _yoffset; |
| 1802 zoffset = _zoffset; |
| 1803 x = _x; |
| 1804 y = _y; |
| 1805 width = _width; |
| 1806 height = _height; |
| 1807 } |
| 1808 |
| 1809 void* Set(void* cmd, |
| 1810 GLenum _target, |
| 1811 GLint _level, |
| 1812 GLint _xoffset, |
| 1813 GLint _yoffset, |
| 1814 GLint _zoffset, |
| 1815 GLint _x, |
| 1816 GLint _y, |
| 1817 GLsizei _width, |
| 1818 GLsizei _height) { |
| 1819 static_cast<ValueType*>(cmd)->Init(_target, _level, _xoffset, _yoffset, |
| 1820 _zoffset, _x, _y, _width, _height); |
| 1821 return NextCmdAddress<ValueType>(cmd); |
| 1822 } |
| 1823 |
| 1824 gpu::CommandHeader header; |
| 1825 uint32_t target; |
| 1826 int32_t level; |
| 1827 int32_t xoffset; |
| 1828 int32_t yoffset; |
| 1829 int32_t zoffset; |
| 1830 int32_t x; |
| 1831 int32_t y; |
| 1832 int32_t width; |
| 1833 int32_t height; |
| 1834 }; |
| 1835 |
| 1836 static_assert(sizeof(CopyTexSubImage3D) == 40, |
| 1837 "size of CopyTexSubImage3D should be 40"); |
| 1838 static_assert(offsetof(CopyTexSubImage3D, header) == 0, |
| 1839 "offset of CopyTexSubImage3D header should be 0"); |
| 1840 static_assert(offsetof(CopyTexSubImage3D, target) == 4, |
| 1841 "offset of CopyTexSubImage3D target should be 4"); |
| 1842 static_assert(offsetof(CopyTexSubImage3D, level) == 8, |
| 1843 "offset of CopyTexSubImage3D level should be 8"); |
| 1844 static_assert(offsetof(CopyTexSubImage3D, xoffset) == 12, |
| 1845 "offset of CopyTexSubImage3D xoffset should be 12"); |
| 1846 static_assert(offsetof(CopyTexSubImage3D, yoffset) == 16, |
| 1847 "offset of CopyTexSubImage3D yoffset should be 16"); |
| 1848 static_assert(offsetof(CopyTexSubImage3D, zoffset) == 20, |
| 1849 "offset of CopyTexSubImage3D zoffset should be 20"); |
| 1850 static_assert(offsetof(CopyTexSubImage3D, x) == 24, |
| 1851 "offset of CopyTexSubImage3D x should be 24"); |
| 1852 static_assert(offsetof(CopyTexSubImage3D, y) == 28, |
| 1853 "offset of CopyTexSubImage3D y should be 28"); |
| 1854 static_assert(offsetof(CopyTexSubImage3D, width) == 32, |
| 1855 "offset of CopyTexSubImage3D width should be 32"); |
| 1856 static_assert(offsetof(CopyTexSubImage3D, height) == 36, |
| 1857 "offset of CopyTexSubImage3D height should be 36"); |
| 1858 |
1776 struct CreateProgram { | 1859 struct CreateProgram { |
1777 typedef CreateProgram ValueType; | 1860 typedef CreateProgram ValueType; |
1778 static const CommandId kCmdId = kCreateProgram; | 1861 static const CommandId kCmdId = kCreateProgram; |
1779 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 1862 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
1780 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 1863 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
1781 | 1864 |
1782 static uint32_t ComputeSize() { | 1865 static uint32_t ComputeSize() { |
1783 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 1866 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
1784 } | 1867 } |
1785 | 1868 |
(...skipping 5219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7005 "offset of TexSubImage3D format should be 36"); | 7088 "offset of TexSubImage3D format should be 36"); |
7006 static_assert(offsetof(TexSubImage3D, type) == 40, | 7089 static_assert(offsetof(TexSubImage3D, type) == 40, |
7007 "offset of TexSubImage3D type should be 40"); | 7090 "offset of TexSubImage3D type should be 40"); |
7008 static_assert(offsetof(TexSubImage3D, pixels_shm_id) == 44, | 7091 static_assert(offsetof(TexSubImage3D, pixels_shm_id) == 44, |
7009 "offset of TexSubImage3D pixels_shm_id should be 44"); | 7092 "offset of TexSubImage3D pixels_shm_id should be 44"); |
7010 static_assert(offsetof(TexSubImage3D, pixels_shm_offset) == 48, | 7093 static_assert(offsetof(TexSubImage3D, pixels_shm_offset) == 48, |
7011 "offset of TexSubImage3D pixels_shm_offset should be 48"); | 7094 "offset of TexSubImage3D pixels_shm_offset should be 48"); |
7012 static_assert(offsetof(TexSubImage3D, internal) == 52, | 7095 static_assert(offsetof(TexSubImage3D, internal) == 52, |
7013 "offset of TexSubImage3D internal should be 52"); | 7096 "offset of TexSubImage3D internal should be 52"); |
7014 | 7097 |
| 7098 struct TransformFeedbackVaryingsBucket { |
| 7099 typedef TransformFeedbackVaryingsBucket ValueType; |
| 7100 static const CommandId kCmdId = kTransformFeedbackVaryingsBucket; |
| 7101 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
| 7102 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
| 7103 |
| 7104 static uint32_t ComputeSize() { |
| 7105 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
| 7106 } |
| 7107 |
| 7108 void SetHeader() { header.SetCmd<ValueType>(); } |
| 7109 |
| 7110 void Init(GLuint _program, uint32_t _varyings_bucket_id, GLenum _buffermode) { |
| 7111 SetHeader(); |
| 7112 program = _program; |
| 7113 varyings_bucket_id = _varyings_bucket_id; |
| 7114 buffermode = _buffermode; |
| 7115 } |
| 7116 |
| 7117 void* Set(void* cmd, |
| 7118 GLuint _program, |
| 7119 uint32_t _varyings_bucket_id, |
| 7120 GLenum _buffermode) { |
| 7121 static_cast<ValueType*>(cmd) |
| 7122 ->Init(_program, _varyings_bucket_id, _buffermode); |
| 7123 return NextCmdAddress<ValueType>(cmd); |
| 7124 } |
| 7125 |
| 7126 gpu::CommandHeader header; |
| 7127 uint32_t program; |
| 7128 uint32_t varyings_bucket_id; |
| 7129 uint32_t buffermode; |
| 7130 }; |
| 7131 |
| 7132 static_assert(sizeof(TransformFeedbackVaryingsBucket) == 16, |
| 7133 "size of TransformFeedbackVaryingsBucket should be 16"); |
| 7134 static_assert(offsetof(TransformFeedbackVaryingsBucket, header) == 0, |
| 7135 "offset of TransformFeedbackVaryingsBucket header should be 0"); |
| 7136 static_assert(offsetof(TransformFeedbackVaryingsBucket, program) == 4, |
| 7137 "offset of TransformFeedbackVaryingsBucket program should be 4"); |
| 7138 static_assert( |
| 7139 offsetof(TransformFeedbackVaryingsBucket, varyings_bucket_id) == 8, |
| 7140 "offset of TransformFeedbackVaryingsBucket varyings_bucket_id should be 8"); |
| 7141 static_assert( |
| 7142 offsetof(TransformFeedbackVaryingsBucket, buffermode) == 12, |
| 7143 "offset of TransformFeedbackVaryingsBucket buffermode should be 12"); |
| 7144 |
7015 struct Uniform1f { | 7145 struct Uniform1f { |
7016 typedef Uniform1f ValueType; | 7146 typedef Uniform1f ValueType; |
7017 static const CommandId kCmdId = kUniform1f; | 7147 static const CommandId kCmdId = kUniform1f; |
7018 static const cmd::ArgFlags kArgFlags = cmd::kFixed; | 7148 static const cmd::ArgFlags kArgFlags = cmd::kFixed; |
7019 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); | 7149 static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3); |
7020 | 7150 |
7021 static uint32_t ComputeSize() { | 7151 static uint32_t ComputeSize() { |
7022 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT | 7152 return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT |
7023 } | 7153 } |
7024 | 7154 |
(...skipping 4998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12023 | 12153 |
12024 gpu::CommandHeader header; | 12154 gpu::CommandHeader header; |
12025 }; | 12155 }; |
12026 | 12156 |
12027 static_assert(sizeof(BlendBarrierKHR) == 4, | 12157 static_assert(sizeof(BlendBarrierKHR) == 4, |
12028 "size of BlendBarrierKHR should be 4"); | 12158 "size of BlendBarrierKHR should be 4"); |
12029 static_assert(offsetof(BlendBarrierKHR, header) == 0, | 12159 static_assert(offsetof(BlendBarrierKHR, header) == 0, |
12030 "offset of BlendBarrierKHR header should be 0"); | 12160 "offset of BlendBarrierKHR header should be 0"); |
12031 | 12161 |
12032 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ | 12162 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_ |
OLD | NEW |