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