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
3 // found in the LICENSE file.
5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename
11 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_IMPLEMENTATION_AUTOGEN_H_
12 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_IMPLEMENTATION_AUTOGEN_H_
14 static const GLenum valid_attachment_table
[] = {
17 GL_STENCIL_ATTACHMENT
,
20 static const GLenum valid_attachment_table_es3
[] = {
21 GL_DEPTH_STENCIL_ATTACHMENT
,
24 static const GLenum valid_backbuffer_attachment_table
[] = {
30 static const GLenum valid_blit_filter_table
[] = {
35 static const GLenum valid_buffer_mode_table
[] = {
36 GL_INTERLEAVED_ATTRIBS
,
40 static const GLenum valid_buffer_parameter_table
[] = {
45 static const GLenum valid_buffer_parameter_table_es3
[] = {
46 GL_BUFFER_ACCESS_FLAGS
,
52 static const GLenum valid_buffer_target_table
[] = {
54 GL_ELEMENT_ARRAY_BUFFER
,
57 static const GLenum valid_buffer_target_table_es3
[] = {
61 GL_PIXEL_UNPACK_BUFFER
,
62 GL_TRANSFORM_FEEDBACK_BUFFER
,
66 static const GLenum valid_buffer_usage_table
[] = {
72 static const GLenum valid_buffer_usage_table_es3
[] = {
81 static const GLenum valid_bufferfi_table
[] = {
85 static const GLenum valid_bufferfv_table
[] = {
90 static const GLenum valid_bufferiv_table
[] = {
95 static const GLenum valid_bufferuiv_table
[] = {
99 static const GLenum valid_capability_table
[] = {
104 GL_POLYGON_OFFSET_FILL
,
105 GL_SAMPLE_ALPHA_TO_COVERAGE
,
111 static const GLenum valid_capability_table_es3
[] = {
112 GL_RASTERIZER_DISCARD
,
113 GL_PRIMITIVE_RESTART_FIXED_INDEX
,
116 static const GLenum valid_cmp_function_table
[] = {
127 static const GLenum valid_compressed_texture_format_table_es3
[] = {
128 GL_COMPRESSED_R11_EAC
,
129 GL_COMPRESSED_SIGNED_R11_EAC
,
130 GL_COMPRESSED_RG11_EAC
,
131 GL_COMPRESSED_SIGNED_RG11_EAC
,
132 GL_COMPRESSED_RGB8_ETC2
,
133 GL_COMPRESSED_SRGB8_ETC2
,
134 GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
,
135 GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2
,
136 GL_COMPRESSED_RGBA8_ETC2_EAC
,
137 GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
,
140 static const GLenum valid_draw_mode_table
[] = {
150 static const GLenum valid_dst_blend_factor_table
[] = {
154 GL_ONE_MINUS_SRC_COLOR
,
156 GL_ONE_MINUS_DST_COLOR
,
158 GL_ONE_MINUS_SRC_ALPHA
,
160 GL_ONE_MINUS_DST_ALPHA
,
162 GL_ONE_MINUS_CONSTANT_COLOR
,
164 GL_ONE_MINUS_CONSTANT_ALPHA
,
167 static const GLenum valid_equation_table
[] = {
170 GL_FUNC_REVERSE_SUBTRACT
,
173 static const GLenum valid_equation_table_es3
[] = {
178 static const GLenum valid_face_mode_table
[] = {
183 static const GLenum valid_face_type_table
[] = {
189 static const GLenum valid_frame_buffer_parameter_table
[] = {
190 GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
,
191 GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
,
192 GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
,
193 GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
,
196 static const GLenum valid_frame_buffer_parameter_table_es3
[] = {
197 GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE
,
198 GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE
,
199 GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE
,
200 GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE
,
201 GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE
,
202 GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE
,
203 GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE
,
204 GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING
,
205 GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER
,
208 static const GLenum valid_frame_buffer_target_table
[] = {
212 static const GLenum valid_frame_buffer_target_table_es3
[] = {
217 static const GLenum valid_g_l_state_table
[] = {
219 GL_ALIASED_LINE_WIDTH_RANGE
,
220 GL_ALIASED_POINT_SIZE_RANGE
,
222 GL_ARRAY_BUFFER_BINDING
,
224 GL_COMPRESSED_TEXTURE_FORMATS
,
228 GL_ELEMENT_ARRAY_BUFFER_BINDING
,
229 GL_FRAMEBUFFER_BINDING
,
230 GL_GENERATE_MIPMAP_HINT
,
232 GL_IMPLEMENTATION_COLOR_READ_FORMAT
,
233 GL_IMPLEMENTATION_COLOR_READ_TYPE
,
234 GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
,
235 GL_MAX_CUBE_MAP_TEXTURE_SIZE
,
236 GL_MAX_FRAGMENT_UNIFORM_VECTORS
,
237 GL_MAX_RENDERBUFFER_SIZE
,
238 GL_MAX_TEXTURE_IMAGE_UNITS
,
240 GL_MAX_VARYING_VECTORS
,
241 GL_MAX_VERTEX_ATTRIBS
,
242 GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS
,
243 GL_MAX_VERTEX_UNIFORM_VECTORS
,
244 GL_MAX_VIEWPORT_DIMS
,
245 GL_NUM_COMPRESSED_TEXTURE_FORMATS
,
246 GL_NUM_SHADER_BINARY_FORMATS
,
249 GL_RENDERBUFFER_BINDING
,
251 GL_SAMPLE_COVERAGE_INVERT
,
252 GL_SAMPLE_COVERAGE_VALUE
,
255 GL_SHADER_BINARY_FORMATS
,
259 GL_TEXTURE_BINDING_2D
,
260 GL_TEXTURE_BINDING_CUBE_MAP
,
262 GL_BIND_GENERATES_RESOURCE_CHROMIUM
,
263 GL_VERTEX_ARRAY_BINDING_OES
,
266 GL_BLEND_EQUATION_RGB
,
267 GL_BLEND_EQUATION_ALPHA
,
272 GL_COLOR_CLEAR_VALUE
,
273 GL_DEPTH_CLEAR_VALUE
,
274 GL_STENCIL_CLEAR_VALUE
,
281 GL_POLYGON_OFFSET_FACTOR
,
282 GL_POLYGON_OFFSET_UNITS
,
285 GL_STENCIL_VALUE_MASK
,
286 GL_STENCIL_BACK_FUNC
,
288 GL_STENCIL_BACK_VALUE_MASK
,
289 GL_STENCIL_WRITEMASK
,
290 GL_STENCIL_BACK_WRITEMASK
,
292 GL_STENCIL_PASS_DEPTH_FAIL
,
293 GL_STENCIL_PASS_DEPTH_PASS
,
294 GL_STENCIL_BACK_FAIL
,
295 GL_STENCIL_BACK_PASS_DEPTH_FAIL
,
296 GL_STENCIL_BACK_PASS_DEPTH_PASS
,
301 GL_POLYGON_OFFSET_FILL
,
302 GL_SAMPLE_ALPHA_TO_COVERAGE
,
306 GL_RASTERIZER_DISCARD
,
307 GL_PRIMITIVE_RESTART_FIXED_INDEX
,
310 static const GLenum valid_g_l_state_table_es3
[] = {
311 GL_COPY_READ_BUFFER_BINDING
,
312 GL_COPY_WRITE_BUFFER_BINDING
,
329 GL_DRAW_FRAMEBUFFER_BINDING
,
330 GL_FRAGMENT_SHADER_DERIVATIVE_HINT
,
332 GL_MAX_3D_TEXTURE_SIZE
,
333 GL_MAX_ARRAY_TEXTURE_LAYERS
,
334 GL_MAX_COLOR_ATTACHMENTS
,
335 GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS
,
336 GL_MAX_COMBINED_UNIFORM_BLOCKS
,
337 GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS
,
339 GL_MAX_ELEMENT_INDEX
,
340 GL_MAX_ELEMENTS_INDICES
,
341 GL_MAX_ELEMENTS_VERTICES
,
342 GL_MAX_FRAGMENT_INPUT_COMPONENTS
,
343 GL_MAX_FRAGMENT_UNIFORM_BLOCKS
,
344 GL_MAX_FRAGMENT_UNIFORM_COMPONENTS
,
345 GL_MAX_PROGRAM_TEXEL_OFFSET
,
347 GL_MAX_SERVER_WAIT_TIMEOUT
,
348 GL_MAX_TEXTURE_LOD_BIAS
,
349 GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS
,
350 GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS
,
351 GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS
,
352 GL_MAX_UNIFORM_BLOCK_SIZE
,
353 GL_MAX_UNIFORM_BUFFER_BINDINGS
,
354 GL_MAX_VARYING_COMPONENTS
,
355 GL_MAX_VERTEX_OUTPUT_COMPONENTS
,
356 GL_MAX_VERTEX_UNIFORM_BLOCKS
,
357 GL_MAX_VERTEX_UNIFORM_COMPONENTS
,
358 GL_MIN_PROGRAM_TEXEL_OFFSET
,
361 GL_NUM_PROGRAM_BINARY_FORMATS
,
365 GL_PIXEL_PACK_BUFFER_BINDING
,
366 GL_PIXEL_UNPACK_BUFFER_BINDING
,
367 GL_PROGRAM_BINARY_FORMATS
,
369 GL_READ_FRAMEBUFFER_BINDING
,
371 GL_TEXTURE_BINDING_2D_ARRAY
,
372 GL_TEXTURE_BINDING_3D
,
373 GL_TRANSFORM_FEEDBACK_BINDING
,
374 GL_TRANSFORM_FEEDBACK_ACTIVE
,
375 GL_TRANSFORM_FEEDBACK_BUFFER_BINDING
,
376 GL_TRANSFORM_FEEDBACK_PAUSED
,
377 GL_TRANSFORM_FEEDBACK_BUFFER_SIZE
,
378 GL_TRANSFORM_FEEDBACK_BUFFER_START
,
379 GL_UNIFORM_BUFFER_BINDING
,
380 GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT
,
381 GL_UNIFORM_BUFFER_SIZE
,
382 GL_UNIFORM_BUFFER_START
,
383 GL_UNPACK_IMAGE_HEIGHT
,
384 GL_UNPACK_ROW_LENGTH
,
385 GL_UNPACK_SKIP_IMAGES
,
386 GL_UNPACK_SKIP_PIXELS
,
390 static const GLenum valid_get_max_index_type_table
[] = {
396 static const GLenum valid_get_tex_param_target_table
[] = {
401 static const GLenum valid_get_tex_param_target_table_es3
[] = {
406 static const GLenum valid_hint_mode_table
[] = {
412 static const GLenum valid_hint_target_table
[] = {
413 GL_GENERATE_MIPMAP_HINT
,
416 static const GLenum valid_hint_target_table_es3
[] = {
417 GL_FRAGMENT_SHADER_DERIVATIVE_HINT
,
420 static const GLenum valid_image_internal_format_table
[] = {
422 GL_RGB_YUV_420_CHROMIUM
,
426 static const GLenum valid_image_usage_table
[] = {
431 static const GLenum valid_index_type_table
[] = {
436 static const GLenum valid_index_type_table_es3
[] = {
440 static const GLenum valid_indexed_buffer_target_table
[] = {
441 GL_TRANSFORM_FEEDBACK_BUFFER
,
445 static const GLenum valid_indexed_g_l_state_table
[] = {
446 GL_TRANSFORM_FEEDBACK_BUFFER_BINDING
,
447 GL_TRANSFORM_FEEDBACK_BUFFER_SIZE
,
448 GL_TRANSFORM_FEEDBACK_BUFFER_START
,
449 GL_UNIFORM_BUFFER_BINDING
,
450 GL_UNIFORM_BUFFER_SIZE
,
451 GL_UNIFORM_BUFFER_START
,
454 static const GLenum valid_internal_format_parameter_table
[] = {
455 GL_NUM_SAMPLE_COUNTS
,
459 static const GLenum valid_invalidate_frame_buffer_target_table
[] = {
463 static const GLenum valid_map_buffer_access_table
[] = {
466 GL_MAP_INVALIDATE_RANGE_BIT
,
467 GL_MAP_INVALIDATE_BUFFER_BIT
,
468 GL_MAP_FLUSH_EXPLICIT_BIT
,
469 GL_MAP_UNSYNCHRONIZED_BIT
,
472 static const GLenum valid_matrix_mode_table
[] = {
473 GL_PATH_PROJECTION_CHROMIUM
,
474 GL_PATH_MODELVIEW_CHROMIUM
,
477 static const GLenum valid_path_coord_type_table
[] = {
485 static const GLenum valid_path_cover_mode_table
[] = {
486 GL_CONVEX_HULL_CHROMIUM
,
487 GL_BOUNDING_BOX_CHROMIUM
,
490 static const GLenum valid_path_fill_mode_table
[] = {
492 GL_COUNT_UP_CHROMIUM
,
493 GL_COUNT_DOWN_CHROMIUM
,
496 static const GLenum valid_path_parameter_table
[] = {
497 GL_PATH_STROKE_WIDTH_CHROMIUM
,
498 GL_PATH_END_CAPS_CHROMIUM
,
499 GL_PATH_JOIN_STYLE_CHROMIUM
,
500 GL_PATH_MITER_LIMIT_CHROMIUM
,
501 GL_PATH_STROKE_BOUND_CHROMIUM
,
504 static const GLint valid_path_parameter_cap_values_table
[] = {
510 static const GLint valid_path_parameter_join_values_table
[] = {
511 GL_MITER_REVERT_CHROMIUM
,
516 static const GLenum valid_pixel_store_table
[] = {
521 static const GLenum valid_pixel_store_table_es3
[] = {
525 GL_UNPACK_ROW_LENGTH
,
526 GL_UNPACK_IMAGE_HEIGHT
,
527 GL_UNPACK_SKIP_PIXELS
,
529 GL_UNPACK_SKIP_IMAGES
,
532 static const GLint valid_pixel_store_alignment_table
[] = {
539 static const GLenum valid_pixel_type_table
[] = {
541 GL_UNSIGNED_SHORT_5_6_5
,
542 GL_UNSIGNED_SHORT_4_4_4_4
,
543 GL_UNSIGNED_SHORT_5_5_5_1
,
546 static const GLenum valid_pixel_type_table_es3
[] = {
554 GL_UNSIGNED_INT_2_10_10_10_REV
,
555 GL_UNSIGNED_INT_10F_11F_11F_REV
,
556 GL_UNSIGNED_INT_5_9_9_9_REV
,
557 GL_UNSIGNED_INT_24_8
,
558 GL_FLOAT_32_UNSIGNED_INT_24_8_REV
,
561 static const GLenum valid_program_parameter_table
[] = {
567 GL_ACTIVE_ATTRIBUTES
,
568 GL_ACTIVE_ATTRIBUTE_MAX_LENGTH
,
570 GL_ACTIVE_UNIFORM_MAX_LENGTH
,
573 static const GLenum valid_program_parameter_table_es3
[] = {
574 GL_ACTIVE_UNIFORM_BLOCKS
,
575 GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH
,
576 GL_TRANSFORM_FEEDBACK_BUFFER_MODE
,
577 GL_TRANSFORM_FEEDBACK_VARYINGS
,
578 GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH
,
581 static const GLenum valid_query_object_parameter_table
[] = {
583 GL_QUERY_RESULT_AVAILABLE_EXT
,
586 static const GLenum valid_query_parameter_table
[] = {
587 GL_CURRENT_QUERY_EXT
,
590 static const GLenum valid_query_target_table
[] = {
591 GL_ANY_SAMPLES_PASSED_EXT
,
592 GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT
,
593 GL_COMMANDS_ISSUED_CHROMIUM
,
594 GL_LATENCY_QUERY_CHROMIUM
,
595 GL_ASYNC_PIXEL_UNPACK_COMPLETED_CHROMIUM
,
596 GL_ASYNC_PIXEL_PACK_COMPLETED_CHROMIUM
,
597 GL_COMMANDS_COMPLETED_CHROMIUM
,
600 static const GLenum valid_read_pixel_format_table
[] = {
606 static const GLenum valid_read_pixel_format_table_es3
[] = {
610 static const GLenum deprecated_read_pixel_format_table_es3
[] = {
615 static const GLenum valid_read_pixel_type_table
[] = {
617 GL_UNSIGNED_SHORT_5_6_5
,
618 GL_UNSIGNED_SHORT_4_4_4_4
,
619 GL_UNSIGNED_SHORT_5_5_5_1
,
622 static const GLenum valid_read_pixel_type_table_es3
[] = {
628 static const GLenum deprecated_read_pixel_type_table_es3
[] = {
629 GL_UNSIGNED_SHORT_5_6_5
,
630 GL_UNSIGNED_SHORT_4_4_4_4
,
631 GL_UNSIGNED_SHORT_5_5_5_1
,
634 static const GLenum valid_render_buffer_format_table
[] = {
638 GL_DEPTH_COMPONENT16
,
642 static const GLenum valid_render_buffer_format_table_es3
[] = {
668 GL_DEPTH_COMPONENT24
,
669 GL_DEPTH_COMPONENT32F
,
671 GL_DEPTH32F_STENCIL8
,
674 static const GLenum valid_render_buffer_parameter_table
[] = {
675 GL_RENDERBUFFER_RED_SIZE
,
676 GL_RENDERBUFFER_GREEN_SIZE
,
677 GL_RENDERBUFFER_BLUE_SIZE
,
678 GL_RENDERBUFFER_ALPHA_SIZE
,
679 GL_RENDERBUFFER_DEPTH_SIZE
,
680 GL_RENDERBUFFER_STENCIL_SIZE
,
681 GL_RENDERBUFFER_WIDTH
,
682 GL_RENDERBUFFER_HEIGHT
,
683 GL_RENDERBUFFER_INTERNAL_FORMAT
,
686 static const GLenum valid_render_buffer_parameter_table_es3
[] = {
687 GL_RENDERBUFFER_SAMPLES
,
690 static const GLenum valid_render_buffer_target_table
[] = {
694 static const GLenum valid_reset_status_table
[] = {
695 GL_GUILTY_CONTEXT_RESET_ARB
,
696 GL_INNOCENT_CONTEXT_RESET_ARB
,
697 GL_UNKNOWN_CONTEXT_RESET_ARB
,
700 static const GLenum valid_sampler_parameter_table
[] = {
701 GL_TEXTURE_MAG_FILTER
,
702 GL_TEXTURE_MIN_FILTER
,
708 GL_TEXTURE_COMPARE_MODE
,
709 GL_TEXTURE_COMPARE_FUNC
,
712 static const GLenum valid_shader_parameter_table
[] = {
717 GL_SHADER_SOURCE_LENGTH
,
718 GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE
,
721 static const GLenum valid_shader_precision_table
[] = {
730 static const GLenum valid_shader_type_table
[] = {
735 static const GLenum valid_src_blend_factor_table
[] = {
739 GL_ONE_MINUS_SRC_COLOR
,
741 GL_ONE_MINUS_DST_COLOR
,
743 GL_ONE_MINUS_SRC_ALPHA
,
745 GL_ONE_MINUS_DST_ALPHA
,
747 GL_ONE_MINUS_CONSTANT_COLOR
,
749 GL_ONE_MINUS_CONSTANT_ALPHA
,
750 GL_SRC_ALPHA_SATURATE
,
753 static const GLenum valid_stencil_op_table
[] = {
764 static const GLenum valid_string_type_table
[] = {
768 GL_SHADING_LANGUAGE_VERSION
,
772 static const GLenum valid_subscription_target_table
[] = {
773 GL_MOUSE_POSITION_CHROMIUM
,
776 static const GLbitfield valid_sync_flush_flags_table
[] = {
777 GL_SYNC_FLUSH_COMMANDS_BIT
,
781 static const GLenum valid_sync_parameter_table
[] = {
788 static const GLenum valid_texture_3_d_target_table
[] = {
793 static const GLenum valid_texture_bind_target_table
[] = {
798 static const GLenum valid_texture_bind_target_table_es3
[] = {
803 static const GLenum valid_texture_compare_func_table
[] = {
814 static const GLenum valid_texture_compare_mode_table
[] = {
816 GL_COMPARE_REF_TO_TEXTURE
,
819 static const GLenum valid_texture_format_table
[] = {
827 static const GLenum valid_texture_format_table_es3
[] = {
838 static const GLenum valid_texture_internal_format_table
[] = {
846 static const GLenum valid_texture_internal_format_table_es3
[] = {
896 GL_DEPTH_COMPONENT16
,
897 GL_DEPTH_COMPONENT24
,
898 GL_DEPTH_COMPONENT32F
,
900 GL_DEPTH32F_STENCIL8
,
903 static const GLenum valid_texture_internal_format_storage_table
[] = {
909 GL_LUMINANCE8_ALPHA8_EXT
,
914 static const GLenum valid_texture_internal_format_storage_table_es3
[] = {
961 GL_DEPTH_COMPONENT16
,
962 GL_DEPTH_COMPONENT24
,
963 GL_DEPTH_COMPONENT32F
,
965 GL_DEPTH32F_STENCIL8
,
966 GL_COMPRESSED_R11_EAC
,
967 GL_COMPRESSED_SIGNED_R11_EAC
,
968 GL_COMPRESSED_RG11_EAC
,
969 GL_COMPRESSED_SIGNED_RG11_EAC
,
970 GL_COMPRESSED_RGB8_ETC2
,
971 GL_COMPRESSED_SRGB8_ETC2
,
972 GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
,
973 GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2
,
974 GL_COMPRESSED_RGBA8_ETC2_EAC
,
975 GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
,
978 static const GLenum deprecated_texture_internal_format_storage_table_es3
[] = {
981 GL_LUMINANCE8_ALPHA8_EXT
,
984 GL_LUMINANCE_ALPHA16F_EXT
,
987 GL_LUMINANCE_ALPHA32F_EXT
,
990 static const GLenum valid_texture_mag_filter_mode_table
[] = {
995 static const GLenum valid_texture_min_filter_mode_table
[] = {
998 GL_NEAREST_MIPMAP_NEAREST
,
999 GL_LINEAR_MIPMAP_NEAREST
,
1000 GL_NEAREST_MIPMAP_LINEAR
,
1001 GL_LINEAR_MIPMAP_LINEAR
,
1004 static const GLenum valid_texture_parameter_table
[] = {
1005 GL_TEXTURE_MAG_FILTER
,
1006 GL_TEXTURE_MIN_FILTER
,
1007 GL_TEXTURE_POOL_CHROMIUM
,
1012 static const GLenum valid_texture_parameter_table_es3
[] = {
1013 GL_TEXTURE_BASE_LEVEL
,
1014 GL_TEXTURE_COMPARE_FUNC
,
1015 GL_TEXTURE_COMPARE_MODE
,
1016 GL_TEXTURE_IMMUTABLE_FORMAT
,
1017 GL_TEXTURE_IMMUTABLE_LEVELS
,
1018 GL_TEXTURE_MAX_LEVEL
,
1024 static const GLenum valid_texture_pool_table
[] = {
1025 GL_TEXTURE_POOL_MANAGED_CHROMIUM
,
1026 GL_TEXTURE_POOL_UNMANAGED_CHROMIUM
,
1029 static const GLenum valid_texture_target_table
[] = {
1031 GL_TEXTURE_CUBE_MAP_POSITIVE_X
,
1032 GL_TEXTURE_CUBE_MAP_NEGATIVE_X
,
1033 GL_TEXTURE_CUBE_MAP_POSITIVE_Y
,
1034 GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
,
1035 GL_TEXTURE_CUBE_MAP_POSITIVE_Z
,
1036 GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
,
1039 static const GLenum valid_texture_usage_table
[] = {
1041 GL_FRAMEBUFFER_ATTACHMENT_ANGLE
,
1044 static const GLenum valid_texture_wrap_mode_table
[] = {
1050 static const GLenum valid_transform_feedback_bind_target_table
[] = {
1051 GL_TRANSFORM_FEEDBACK
,
1054 static const GLenum valid_transform_feedback_primitive_mode_table
[] = {
1060 static const GLenum valid_uniform_block_parameter_table
[] = {
1061 GL_UNIFORM_BLOCK_BINDING
,
1062 GL_UNIFORM_BLOCK_DATA_SIZE
,
1063 GL_UNIFORM_BLOCK_NAME_LENGTH
,
1064 GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS
,
1065 GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES
,
1066 GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER
,
1067 GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER
,
1070 static const GLenum valid_uniform_parameter_table
[] = {
1073 GL_UNIFORM_NAME_LENGTH
,
1074 GL_UNIFORM_BLOCK_INDEX
,
1076 GL_UNIFORM_ARRAY_STRIDE
,
1077 GL_UNIFORM_MATRIX_STRIDE
,
1078 GL_UNIFORM_IS_ROW_MAJOR
,
1081 static const GLenum valid_value_buffer_target_table
[] = {
1082 GL_SUBSCRIBED_VALUES_BUFFER_CHROMIUM
,
1085 static const GLenum valid_vertex_attrib_i_type_table
[] = {
1094 static const GLint valid_vertex_attrib_size_table
[] = {
1101 static const GLenum valid_vertex_attrib_type_table
[] = {
1109 static const GLenum valid_vertex_attrib_type_table_es3
[] = {
1113 GL_INT_2_10_10_10_REV
,
1114 GL_UNSIGNED_INT_2_10_10_10_REV
,
1117 static const GLenum valid_vertex_attribute_table
[] = {
1118 GL_VERTEX_ATTRIB_ARRAY_NORMALIZED
,
1119 GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
,
1120 GL_VERTEX_ATTRIB_ARRAY_ENABLED
,
1121 GL_VERTEX_ATTRIB_ARRAY_SIZE
,
1122 GL_VERTEX_ATTRIB_ARRAY_STRIDE
,
1123 GL_VERTEX_ATTRIB_ARRAY_TYPE
,
1124 GL_CURRENT_VERTEX_ATTRIB
,
1127 static const GLenum valid_vertex_attribute_table_es3
[] = {
1128 GL_VERTEX_ATTRIB_ARRAY_INTEGER
,
1129 GL_VERTEX_ATTRIB_ARRAY_DIVISOR
,
1132 static const GLenum valid_vertex_pointer_table
[] = {
1133 GL_VERTEX_ATTRIB_ARRAY_POINTER
,
1136 Validators::Validators()
1137 : attachment(valid_attachment_table
, arraysize(valid_attachment_table
)),
1138 backbuffer_attachment(valid_backbuffer_attachment_table
,
1139 arraysize(valid_backbuffer_attachment_table
)),
1140 blit_filter(valid_blit_filter_table
, arraysize(valid_blit_filter_table
)),
1141 buffer_mode(valid_buffer_mode_table
, arraysize(valid_buffer_mode_table
)),
1142 buffer_parameter(valid_buffer_parameter_table
,
1143 arraysize(valid_buffer_parameter_table
)),
1144 buffer_target(valid_buffer_target_table
,
1145 arraysize(valid_buffer_target_table
)),
1146 buffer_usage(valid_buffer_usage_table
,
1147 arraysize(valid_buffer_usage_table
)),
1148 bufferfi(valid_bufferfi_table
, arraysize(valid_bufferfi_table
)),
1149 bufferfv(valid_bufferfv_table
, arraysize(valid_bufferfv_table
)),
1150 bufferiv(valid_bufferiv_table
, arraysize(valid_bufferiv_table
)),
1151 bufferuiv(valid_bufferuiv_table
, arraysize(valid_bufferuiv_table
)),
1152 capability(valid_capability_table
, arraysize(valid_capability_table
)),
1153 cmp_function(valid_cmp_function_table
,
1154 arraysize(valid_cmp_function_table
)),
1155 compressed_texture_format(),
1156 draw_mode(valid_draw_mode_table
, arraysize(valid_draw_mode_table
)),
1157 dst_blend_factor(valid_dst_blend_factor_table
,
1158 arraysize(valid_dst_blend_factor_table
)),
1159 equation(valid_equation_table
, arraysize(valid_equation_table
)),
1160 face_mode(valid_face_mode_table
, arraysize(valid_face_mode_table
)),
1161 face_type(valid_face_type_table
, arraysize(valid_face_type_table
)),
1162 frame_buffer_parameter(valid_frame_buffer_parameter_table
,
1163 arraysize(valid_frame_buffer_parameter_table
)),
1164 frame_buffer_target(valid_frame_buffer_target_table
,
1165 arraysize(valid_frame_buffer_target_table
)),
1166 g_l_state(valid_g_l_state_table
, arraysize(valid_g_l_state_table
)),
1167 get_max_index_type(valid_get_max_index_type_table
,
1168 arraysize(valid_get_max_index_type_table
)),
1169 get_tex_param_target(valid_get_tex_param_target_table
,
1170 arraysize(valid_get_tex_param_target_table
)),
1171 hint_mode(valid_hint_mode_table
, arraysize(valid_hint_mode_table
)),
1172 hint_target(valid_hint_target_table
, arraysize(valid_hint_target_table
)),
1173 image_internal_format(valid_image_internal_format_table
,
1174 arraysize(valid_image_internal_format_table
)),
1175 image_usage(valid_image_usage_table
, arraysize(valid_image_usage_table
)),
1176 index_type(valid_index_type_table
, arraysize(valid_index_type_table
)),
1177 indexed_buffer_target(valid_indexed_buffer_target_table
,
1178 arraysize(valid_indexed_buffer_target_table
)),
1179 indexed_g_l_state(valid_indexed_g_l_state_table
,
1180 arraysize(valid_indexed_g_l_state_table
)),
1181 internal_format_parameter(
1182 valid_internal_format_parameter_table
,
1183 arraysize(valid_internal_format_parameter_table
)),
1184 invalidate_frame_buffer_target(
1185 valid_invalidate_frame_buffer_target_table
,
1186 arraysize(valid_invalidate_frame_buffer_target_table
)),
1187 map_buffer_access(valid_map_buffer_access_table
,
1188 arraysize(valid_map_buffer_access_table
)),
1189 matrix_mode(valid_matrix_mode_table
, arraysize(valid_matrix_mode_table
)),
1190 path_coord_type(valid_path_coord_type_table
,
1191 arraysize(valid_path_coord_type_table
)),
1192 path_cover_mode(valid_path_cover_mode_table
,
1193 arraysize(valid_path_cover_mode_table
)),
1194 path_fill_mode(valid_path_fill_mode_table
,
1195 arraysize(valid_path_fill_mode_table
)),
1196 path_parameter(valid_path_parameter_table
,
1197 arraysize(valid_path_parameter_table
)),
1198 path_parameter_cap_values(
1199 valid_path_parameter_cap_values_table
,
1200 arraysize(valid_path_parameter_cap_values_table
)),
1201 path_parameter_join_values(
1202 valid_path_parameter_join_values_table
,
1203 arraysize(valid_path_parameter_join_values_table
)),
1204 pixel_store(valid_pixel_store_table
, arraysize(valid_pixel_store_table
)),
1205 pixel_store_alignment(valid_pixel_store_alignment_table
,
1206 arraysize(valid_pixel_store_alignment_table
)),
1207 pixel_type(valid_pixel_type_table
, arraysize(valid_pixel_type_table
)),
1208 program_parameter(valid_program_parameter_table
,
1209 arraysize(valid_program_parameter_table
)),
1210 query_object_parameter(valid_query_object_parameter_table
,
1211 arraysize(valid_query_object_parameter_table
)),
1212 query_parameter(valid_query_parameter_table
,
1213 arraysize(valid_query_parameter_table
)),
1214 query_target(valid_query_target_table
,
1215 arraysize(valid_query_target_table
)),
1216 read_pixel_format(valid_read_pixel_format_table
,
1217 arraysize(valid_read_pixel_format_table
)),
1218 read_pixel_type(valid_read_pixel_type_table
,
1219 arraysize(valid_read_pixel_type_table
)),
1220 render_buffer_format(valid_render_buffer_format_table
,
1221 arraysize(valid_render_buffer_format_table
)),
1222 render_buffer_parameter(valid_render_buffer_parameter_table
,
1223 arraysize(valid_render_buffer_parameter_table
)),
1224 render_buffer_target(valid_render_buffer_target_table
,
1225 arraysize(valid_render_buffer_target_table
)),
1226 reset_status(valid_reset_status_table
,
1227 arraysize(valid_reset_status_table
)),
1228 sampler_parameter(valid_sampler_parameter_table
,
1229 arraysize(valid_sampler_parameter_table
)),
1230 shader_binary_format(),
1231 shader_parameter(valid_shader_parameter_table
,
1232 arraysize(valid_shader_parameter_table
)),
1233 shader_precision(valid_shader_precision_table
,
1234 arraysize(valid_shader_precision_table
)),
1235 shader_type(valid_shader_type_table
, arraysize(valid_shader_type_table
)),
1236 src_blend_factor(valid_src_blend_factor_table
,
1237 arraysize(valid_src_blend_factor_table
)),
1238 stencil_op(valid_stencil_op_table
, arraysize(valid_stencil_op_table
)),
1239 string_type(valid_string_type_table
, arraysize(valid_string_type_table
)),
1240 subscription_target(valid_subscription_target_table
,
1241 arraysize(valid_subscription_target_table
)),
1242 sync_flush_flags(valid_sync_flush_flags_table
,
1243 arraysize(valid_sync_flush_flags_table
)),
1244 sync_parameter(valid_sync_parameter_table
,
1245 arraysize(valid_sync_parameter_table
)),
1246 texture_3_d_target(valid_texture_3_d_target_table
,
1247 arraysize(valid_texture_3_d_target_table
)),
1248 texture_bind_target(valid_texture_bind_target_table
,
1249 arraysize(valid_texture_bind_target_table
)),
1250 texture_compare_func(valid_texture_compare_func_table
,
1251 arraysize(valid_texture_compare_func_table
)),
1252 texture_compare_mode(valid_texture_compare_mode_table
,
1253 arraysize(valid_texture_compare_mode_table
)),
1254 texture_format(valid_texture_format_table
,
1255 arraysize(valid_texture_format_table
)),
1256 texture_internal_format(valid_texture_internal_format_table
,
1257 arraysize(valid_texture_internal_format_table
)),
1258 texture_internal_format_storage(
1259 valid_texture_internal_format_storage_table
,
1260 arraysize(valid_texture_internal_format_storage_table
)),
1261 texture_mag_filter_mode(valid_texture_mag_filter_mode_table
,
1262 arraysize(valid_texture_mag_filter_mode_table
)),
1263 texture_min_filter_mode(valid_texture_min_filter_mode_table
,
1264 arraysize(valid_texture_min_filter_mode_table
)),
1265 texture_parameter(valid_texture_parameter_table
,
1266 arraysize(valid_texture_parameter_table
)),
1267 texture_pool(valid_texture_pool_table
,
1268 arraysize(valid_texture_pool_table
)),
1269 texture_target(valid_texture_target_table
,
1270 arraysize(valid_texture_target_table
)),
1271 texture_usage(valid_texture_usage_table
,
1272 arraysize(valid_texture_usage_table
)),
1273 texture_wrap_mode(valid_texture_wrap_mode_table
,
1274 arraysize(valid_texture_wrap_mode_table
)),
1275 transform_feedback_bind_target(
1276 valid_transform_feedback_bind_target_table
,
1277 arraysize(valid_transform_feedback_bind_target_table
)),
1278 transform_feedback_primitive_mode(
1279 valid_transform_feedback_primitive_mode_table
,
1280 arraysize(valid_transform_feedback_primitive_mode_table
)),
1281 uniform_block_parameter(valid_uniform_block_parameter_table
,
1282 arraysize(valid_uniform_block_parameter_table
)),
1283 uniform_parameter(valid_uniform_parameter_table
,
1284 arraysize(valid_uniform_parameter_table
)),
1285 value_buffer_target(valid_value_buffer_target_table
,
1286 arraysize(valid_value_buffer_target_table
)),
1287 vertex_attrib_i_type(valid_vertex_attrib_i_type_table
,
1288 arraysize(valid_vertex_attrib_i_type_table
)),
1289 vertex_attrib_size(valid_vertex_attrib_size_table
,
1290 arraysize(valid_vertex_attrib_size_table
)),
1291 vertex_attrib_type(valid_vertex_attrib_type_table
,
1292 arraysize(valid_vertex_attrib_type_table
)),
1293 vertex_attribute(valid_vertex_attribute_table
,
1294 arraysize(valid_vertex_attribute_table
)),
1295 vertex_pointer(valid_vertex_pointer_table
,
1296 arraysize(valid_vertex_pointer_table
)) {
1299 void Validators::UpdateValuesES3() {
1300 attachment
.AddValues(valid_attachment_table_es3
,
1301 arraysize(valid_attachment_table_es3
));
1302 buffer_parameter
.AddValues(valid_buffer_parameter_table_es3
,
1303 arraysize(valid_buffer_parameter_table_es3
));
1304 buffer_target
.AddValues(valid_buffer_target_table_es3
,
1305 arraysize(valid_buffer_target_table_es3
));
1306 buffer_usage
.AddValues(valid_buffer_usage_table_es3
,
1307 arraysize(valid_buffer_usage_table_es3
));
1308 capability
.AddValues(valid_capability_table_es3
,
1309 arraysize(valid_capability_table_es3
));
1310 compressed_texture_format
.AddValues(
1311 valid_compressed_texture_format_table_es3
,
1312 arraysize(valid_compressed_texture_format_table_es3
));
1313 equation
.AddValues(valid_equation_table_es3
,
1314 arraysize(valid_equation_table_es3
));
1315 frame_buffer_parameter
.AddValues(
1316 valid_frame_buffer_parameter_table_es3
,
1317 arraysize(valid_frame_buffer_parameter_table_es3
));
1318 frame_buffer_target
.AddValues(valid_frame_buffer_target_table_es3
,
1319 arraysize(valid_frame_buffer_target_table_es3
));
1320 g_l_state
.AddValues(valid_g_l_state_table_es3
,
1321 arraysize(valid_g_l_state_table_es3
));
1322 get_tex_param_target
.AddValues(
1323 valid_get_tex_param_target_table_es3
,
1324 arraysize(valid_get_tex_param_target_table_es3
));
1325 hint_target
.AddValues(valid_hint_target_table_es3
,
1326 arraysize(valid_hint_target_table_es3
));
1327 index_type
.AddValues(valid_index_type_table_es3
,
1328 arraysize(valid_index_type_table_es3
));
1329 pixel_store
.AddValues(valid_pixel_store_table_es3
,
1330 arraysize(valid_pixel_store_table_es3
));
1331 pixel_type
.AddValues(valid_pixel_type_table_es3
,
1332 arraysize(valid_pixel_type_table_es3
));
1333 program_parameter
.AddValues(valid_program_parameter_table_es3
,
1334 arraysize(valid_program_parameter_table_es3
));
1335 read_pixel_format
.RemoveValues(
1336 deprecated_read_pixel_format_table_es3
,
1337 arraysize(deprecated_read_pixel_format_table_es3
));
1338 read_pixel_format
.AddValues(valid_read_pixel_format_table_es3
,
1339 arraysize(valid_read_pixel_format_table_es3
));
1340 read_pixel_type
.RemoveValues(deprecated_read_pixel_type_table_es3
,
1341 arraysize(deprecated_read_pixel_type_table_es3
));
1342 read_pixel_type
.AddValues(valid_read_pixel_type_table_es3
,
1343 arraysize(valid_read_pixel_type_table_es3
));
1344 render_buffer_format
.AddValues(
1345 valid_render_buffer_format_table_es3
,
1346 arraysize(valid_render_buffer_format_table_es3
));
1347 render_buffer_parameter
.AddValues(
1348 valid_render_buffer_parameter_table_es3
,
1349 arraysize(valid_render_buffer_parameter_table_es3
));
1350 texture_bind_target
.AddValues(valid_texture_bind_target_table_es3
,
1351 arraysize(valid_texture_bind_target_table_es3
));
1352 texture_format
.AddValues(valid_texture_format_table_es3
,
1353 arraysize(valid_texture_format_table_es3
));
1354 texture_internal_format
.AddValues(
1355 valid_texture_internal_format_table_es3
,
1356 arraysize(valid_texture_internal_format_table_es3
));
1357 texture_internal_format_storage
.RemoveValues(
1358 deprecated_texture_internal_format_storage_table_es3
,
1359 arraysize(deprecated_texture_internal_format_storage_table_es3
));
1360 texture_internal_format_storage
.AddValues(
1361 valid_texture_internal_format_storage_table_es3
,
1362 arraysize(valid_texture_internal_format_storage_table_es3
));
1363 texture_parameter
.AddValues(valid_texture_parameter_table_es3
,
1364 arraysize(valid_texture_parameter_table_es3
));
1365 vertex_attrib_type
.AddValues(valid_vertex_attrib_type_table_es3
,
1366 arraysize(valid_vertex_attrib_type_table_es3
));
1367 vertex_attribute
.AddValues(valid_vertex_attribute_table_es3
,
1368 arraysize(valid_vertex_attribute_table_es3
));
1371 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_VALIDATION_IMPLEMENTATION_AUTOGEN_H_