OLD | NEW |
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 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 2880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2891 DoGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, | 2891 DoGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, |
2892 &caps.max_vertex_texture_image_units); | 2892 &caps.max_vertex_texture_image_units); |
2893 DoGetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS, | 2893 DoGetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS, |
2894 &caps.max_vertex_uniform_vectors); | 2894 &caps.max_vertex_uniform_vectors); |
2895 DoGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, | 2895 DoGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, |
2896 &caps.num_compressed_texture_formats); | 2896 &caps.num_compressed_texture_formats); |
2897 DoGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &caps.num_shader_binary_formats); | 2897 DoGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &caps.num_shader_binary_formats); |
2898 DoGetIntegerv(GL_BIND_GENERATES_RESOURCE_CHROMIUM, | 2898 DoGetIntegerv(GL_BIND_GENERATES_RESOURCE_CHROMIUM, |
2899 &caps.bind_generates_resource_chromium); | 2899 &caps.bind_generates_resource_chromium); |
2900 if (unsafe_es3_apis_enabled()) { | 2900 if (unsafe_es3_apis_enabled()) { |
| 2901 // TODO(zmo): Note that some parameter values could be more than 32-bit, |
| 2902 // but for now we clamp them to 32-bit max. |
| 2903 DoGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, &caps.max_3d_texture_size); |
| 2904 DoGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS, &caps.max_array_texture_layers); |
| 2905 DoGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, &caps.max_color_attachments); |
| 2906 DoGetIntegerv(GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS, |
| 2907 &caps.max_combined_fragment_uniform_components); |
| 2908 DoGetIntegerv(GL_MAX_COMBINED_UNIFORM_BLOCKS, |
| 2909 &caps.max_combined_uniform_blocks); |
| 2910 DoGetIntegerv(GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS, |
| 2911 &caps.max_combined_vertex_uniform_components); |
| 2912 DoGetIntegerv(GL_MAX_DRAW_BUFFERS, &caps.max_draw_buffers); |
| 2913 DoGetIntegerv(GL_MAX_ELEMENT_INDEX, &caps.max_element_index); |
| 2914 DoGetIntegerv(GL_MAX_ELEMENTS_INDICES, &caps.max_elements_indices); |
| 2915 DoGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &caps.max_elements_vertices); |
| 2916 DoGetIntegerv(GL_MAX_FRAGMENT_INPUT_COMPONENTS, |
| 2917 &caps.max_fragment_input_components); |
| 2918 DoGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_BLOCKS, |
| 2919 &caps.max_fragment_uniform_blocks); |
| 2920 DoGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, |
| 2921 &caps.max_fragment_uniform_components); |
| 2922 DoGetIntegerv(GL_MAX_PROGRAM_TEXEL_OFFSET, |
| 2923 &caps.max_program_texel_offset); |
| 2924 DoGetIntegerv(GL_MAX_SAMPLES, &caps.max_samples); |
| 2925 DoGetIntegerv(GL_MAX_SERVER_WAIT_TIMEOUT, &caps.max_server_wait_timeout); |
| 2926 DoGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS, |
| 2927 &caps.max_transform_feedback_interleaved_components); |
2901 DoGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, | 2928 DoGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, |
2902 &caps.max_transform_feedback_separate_attribs); | 2929 &caps.max_transform_feedback_separate_attribs); |
| 2930 DoGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS, |
| 2931 &caps.max_transform_feedback_separate_components); |
| 2932 DoGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &caps.max_uniform_block_size); |
2903 DoGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, | 2933 DoGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, |
2904 &caps.max_uniform_buffer_bindings); | 2934 &caps.max_uniform_buffer_bindings); |
| 2935 DoGetIntegerv(GL_MAX_VARYING_COMPONENTS, &caps.max_varying_components); |
| 2936 DoGetIntegerv(GL_MAX_VERTEX_OUTPUT_COMPONENTS, |
| 2937 &caps.max_vertex_output_components); |
| 2938 DoGetIntegerv(GL_MAX_VERTEX_UNIFORM_BLOCKS, |
| 2939 &caps.max_vertex_uniform_blocks); |
| 2940 DoGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, |
| 2941 &caps.max_vertex_uniform_components); |
| 2942 DoGetIntegerv(GL_MIN_PROGRAM_TEXEL_OFFSET, &caps.min_program_texel_offset); |
| 2943 DoGetIntegerv(GL_NUM_EXTENSIONS, &caps.num_extensions); |
| 2944 DoGetIntegerv(GL_NUM_PROGRAM_BINARY_FORMATS, |
| 2945 &caps.num_program_binary_formats); |
2905 DoGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, | 2946 DoGetIntegerv(GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, |
2906 &caps.uniform_buffer_offset_alignment); | 2947 &caps.uniform_buffer_offset_alignment); |
| 2948 // TODO(zmo): once we switch to MANGLE, we should query version numbers. |
| 2949 caps.major_version = 3; |
| 2950 caps.minor_version = 0; |
2907 } | 2951 } |
2908 | 2952 |
2909 caps.egl_image_external = | 2953 caps.egl_image_external = |
2910 feature_info_->feature_flags().oes_egl_image_external; | 2954 feature_info_->feature_flags().oes_egl_image_external; |
2911 caps.texture_format_atc = | 2955 caps.texture_format_atc = |
2912 feature_info_->feature_flags().ext_texture_format_atc; | 2956 feature_info_->feature_flags().ext_texture_format_atc; |
2913 caps.texture_format_bgra8888 = | 2957 caps.texture_format_bgra8888 = |
2914 feature_info_->feature_flags().ext_texture_format_bgra8888; | 2958 feature_info_->feature_flags().ext_texture_format_bgra8888; |
2915 caps.texture_format_dxt1 = | 2959 caps.texture_format_dxt1 = |
2916 feature_info_->feature_flags().ext_texture_format_dxt1; | 2960 feature_info_->feature_flags().ext_texture_format_dxt1; |
(...skipping 9651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12568 } | 12612 } |
12569 } | 12613 } |
12570 | 12614 |
12571 // Include the auto-generated part of this file. We split this because it means | 12615 // Include the auto-generated part of this file. We split this because it means |
12572 // we can easily edit the non-auto generated parts right here in this file | 12616 // we can easily edit the non-auto generated parts right here in this file |
12573 // instead of having to edit some template or the code generator. | 12617 // instead of having to edit some template or the code generator. |
12574 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 12618 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
12575 | 12619 |
12576 } // namespace gles2 | 12620 } // namespace gles2 |
12577 } // namespace gpu | 12621 } // namespace gpu |
OLD | NEW |