OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 defines the GLES2 command buffer commands. | 5 // This file defines the GLES2 command buffer commands. |
6 | 6 |
7 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ | 7 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ |
8 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ | 8 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ |
9 | 9 |
10 | 10 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 uint32_t num_attribs; | 148 uint32_t num_attribs; |
149 uint32_t num_uniforms; | 149 uint32_t num_uniforms; |
150 // ProgramInput inputs[num_attribs + num_uniforms]; | 150 // ProgramInput inputs[num_attribs + num_uniforms]; |
151 }; | 151 }; |
152 | 152 |
153 // The data for one UniformBlock from GetProgramInfoCHROMIUM | 153 // The data for one UniformBlock from GetProgramInfoCHROMIUM |
154 struct UniformBlockInfo { | 154 struct UniformBlockInfo { |
155 uint32_t binding; // UNIFORM_BLOCK_BINDING | 155 uint32_t binding; // UNIFORM_BLOCK_BINDING |
156 uint32_t data_size; // UNIFORM_BLOCK_DATA_SIZE | 156 uint32_t data_size; // UNIFORM_BLOCK_DATA_SIZE |
157 uint32_t name_offset; // offset from UniformBlocksHeader to start of name. | 157 uint32_t name_offset; // offset from UniformBlocksHeader to start of name. |
158 uint32_t name_length; // UNIFORM_BLOCK_BLOCK_NAME_LENGTH | 158 uint32_t name_length; // UNIFORM_BLOCK_NAME_LENGTH |
159 uint32_t active_uniforms; // UNIFORM_BLOCK_ACTIVE_UNIFORMS | 159 uint32_t active_uniforms; // UNIFORM_BLOCK_ACTIVE_UNIFORMS |
160 // offset from UniformBlocksHeader to |active_uniforms| indices. | 160 // offset from UniformBlocksHeader to |active_uniforms| indices. |
161 uint32_t active_uniform_offset; | 161 uint32_t active_uniform_offset; |
162 // UNIFORM_BLOCK_REFERENDED_BY_VERTEX_SHADER | 162 // UNIFORM_BLOCK_REFERENDED_BY_VERTEX_SHADER |
163 uint32_t referenced_by_vertex_shader; | 163 uint32_t referenced_by_vertex_shader; |
164 // UNIFORM_BLOCK_REFERENDED_BY_FRAGMENT_SHADER | 164 // UNIFORM_BLOCK_REFERENDED_BY_FRAGMENT_SHADER |
165 uint32_t referenced_by_fragment_shader; | 165 uint32_t referenced_by_fragment_shader; |
166 }; | 166 }; |
167 | 167 |
168 // The format of the bucket filled out by GetUniformBlocksCHROMIUM | 168 // The format of the bucket filled out by GetUniformBlocksCHROMIUM |
169 struct UniformBlocksHeader { | 169 struct UniformBlocksHeader { |
170 uint32_t num_uniform_blocks; | 170 uint32_t num_uniform_blocks; |
171 // UniformBlockInfo uniform_blocks[num_uniform_blocks]; | 171 // UniformBlockInfo uniform_blocks[num_uniform_blocks]; |
172 }; | 172 }; |
173 | 173 |
| 174 // The data for one TransformFeedbackVarying from |
| 175 // GetTransformFeedbackVaringCHROMIUM. |
| 176 struct TransformFeedbackVaryingInfo { |
| 177 uint32_t size; |
| 178 uint32_t type; |
| 179 uint32_t name_offset; // offset from Header to start of name. |
| 180 uint32_t name_length; // including the null terminator. |
| 181 }; |
| 182 |
| 183 // The format of the bucket filled out by GetTransformFeedbackVaryingsCHROMIUM |
| 184 struct TransformFeedbackVaryingsHeader { |
| 185 uint32_t num_transform_feedback_varyings; |
| 186 // TransformFeedbackVaryingInfo varyings[num_transform_feedback_varyings]; |
| 187 }; |
| 188 |
| 189 // Parameters of a uniform that can be queried through glGetActiveUniformsiv, |
| 190 // but not through glGetActiveUniform. |
| 191 struct UniformES3Info { |
| 192 int32_t block_index; |
| 193 int32_t offset; |
| 194 int32_t array_stride; |
| 195 int32_t matrix_stride; |
| 196 int32_t is_row_major; |
| 197 }; |
| 198 |
| 199 // The format of the bucket filled out by GetUniformsivES3CHROMIUM |
| 200 struct UniformsES3Header { |
| 201 uint32_t num_uniforms; |
| 202 // UniformES3Info uniforms[num_uniforms]; |
| 203 }; |
| 204 |
174 // The format of QuerySync used by EXT_occlusion_query_boolean | 205 // The format of QuerySync used by EXT_occlusion_query_boolean |
175 struct QuerySync { | 206 struct QuerySync { |
176 void Reset() { | 207 void Reset() { |
177 process_count = 0; | 208 process_count = 0; |
178 result = 0; | 209 result = 0; |
179 } | 210 } |
180 | 211 |
181 base::subtle::Atomic32 process_count; | 212 base::subtle::Atomic32 process_count; |
182 uint64_t result; | 213 uint64_t result; |
183 }; | 214 }; |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 "offset of CreateAndConsumeTextureCHROMIUMImmediate.client_id should be 8"); | 355 "offset of CreateAndConsumeTextureCHROMIUMImmediate.client_id should be 8"); |
325 | 356 |
326 | 357 |
327 #pragma pack(pop) | 358 #pragma pack(pop) |
328 | 359 |
329 } // namespace cmd | 360 } // namespace cmd |
330 } // namespace gles2 | 361 } // namespace gles2 |
331 } // namespace gpu | 362 } // namespace gpu |
332 | 363 |
333 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ | 364 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ |
OLD | NEW |