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 <cmath> | 10 #include <cmath> |
(...skipping 2965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2976 &caps.num_compressed_texture_formats); | 2976 &caps.num_compressed_texture_formats); |
2977 DoGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &caps.num_shader_binary_formats); | 2977 DoGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &caps.num_shader_binary_formats); |
2978 DoGetIntegerv(GL_BIND_GENERATES_RESOURCE_CHROMIUM, | 2978 DoGetIntegerv(GL_BIND_GENERATES_RESOURCE_CHROMIUM, |
2979 &caps.bind_generates_resource_chromium); | 2979 &caps.bind_generates_resource_chromium); |
2980 if (unsafe_es3_apis_enabled()) { | 2980 if (unsafe_es3_apis_enabled()) { |
2981 // TODO(zmo): Note that some parameter values could be more than 32-bit, | 2981 // TODO(zmo): Note that some parameter values could be more than 32-bit, |
2982 // but for now we clamp them to 32-bit max. | 2982 // but for now we clamp them to 32-bit max. |
2983 DoGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, &caps.max_3d_texture_size); | 2983 DoGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, &caps.max_3d_texture_size); |
2984 DoGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS, &caps.max_array_texture_layers); | 2984 DoGetIntegerv(GL_MAX_ARRAY_TEXTURE_LAYERS, &caps.max_array_texture_layers); |
2985 DoGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, &caps.max_color_attachments); | 2985 DoGetIntegerv(GL_MAX_COLOR_ATTACHMENTS, &caps.max_color_attachments); |
2986 DoGetIntegerv(GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS, | 2986 DoGetInteger64v(GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS, |
2987 &caps.max_combined_fragment_uniform_components); | 2987 &caps.max_combined_fragment_uniform_components); |
2988 DoGetIntegerv(GL_MAX_COMBINED_UNIFORM_BLOCKS, | 2988 DoGetIntegerv(GL_MAX_COMBINED_UNIFORM_BLOCKS, |
2989 &caps.max_combined_uniform_blocks); | 2989 &caps.max_combined_uniform_blocks); |
2990 DoGetIntegerv(GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS, | 2990 DoGetInteger64v(GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS, |
2991 &caps.max_combined_vertex_uniform_components); | 2991 &caps.max_combined_vertex_uniform_components); |
2992 DoGetIntegerv(GL_MAX_DRAW_BUFFERS, &caps.max_draw_buffers); | 2992 DoGetIntegerv(GL_MAX_DRAW_BUFFERS, &caps.max_draw_buffers); |
2993 DoGetIntegerv(GL_MAX_ELEMENT_INDEX, &caps.max_element_index); | 2993 DoGetInteger64v(GL_MAX_ELEMENT_INDEX, &caps.max_element_index); |
2994 DoGetIntegerv(GL_MAX_ELEMENTS_INDICES, &caps.max_elements_indices); | 2994 DoGetIntegerv(GL_MAX_ELEMENTS_INDICES, &caps.max_elements_indices); |
2995 DoGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &caps.max_elements_vertices); | 2995 DoGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &caps.max_elements_vertices); |
2996 DoGetIntegerv(GL_MAX_FRAGMENT_INPUT_COMPONENTS, | 2996 DoGetIntegerv(GL_MAX_FRAGMENT_INPUT_COMPONENTS, |
2997 &caps.max_fragment_input_components); | 2997 &caps.max_fragment_input_components); |
2998 DoGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_BLOCKS, | 2998 DoGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_BLOCKS, |
2999 &caps.max_fragment_uniform_blocks); | 2999 &caps.max_fragment_uniform_blocks); |
3000 DoGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, | 3000 DoGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, |
3001 &caps.max_fragment_uniform_components); | 3001 &caps.max_fragment_uniform_components); |
3002 DoGetIntegerv(GL_MAX_PROGRAM_TEXEL_OFFSET, | 3002 DoGetIntegerv(GL_MAX_PROGRAM_TEXEL_OFFSET, |
3003 &caps.max_program_texel_offset); | 3003 &caps.max_program_texel_offset); |
3004 DoGetIntegerv(GL_MAX_SERVER_WAIT_TIMEOUT, &caps.max_server_wait_timeout); | 3004 DoGetInteger64v(GL_MAX_SERVER_WAIT_TIMEOUT, &caps.max_server_wait_timeout); |
3005 // Work around Linux NVIDIA driver bug where GL_TIMEOUT_IGNORED is | |
3006 // returned. | |
3007 if (caps.max_server_wait_timeout < 0) | |
3008 caps.max_server_wait_timeout = 0; | |
piman
2015/05/19 00:13:41
Is 0 really better than GL_TIMEOUT_IGNORED which i
| |
3009 DoGetFloatv(GL_MAX_TEXTURE_LOD_BIAS, &caps.max_texture_lod_bias); | |
3005 DoGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS, | 3010 DoGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS, |
3006 &caps.max_transform_feedback_interleaved_components); | 3011 &caps.max_transform_feedback_interleaved_components); |
3007 DoGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, | 3012 DoGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, |
3008 &caps.max_transform_feedback_separate_attribs); | 3013 &caps.max_transform_feedback_separate_attribs); |
3009 DoGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS, | 3014 DoGetIntegerv(GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS, |
3010 &caps.max_transform_feedback_separate_components); | 3015 &caps.max_transform_feedback_separate_components); |
3011 DoGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &caps.max_uniform_block_size); | 3016 DoGetInteger64v(GL_MAX_UNIFORM_BLOCK_SIZE, &caps.max_uniform_block_size); |
3012 DoGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, | 3017 DoGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, |
3013 &caps.max_uniform_buffer_bindings); | 3018 &caps.max_uniform_buffer_bindings); |
3014 DoGetIntegerv(GL_MAX_VARYING_COMPONENTS, &caps.max_varying_components); | 3019 DoGetIntegerv(GL_MAX_VARYING_COMPONENTS, &caps.max_varying_components); |
3015 DoGetIntegerv(GL_MAX_VERTEX_OUTPUT_COMPONENTS, | 3020 DoGetIntegerv(GL_MAX_VERTEX_OUTPUT_COMPONENTS, |
3016 &caps.max_vertex_output_components); | 3021 &caps.max_vertex_output_components); |
3017 DoGetIntegerv(GL_MAX_VERTEX_UNIFORM_BLOCKS, | 3022 DoGetIntegerv(GL_MAX_VERTEX_UNIFORM_BLOCKS, |
3018 &caps.max_vertex_uniform_blocks); | 3023 &caps.max_vertex_uniform_blocks); |
3019 DoGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, | 3024 DoGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, |
3020 &caps.max_vertex_uniform_components); | 3025 &caps.max_vertex_uniform_components); |
3021 DoGetIntegerv(GL_MIN_PROGRAM_TEXEL_OFFSET, &caps.min_program_texel_offset); | 3026 DoGetIntegerv(GL_MIN_PROGRAM_TEXEL_OFFSET, &caps.min_program_texel_offset); |
(...skipping 10211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
13233 } | 13238 } |
13234 } | 13239 } |
13235 | 13240 |
13236 // Include the auto-generated part of this file. We split this because it means | 13241 // Include the auto-generated part of this file. We split this because it means |
13237 // we can easily edit the non-auto generated parts right here in this file | 13242 // we can easily edit the non-auto generated parts right here in this file |
13238 // instead of having to edit some template or the code generator. | 13243 // instead of having to edit some template or the code generator. |
13239 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 13244 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
13240 | 13245 |
13241 } // namespace gles2 | 13246 } // namespace gles2 |
13242 } // namespace gpu | 13247 } // namespace gpu |
OLD | NEW |