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

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

Issue 1708983002: Command buffer: Fix bugs for drawing when the type of vertex attrib is a packed type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 is here so other GLES2 related files can have a common set of 5 // This file is here so other GLES2 related files can have a common set of
6 // includes where appropriate. 6 // includes where appropriate.
7 7
8 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ 8 #ifndef GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_
9 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ 9 #define GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_
10 10
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 static size_t RenderbufferBytesPerPixel(int format); 149 static size_t RenderbufferBytesPerPixel(int format);
150 150
151 // Return the element's number of bytes. 151 // Return the element's number of bytes.
152 // For example, GL_FLOAT_MAT3 returns sizeof(GLfloat). 152 // For example, GL_FLOAT_MAT3 returns sizeof(GLfloat).
153 static uint32_t GetElementSizeForUniformType(int type); 153 static uint32_t GetElementSizeForUniformType(int type);
154 // Return the number of elements. 154 // Return the number of elements.
155 // For example, GL_FLOAT_MAT3 returns 9. 155 // For example, GL_FLOAT_MAT3 returns 9.
156 static uint32_t GetElementCountForUniformType(int type); 156 static uint32_t GetElementCountForUniformType(int type);
157 157
158 static size_t GetGLTypeSizeForTexturesAndBuffers(uint32_t type); 158 static size_t GetGLTypeSizeForBuffers(uint32_t type);
159
160 static size_t GetGroupSizeForBufferType(uint32_t count, uint32_t type);
159 161
160 static size_t GetGLTypeSizeForPathCoordType(uint32_t type); 162 static size_t GetGLTypeSizeForPathCoordType(uint32_t type);
161 163
162 static uint32_t GLErrorToErrorBit(uint32_t gl_error); 164 static uint32_t GLErrorToErrorBit(uint32_t gl_error);
163 165
164 static size_t GetComponentCountForGLTransformType(uint32_t type); 166 static size_t GetComponentCountForGLTransformType(uint32_t type);
165 static size_t GetGLTypeSizeForGLPathNameType(uint32_t type); 167 static size_t GetGLTypeSizeForGLPathNameType(uint32_t type);
166 168
167 static size_t GetCoefficientCountForGLPathFragmentInputGenMode( 169 static size_t GetCoefficientCountForGLPathFragmentInputGenMode(
168 uint32_t gen_mode); 170 uint32_t gen_mode);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 bool fail_if_major_perf_caveat; 287 bool fail_if_major_perf_caveat;
286 bool lose_context_when_out_of_memory; 288 bool lose_context_when_out_of_memory;
287 ContextType context_type; 289 ContextType context_type;
288 }; 290 };
289 291
290 } // namespace gles2 292 } // namespace gles2
291 } // namespace gpu 293 } // namespace gpu
292 294
293 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ 295 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_
294 296
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/vertex_array_object_manager.cc ('k') | gpu/command_buffer/common/gles2_cmd_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698