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

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

Issue 2029803002: Improve CopyTex{Sub}Image2D format validation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 uint64_t v64, uint32_t* v32_0, uint32_t* v32_1); 232 uint64_t v64, uint32_t* v32_0, uint32_t* v32_1);
233 static uint64_t MapTwoUint32ToUint64(uint32_t v32_0, uint32_t v32_1); 233 static uint64_t MapTwoUint32ToUint64(uint32_t v32_0, uint32_t v32_1);
234 234
235 static uint32_t MapBufferTargetToBindingEnum(uint32_t target); 235 static uint32_t MapBufferTargetToBindingEnum(uint32_t target);
236 236
237 static bool IsUnsignedIntegerFormat(uint32_t internal_format); 237 static bool IsUnsignedIntegerFormat(uint32_t internal_format);
238 static bool IsSignedIntegerFormat(uint32_t internal_format); 238 static bool IsSignedIntegerFormat(uint32_t internal_format);
239 static bool IsIntegerFormat(uint32_t internal_format); 239 static bool IsIntegerFormat(uint32_t internal_format);
240 static bool IsFloatFormat(uint32_t internal_format); 240 static bool IsFloatFormat(uint32_t internal_format);
241 241
242 static bool IsSizedColorFormat(uint32_t internal_format);
243 static void GetColorFormatComponentSizes(
244 uint32_t internal_format, uint32_t type, int* r, int* g, int* b, int* a);
245
242 // Computes the data size for certain gl commands like glUniform. 246 // Computes the data size for certain gl commands like glUniform.
243 static bool ComputeDataSize(uint32_t count, 247 static bool ComputeDataSize(uint32_t count,
244 size_t size, 248 size_t size,
245 unsigned int elements_per_unit, 249 unsigned int elements_per_unit,
246 uint32_t* dst); 250 uint32_t* dst);
247 251
248 #include "../common/gles2_cmd_utils_autogen.h" 252 #include "../common/gles2_cmd_utils_autogen.h"
249 253
250 private: 254 private:
251 static std::string GetQualifiedEnumString( 255 static std::string GetQualifiedEnumString(
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 bool fail_if_major_perf_caveat; 320 bool fail_if_major_perf_caveat;
317 bool lose_context_when_out_of_memory; 321 bool lose_context_when_out_of_memory;
318 ContextType context_type; 322 ContextType context_type;
319 }; 323 };
320 324
321 } // namespace gles2 325 } // namespace gles2
322 } // namespace gpu 326 } // namespace gpu
323 327
324 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_ 328 #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_H_
325 329
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | gpu/command_buffer/common/gles2_cmd_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698