| OLD | NEW |
| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 GL_COMPRESSED_RG11_EAC, | 164 GL_COMPRESSED_RG11_EAC, |
| 165 GL_COMPRESSED_SIGNED_RG11_EAC, | 165 GL_COMPRESSED_SIGNED_RG11_EAC, |
| 166 GL_COMPRESSED_RGB8_ETC2, | 166 GL_COMPRESSED_RGB8_ETC2, |
| 167 GL_COMPRESSED_SRGB8_ETC2, | 167 GL_COMPRESSED_SRGB8_ETC2, |
| 168 GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, | 168 GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, |
| 169 GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, | 169 GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, |
| 170 GL_COMPRESSED_RGBA8_ETC2_EAC, | 170 GL_COMPRESSED_RGBA8_ETC2_EAC, |
| 171 GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, | 171 GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 static const GLenum valid_coverage_modulation_components_table[] = { |
| 175 GL_RGB, GL_RGBA, GL_ALPHA, GL_NONE, |
| 176 }; |
| 177 |
| 174 bool Validators::DrawModeValidator::IsValid(const GLenum value) const { | 178 bool Validators::DrawModeValidator::IsValid(const GLenum value) const { |
| 175 switch (value) { | 179 switch (value) { |
| 176 case GL_POINTS: | 180 case GL_POINTS: |
| 177 case GL_LINE_STRIP: | 181 case GL_LINE_STRIP: |
| 178 case GL_LINE_LOOP: | 182 case GL_LINE_LOOP: |
| 179 case GL_LINES: | 183 case GL_LINES: |
| 180 case GL_TRIANGLE_STRIP: | 184 case GL_TRIANGLE_STRIP: |
| 181 case GL_TRIANGLE_FAN: | 185 case GL_TRIANGLE_FAN: |
| 182 case GL_TRIANGLES: | 186 case GL_TRIANGLES: |
| 183 return true; | 187 return true; |
| (...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1305 static const GLenum valid_vertex_pointer_table[] = { | 1309 static const GLenum valid_vertex_pointer_table[] = { |
| 1306 GL_VERTEX_ATTRIB_ARRAY_POINTER, | 1310 GL_VERTEX_ATTRIB_ARRAY_POINTER, |
| 1307 }; | 1311 }; |
| 1308 | 1312 |
| 1309 Validators::Validators() | 1313 Validators::Validators() |
| 1310 : attachment(valid_attachment_table, arraysize(valid_attachment_table)), | 1314 : attachment(valid_attachment_table, arraysize(valid_attachment_table)), |
| 1311 bufferfi(valid_bufferfi_table, arraysize(valid_bufferfi_table)), | 1315 bufferfi(valid_bufferfi_table, arraysize(valid_bufferfi_table)), |
| 1312 bufferuiv(valid_bufferuiv_table, arraysize(valid_bufferuiv_table)), | 1316 bufferuiv(valid_bufferuiv_table, arraysize(valid_bufferuiv_table)), |
| 1313 capability(valid_capability_table, arraysize(valid_capability_table)), | 1317 capability(valid_capability_table, arraysize(valid_capability_table)), |
| 1314 compressed_texture_format(), | 1318 compressed_texture_format(), |
| 1319 coverage_modulation_components( |
| 1320 valid_coverage_modulation_components_table, |
| 1321 arraysize(valid_coverage_modulation_components_table)), |
| 1315 dst_blend_factor(valid_dst_blend_factor_table, | 1322 dst_blend_factor(valid_dst_blend_factor_table, |
| 1316 arraysize(valid_dst_blend_factor_table)), | 1323 arraysize(valid_dst_blend_factor_table)), |
| 1317 equation(valid_equation_table, arraysize(valid_equation_table)), | 1324 equation(valid_equation_table, arraysize(valid_equation_table)), |
| 1318 frame_buffer_parameter(valid_frame_buffer_parameter_table, | 1325 frame_buffer_parameter(valid_frame_buffer_parameter_table, |
| 1319 arraysize(valid_frame_buffer_parameter_table)), | 1326 arraysize(valid_frame_buffer_parameter_table)), |
| 1320 frame_buffer_target(valid_frame_buffer_target_table, | 1327 frame_buffer_target(valid_frame_buffer_target_table, |
| 1321 arraysize(valid_frame_buffer_target_table)), | 1328 arraysize(valid_frame_buffer_target_table)), |
| 1322 g_l_state(valid_g_l_state_table, arraysize(valid_g_l_state_table)), | 1329 g_l_state(valid_g_l_state_table, arraysize(valid_g_l_state_table)), |
| 1323 get_tex_param_target(valid_get_tex_param_target_table, | 1330 get_tex_param_target(valid_get_tex_param_target_table, |
| 1324 arraysize(valid_get_tex_param_target_table)), | 1331 arraysize(valid_get_tex_param_target_table)), |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1430 arraysize(valid_texture_internal_format_storage_table_es3)); | 1437 arraysize(valid_texture_internal_format_storage_table_es3)); |
| 1431 texture_parameter.AddValues(valid_texture_parameter_table_es3, | 1438 texture_parameter.AddValues(valid_texture_parameter_table_es3, |
| 1432 arraysize(valid_texture_parameter_table_es3)); | 1439 arraysize(valid_texture_parameter_table_es3)); |
| 1433 vertex_attrib_type.AddValues(valid_vertex_attrib_type_table_es3, | 1440 vertex_attrib_type.AddValues(valid_vertex_attrib_type_table_es3, |
| 1434 arraysize(valid_vertex_attrib_type_table_es3)); | 1441 arraysize(valid_vertex_attrib_type_table_es3)); |
| 1435 vertex_attribute.AddValues(valid_vertex_attribute_table_es3, | 1442 vertex_attribute.AddValues(valid_vertex_attribute_table_es3, |
| 1436 arraysize(valid_vertex_attribute_table_es3)); | 1443 arraysize(valid_vertex_attribute_table_es3)); |
| 1437 } | 1444 } |
| 1438 | 1445 |
| 1439 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_IMPLEMENTATION_AUTOGE
N_H_ | 1446 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_IMPLEMENTATION_AUTOGE
N_H_ |
| OLD | NEW |