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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h

Issue 1605323004: Check if internal_format is valid for GenerateMipmap(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 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 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 }; 1185 };
1186 1186
1187 static const GLenum valid_texture_parameter_table_es3[] = { 1187 static const GLenum valid_texture_parameter_table_es3[] = {
1188 GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_COMPARE_FUNC, 1188 GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_COMPARE_FUNC,
1189 GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_IMMUTABLE_FORMAT, 1189 GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_IMMUTABLE_FORMAT,
1190 GL_TEXTURE_IMMUTABLE_LEVELS, GL_TEXTURE_MAX_LEVEL, 1190 GL_TEXTURE_IMMUTABLE_LEVELS, GL_TEXTURE_MAX_LEVEL,
1191 GL_TEXTURE_MAX_LOD, GL_TEXTURE_MIN_LOD, 1191 GL_TEXTURE_MAX_LOD, GL_TEXTURE_MIN_LOD,
1192 GL_TEXTURE_WRAP_R, 1192 GL_TEXTURE_WRAP_R,
1193 }; 1193 };
1194 1194
1195 static const GLenum
1196 valid_texture_sized_color_renderable_internal_format_table[] = {
1197 GL_R8, GL_R8UI, GL_R8I, GL_R16UI, GL_R16I,
1198 GL_R32UI, GL_R32I, GL_RG8, GL_RG8UI, GL_RG8I,
1199 GL_RG16UI, GL_RG16I, GL_RG32UI, GL_RG32I, GL_RGB8,
1200 GL_RGB565, GL_RGBA8, GL_SRGB8_ALPHA8, GL_RGB5_A1, GL_RGBA4,
1201 GL_RGB10_A2, GL_RGBA8UI, GL_RGBA8I, GL_RGB10_A2UI, GL_RGBA16UI,
1202 GL_RGBA16I, GL_RGBA32UI, GL_RGBA32I,
1203 };
1204
1205 static const GLenum
1206 valid_texture_sized_texture_filterable_internal_format_table[] = {
1207 GL_R8, GL_R8_SNORM, GL_R16F, GL_RG8,
1208 GL_RG8_SNORM, GL_RG16F, GL_RGB8, GL_SRGB8,
1209 GL_RGB565, GL_RGB8_SNORM, GL_R11F_G11F_B10F, GL_RGB9_E5,
1210 GL_RGB16F, GL_RGBA8, GL_SRGB8_ALPHA8, GL_RGBA8_SNORM,
1211 GL_RGB5_A1, GL_RGBA4, GL_RGB10_A2, GL_RGBA16F,
1212 };
1213
1195 static const GLenum valid_texture_target_table[] = { 1214 static const GLenum valid_texture_target_table[] = {
1196 GL_TEXTURE_2D, 1215 GL_TEXTURE_2D,
1197 GL_TEXTURE_CUBE_MAP_POSITIVE_X, 1216 GL_TEXTURE_CUBE_MAP_POSITIVE_X,
1198 GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 1217 GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
1199 GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 1218 GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
1200 GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 1219 GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
1201 GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 1220 GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
1202 GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 1221 GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,
1203 }; 1222 };
1204 1223
1224 static const GLenum valid_texture_unsized_internal_format_table[] = {
1225 GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA,
1226 };
1227
1205 bool Validators::TextureUsageValidator::IsValid(const GLenum value) const { 1228 bool Validators::TextureUsageValidator::IsValid(const GLenum value) const {
1206 switch (value) { 1229 switch (value) {
1207 case GL_NONE: 1230 case GL_NONE:
1208 case GL_FRAMEBUFFER_ATTACHMENT_ANGLE: 1231 case GL_FRAMEBUFFER_ATTACHMENT_ANGLE:
1209 return true; 1232 return true;
1210 } 1233 }
1211 return false; 1234 return false;
1212 }; 1235 };
1213 1236
1214 bool Validators::TextureWrapModeValidator::IsValid(const GLenum value) const { 1237 bool Validators::TextureWrapModeValidator::IsValid(const GLenum value) const {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 arraysize(valid_texture_compare_mode_table)), 1382 arraysize(valid_texture_compare_mode_table)),
1360 texture_format(valid_texture_format_table, 1383 texture_format(valid_texture_format_table,
1361 arraysize(valid_texture_format_table)), 1384 arraysize(valid_texture_format_table)),
1362 texture_internal_format(valid_texture_internal_format_table, 1385 texture_internal_format(valid_texture_internal_format_table,
1363 arraysize(valid_texture_internal_format_table)), 1386 arraysize(valid_texture_internal_format_table)),
1364 texture_internal_format_storage( 1387 texture_internal_format_storage(
1365 valid_texture_internal_format_storage_table, 1388 valid_texture_internal_format_storage_table,
1366 arraysize(valid_texture_internal_format_storage_table)), 1389 arraysize(valid_texture_internal_format_storage_table)),
1367 texture_parameter(valid_texture_parameter_table, 1390 texture_parameter(valid_texture_parameter_table,
1368 arraysize(valid_texture_parameter_table)), 1391 arraysize(valid_texture_parameter_table)),
1392 texture_sized_color_renderable_internal_format(
1393 valid_texture_sized_color_renderable_internal_format_table,
1394 arraysize(
1395 valid_texture_sized_color_renderable_internal_format_table)),
1396 texture_sized_texture_filterable_internal_format(
1397 valid_texture_sized_texture_filterable_internal_format_table,
1398 arraysize(
1399 valid_texture_sized_texture_filterable_internal_format_table)),
1369 texture_target(valid_texture_target_table, 1400 texture_target(valid_texture_target_table,
1370 arraysize(valid_texture_target_table)), 1401 arraysize(valid_texture_target_table)),
1402 texture_unsized_internal_format(
1403 valid_texture_unsized_internal_format_table,
1404 arraysize(valid_texture_unsized_internal_format_table)),
1371 transform_feedback_bind_target( 1405 transform_feedback_bind_target(
1372 valid_transform_feedback_bind_target_table, 1406 valid_transform_feedback_bind_target_table,
1373 arraysize(valid_transform_feedback_bind_target_table)), 1407 arraysize(valid_transform_feedback_bind_target_table)),
1374 value_buffer_target(valid_value_buffer_target_table, 1408 value_buffer_target(valid_value_buffer_target_table,
1375 arraysize(valid_value_buffer_target_table)), 1409 arraysize(valid_value_buffer_target_table)),
1376 vertex_attrib_type(valid_vertex_attrib_type_table, 1410 vertex_attrib_type(valid_vertex_attrib_type_table,
1377 arraysize(valid_vertex_attrib_type_table)), 1411 arraysize(valid_vertex_attrib_type_table)),
1378 vertex_attribute(valid_vertex_attribute_table, 1412 vertex_attribute(valid_vertex_attribute_table,
1379 arraysize(valid_vertex_attribute_table)), 1413 arraysize(valid_vertex_attribute_table)),
1380 vertex_pointer(valid_vertex_pointer_table, 1414 vertex_pointer(valid_vertex_pointer_table,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 arraysize(valid_texture_internal_format_storage_table_es3)); 1471 arraysize(valid_texture_internal_format_storage_table_es3));
1438 texture_parameter.AddValues(valid_texture_parameter_table_es3, 1472 texture_parameter.AddValues(valid_texture_parameter_table_es3,
1439 arraysize(valid_texture_parameter_table_es3)); 1473 arraysize(valid_texture_parameter_table_es3));
1440 vertex_attrib_type.AddValues(valid_vertex_attrib_type_table_es3, 1474 vertex_attrib_type.AddValues(valid_vertex_attrib_type_table_es3,
1441 arraysize(valid_vertex_attrib_type_table_es3)); 1475 arraysize(valid_vertex_attrib_type_table_es3));
1442 vertex_attribute.AddValues(valid_vertex_attribute_table_es3, 1476 vertex_attribute.AddValues(valid_vertex_attribute_table_es3,
1443 arraysize(valid_vertex_attribute_table_es3)); 1477 arraysize(valid_vertex_attribute_table_es3));
1444 } 1478 }
1445 1479
1446 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_IMPLEMENTATION_AUTOGE N_H_ 1480 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_IMPLEMENTATION_AUTOGE N_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_validation_autogen.h ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698