Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_format.h

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 (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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 }; 143 };
144 144
145 // The format of the bucket filled out by GetProgramInfoCHROMIUM 145 // The format of the bucket filled out by GetProgramInfoCHROMIUM
146 struct ProgramInfoHeader { 146 struct ProgramInfoHeader {
147 uint32_t link_status; 147 uint32_t link_status;
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
154 struct UniformBlockInfo {
155 uint32_t binding; // UNIFORM_BLOCK_BINDING
156 uint32_t data_size; // UNIFORM_BLOCK_DATA_SIZE
157 uint32_t name_offset; // offset from UniformBlocksHeader to start of name.
158 uint32_t name_length; // UNIFORM_BLOCK_BLOCK_NAME_LENGTH
159 uint32_t active_uniforms; // UNIFORM_BLOCK_ACTIVE_UNIFORMS
160 // offset from UniformBlocksHeader to |active_uniforms| indices.
161 uint32_t active_uniform_offset;
162 // UNIFORM_BLOCK_REFERENDED_BY_VERTEX_SHADER
163 uint32_t referenced_by_vertex_shader;
164 // UNIFORM_BLOCK_REFERENDED_BY_FRAGMENT_SHADER
165 uint32_t referenced_by_fragment_shader;
166 };
167
168 // The format of the bucket filled out by GetUniformBlocksCHROMIUM
169 struct UniformBlocksHeader {
170 uint32_t num_uniform_blocks;
171 // UniformBlockInfo uniform_blocks[num_uniform_blocks];
172 };
173
153 // The format of QuerySync used by EXT_occlusion_query_boolean 174 // The format of QuerySync used by EXT_occlusion_query_boolean
154 struct QuerySync { 175 struct QuerySync {
155 void Reset() { 176 void Reset() {
156 process_count = 0; 177 process_count = 0;
157 result = 0; 178 result = 0;
158 } 179 }
159 180
160 base::subtle::Atomic32 process_count; 181 base::subtle::Atomic32 process_count;
161 uint64_t result; 182 uint64_t result;
162 }; 183 };
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 215
195 static_assert(sizeof(ProgramInfoHeader) == 12, 216 static_assert(sizeof(ProgramInfoHeader) == 12,
196 "size of ProgramInfoHeader should be 12"); 217 "size of ProgramInfoHeader should be 12");
197 static_assert(offsetof(ProgramInfoHeader, link_status) == 0, 218 static_assert(offsetof(ProgramInfoHeader, link_status) == 0,
198 "offset of ProgramInfoHeader.link_status should be 0"); 219 "offset of ProgramInfoHeader.link_status should be 0");
199 static_assert(offsetof(ProgramInfoHeader, num_attribs) == 4, 220 static_assert(offsetof(ProgramInfoHeader, num_attribs) == 4,
200 "offset of ProgramInfoHeader.num_attribs should be 4"); 221 "offset of ProgramInfoHeader.num_attribs should be 4");
201 static_assert(offsetof(ProgramInfoHeader, num_uniforms) == 8, 222 static_assert(offsetof(ProgramInfoHeader, num_uniforms) == 8,
202 "offset of ProgramInfoHeader.num_uniforms should be 8"); 223 "offset of ProgramInfoHeader.num_uniforms should be 8");
203 224
225 static_assert(sizeof(UniformBlockInfo) == 32,
226 "size of UniformBlockInfo should be 32");
227 static_assert(offsetof(UniformBlockInfo, binding) == 0,
228 "offset of UniformBlockInfo.binding should be 0");
229 static_assert(offsetof(UniformBlockInfo, data_size) == 4,
230 "offset of UniformBlockInfo.data_size should be 4");
231 static_assert(offsetof(UniformBlockInfo, name_offset) == 8,
232 "offset of UniformBlockInfo.name_offset should be 8");
233 static_assert(offsetof(UniformBlockInfo, name_length) == 12,
234 "offset of UniformBlockInfo.name_length should be 12");
235 static_assert(offsetof(UniformBlockInfo, active_uniforms) == 16,
236 "offset of UniformBlockInfo.active_uniforms should be 16");
237 static_assert(offsetof(UniformBlockInfo, active_uniform_offset) == 20,
238 "offset of UniformBlockInfo.active_uniform_offset should be 20");
239 static_assert(offsetof(UniformBlockInfo, referenced_by_vertex_shader) == 24,
240 "offset of UniformBlockInfo.referenced_by_vertex_shader "
241 "should be 24");
242 static_assert(offsetof(UniformBlockInfo, referenced_by_fragment_shader) == 28,
243 "offset of UniformBlockInfo.referenced_by_fragment_shader "
244 "should be 28");
245
246 static_assert(sizeof(UniformBlocksHeader) == 4,
247 "size of UniformBlocksHeader should be 4");
248 static_assert(offsetof(UniformBlocksHeader, num_uniform_blocks) == 0,
249 "offset of UniformBlocksHeader.num_uniform_blocks should be 0");
250
204 namespace cmds { 251 namespace cmds {
205 252
206 #include "../common/gles2_cmd_format_autogen.h" 253 #include "../common/gles2_cmd_format_autogen.h"
207 254
208 // These are hand written commands. 255 // These are hand written commands.
209 // TODO(gman): Attempt to make these auto-generated. 256 // TODO(gman): Attempt to make these auto-generated.
210 257
211 struct GenMailboxCHROMIUM { 258 struct GenMailboxCHROMIUM {
212 typedef GenMailboxCHROMIUM ValueType; 259 typedef GenMailboxCHROMIUM ValueType;
213 static const CommandId kCmdId = kGenMailboxCHROMIUM; 260 static const CommandId kCmdId = kGenMailboxCHROMIUM;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 "offset of CreateAndConsumeTextureCHROMIUMImmediate.client_id should be 8"); 324 "offset of CreateAndConsumeTextureCHROMIUMImmediate.client_id should be 8");
278 325
279 326
280 #pragma pack(pop) 327 #pragma pack(pop)
281 328
282 } // namespace cmd 329 } // namespace cmd
283 } // namespace gles2 330 } // namespace gles2
284 } // namespace gpu 331 } // namespace gpu
285 332
286 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_ 333 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/cmd_buffer_functions.txt ('k') | gpu/command_buffer/common/gles2_cmd_format_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698