OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef GPU_COMMAND_BUFFER_COMMON_CAPABILITIES_H_ | 5 #ifndef GPU_COMMAND_BUFFER_COMMON_CAPABILITIES_H_ |
6 #define GPU_COMMAND_BUFFER_COMMON_CAPABILITIES_H_ | 6 #define GPU_COMMAND_BUFFER_COMMON_CAPABILITIES_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "gpu/gpu_export.h" | 10 #include "gpu/gpu_export.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 template <typename T> | 62 template <typename T> |
63 void VisitPrecisions(const T& visitor) { | 63 void VisitPrecisions(const T& visitor) { |
64 VisitStagePrecisions(GL_VERTEX_SHADER, &vertex_shader_precisions, visitor); | 64 VisitStagePrecisions(GL_VERTEX_SHADER, &vertex_shader_precisions, visitor); |
65 VisitStagePrecisions(GL_FRAGMENT_SHADER, &fragment_shader_precisions, | 65 VisitStagePrecisions(GL_FRAGMENT_SHADER, &fragment_shader_precisions, |
66 visitor); | 66 visitor); |
67 } | 67 } |
68 | 68 |
69 PerStagePrecisions vertex_shader_precisions; | 69 PerStagePrecisions vertex_shader_precisions; |
70 PerStagePrecisions fragment_shader_precisions; | 70 PerStagePrecisions fragment_shader_precisions; |
71 int max_combined_texture_image_units = 0; | 71 int max_combined_texture_image_units; |
72 int max_cube_map_texture_size = 0; | 72 int max_cube_map_texture_size; |
73 int max_fragment_uniform_vectors = 0; | 73 int max_fragment_uniform_vectors; |
74 int max_renderbuffer_size = 0; | 74 int max_renderbuffer_size; |
75 int max_texture_image_units = 0; | 75 int max_texture_image_units; |
76 int max_texture_size = 0; | 76 int max_texture_size; |
77 int max_varying_vectors = 0; | 77 int max_varying_vectors; |
78 int max_vertex_attribs = 0; | 78 int max_vertex_attribs; |
79 int max_vertex_texture_image_units = 0; | 79 int max_vertex_texture_image_units; |
80 int max_vertex_uniform_vectors = 0; | 80 int max_vertex_uniform_vectors; |
81 // MAX_VIEWPORT_DIMS[2] | 81 // MAX_VIEWPORT_DIMS[2] |
82 int max_viewport_width = 0; | 82 int max_viewport_width; |
83 int max_viewport_height = 0; | 83 int max_viewport_height; |
84 int num_compressed_texture_formats = 0; | 84 int num_compressed_texture_formats; |
85 int num_shader_binary_formats = 0; | 85 int num_shader_binary_formats; |
86 int num_stencil_bits = 0; // For the default framebuffer. | 86 int num_stencil_bits; // For the default framebuffer. |
87 int bind_generates_resource_chromium = 0; | 87 int bind_generates_resource_chromium; |
88 | 88 |
89 int max_3d_texture_size = 0; | 89 int max_3d_texture_size; |
90 int max_array_texture_layers = 0; | 90 int max_array_texture_layers; |
91 int max_color_attachments = 0; | 91 int max_color_attachments; |
92 int64_t max_combined_fragment_uniform_components = 0; | 92 int64_t max_combined_fragment_uniform_components; |
93 int max_combined_uniform_blocks = 0; | 93 int max_combined_uniform_blocks; |
94 int64_t max_combined_vertex_uniform_components = 0; | 94 int64_t max_combined_vertex_uniform_components; |
95 int max_copy_texture_chromium_size = 0; | 95 int max_copy_texture_chromium_size; |
96 int max_draw_buffers = 0; | 96 int max_draw_buffers; |
97 int64_t max_element_index = 0; | 97 int64_t max_element_index; |
98 int max_elements_indices = 0; | 98 int max_elements_indices; |
99 int max_elements_vertices = 0; | 99 int max_elements_vertices; |
100 int max_fragment_input_components = 0; | 100 int max_fragment_input_components; |
101 int max_fragment_uniform_blocks = 0; | 101 int max_fragment_uniform_blocks; |
102 int max_fragment_uniform_components = 0; | 102 int max_fragment_uniform_components; |
103 int max_program_texel_offset = 0; | 103 int max_program_texel_offset; |
104 int max_samples = 0; | 104 int max_samples; |
105 int64_t max_server_wait_timeout = 0; | 105 int64_t max_server_wait_timeout; |
106 float max_texture_lod_bias = 0.f; | 106 float max_texture_lod_bias; |
107 int max_transform_feedback_interleaved_components = 0; | 107 int max_transform_feedback_interleaved_components; |
108 int max_transform_feedback_separate_attribs = 0; | 108 int max_transform_feedback_separate_attribs; |
109 int max_transform_feedback_separate_components = 0; | 109 int max_transform_feedback_separate_components; |
110 int64_t max_uniform_block_size = 0; | 110 int64_t max_uniform_block_size; |
111 int max_uniform_buffer_bindings = 0; | 111 int max_uniform_buffer_bindings; |
112 int max_varying_components = 0; | 112 int max_varying_components; |
113 int max_vertex_output_components = 0; | 113 int max_vertex_output_components; |
114 int max_vertex_uniform_blocks = 0; | 114 int max_vertex_uniform_blocks; |
115 int max_vertex_uniform_components = 0; | 115 int max_vertex_uniform_components; |
116 int min_program_texel_offset = 0; | 116 int min_program_texel_offset; |
117 int num_extensions = 0; | 117 int num_extensions; |
118 int num_program_binary_formats = 0; | 118 int num_program_binary_formats; |
119 int uniform_buffer_offset_alignment = 1; | 119 int uniform_buffer_offset_alignment; |
120 | 120 |
121 bool post_sub_buffer = false; | 121 bool post_sub_buffer; |
122 bool swap_buffers_with_damage = false; | 122 bool swap_buffers_with_damage; |
123 bool commit_overlay_planes = false; | 123 bool commit_overlay_planes; |
124 bool egl_image_external = false; | 124 bool egl_image_external; |
125 bool texture_format_astc = false; | 125 bool texture_format_astc; |
126 bool texture_format_atc = false; | 126 bool texture_format_atc; |
127 bool texture_format_bgra8888 = false; | 127 bool texture_format_bgra8888; |
128 bool texture_format_dxt1 = false; | 128 bool texture_format_dxt1; |
129 bool texture_format_dxt5 = false; | 129 bool texture_format_dxt5; |
130 bool texture_format_etc1 = false; | 130 bool texture_format_etc1; |
131 bool texture_format_etc1_npot = false; | 131 bool texture_format_etc1_npot; |
132 bool texture_rectangle = false; | 132 bool texture_rectangle; |
133 bool iosurface = false; | 133 bool iosurface; |
134 bool texture_usage = false; | 134 bool texture_usage; |
135 bool texture_storage = false; | 135 bool texture_storage; |
136 bool discard_framebuffer = false; | 136 bool discard_framebuffer; |
137 bool sync_query = false; | 137 bool sync_query; |
138 bool future_sync_points = false; | 138 bool future_sync_points; |
139 bool blend_equation_advanced = false; | 139 bool blend_equation_advanced; |
140 bool blend_equation_advanced_coherent = false; | 140 bool blend_equation_advanced_coherent; |
141 bool texture_rg = false; | 141 bool texture_rg; |
142 bool texture_half_float_linear = false; | 142 bool texture_half_float_linear; |
143 bool color_buffer_float = false; | 143 bool image_ycbcr_422; |
144 bool image_ycbcr_422 = false; | 144 bool image_ycbcr_420v; |
145 bool image_ycbcr_420v = false; | 145 bool render_buffer_format_bgra8888; |
146 bool render_buffer_format_bgra8888 = false; | 146 bool occlusion_query; |
147 bool occlusion_query = false; | 147 bool occlusion_query_boolean; |
148 bool occlusion_query_boolean = false; | 148 bool timer_queries; |
149 bool timer_queries = false; | 149 bool surfaceless; |
150 bool surfaceless = false; | 150 bool flips_vertically; |
151 bool flips_vertically = false; | 151 bool msaa_is_slow; |
152 bool msaa_is_slow = false; | 152 bool disable_one_component_textures; |
153 bool disable_one_component_textures = false; | 153 bool disable_multisampling_color_mask_usage; |
154 bool disable_multisampling_color_mask_usage = false; | 154 bool disable_webgl_rgb_multisampling_usage; |
155 bool disable_webgl_rgb_multisampling_usage = false; | |
156 | 155 |
157 // When this parameter is true, a CHROMIUM image created with RGB format will | 156 // When this parameter is true, a CHROMIUM image created with RGB format will |
158 // actually have RGBA format. The client is responsible for handling most of | 157 // actually have RGBA format. The client is responsible for handling most of |
159 // the complexities associated with this. See | 158 // the complexities associated with this. See |
160 // gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt for more | 159 // gpu/GLES2/extensions/CHROMIUM/CHROMIUM_gpu_memory_buffer_image.txt for more |
161 // details. | 160 // details. |
162 bool chromium_image_rgb_emulation = false; | 161 bool chromium_image_rgb_emulation; |
163 | 162 |
164 // When true, RGB framebuffer formats are unsupported. Emulate with RGBA to | 163 // When true, RGB framebuffer formats are unsupported. Emulate with RGBA to |
165 // work around this. See https://crbug.com/449150 for an example. | 164 // work around this. See https://crbug.com/449150 for an example. |
166 bool emulate_rgb_buffer_with_rgba = false; | 165 bool emulate_rgb_buffer_with_rgba; |
167 | 166 |
168 int major_version = 2; | 167 int major_version; |
169 int minor_version = 0; | 168 int minor_version; |
170 }; | 169 }; |
171 | 170 |
172 } // namespace gpu | 171 } // namespace gpu |
173 | 172 |
174 #endif // GPU_COMMAND_BUFFER_COMMON_CAPABILITIES_H_ | 173 #endif // GPU_COMMAND_BUFFER_COMMON_CAPABILITIES_H_ |
OLD | NEW |