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 #ifndef GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/sys_info.h" | 12 #include "base/sys_info.h" |
13 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 13 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
14 #include "gpu/command_buffer/service/gles2_cmd_validation.h" | 14 #include "gpu/command_buffer/service/gles2_cmd_validation.h" |
15 #include "gpu/config/gpu_driver_bug_workaround_type.h" | 15 #include "gpu/config/gpu_driver_bug_workaround_type.h" |
16 #include "gpu/gpu_export.h" | 16 #include "gpu/gpu_export.h" |
17 | 17 |
18 class CommandLine; | 18 class CommandLine; |
19 | 19 |
20 namespace gpu { | 20 namespace gpu { |
21 namespace gles2 { | 21 namespace gles2 { |
22 | 22 |
23 // FeatureInfo records the features that are available for a ContextGroup. | 23 // FeatureInfo records the features that are available for a ContextGroup. |
24 class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { | 24 class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { |
25 public: | 25 public: |
26 struct FeatureFlags { | 26 struct FeatureFlags { |
27 FeatureFlags(); | 27 FeatureFlags(); |
28 | 28 |
29 bool chromium_framebuffer_multisample; | 29 bool chromium_framebuffer_multisample; |
| 30 // Use glBlitFramebuffer() and glRenderbufferStorageMultisample() with |
| 31 // GL_EXT_framebuffer_multisample-style semantics, since they are exposed |
| 32 // as core GL functions on this implementation. |
| 33 bool use_core_framebuffer_multisample; |
30 bool multisampled_render_to_texture; | 34 bool multisampled_render_to_texture; |
31 // Use the IMG GLenum values and functions rather than EXT. | 35 // Use the IMG GLenum values and functions rather than EXT. |
32 bool use_img_for_multisampled_render_to_texture; | 36 bool use_img_for_multisampled_render_to_texture; |
33 bool oes_standard_derivatives; | 37 bool oes_standard_derivatives; |
34 bool oes_egl_image_external; | 38 bool oes_egl_image_external; |
35 bool oes_depth24; | 39 bool oes_depth24; |
| 40 bool packed_depth24_stencil8; |
36 bool npot_ok; | 41 bool npot_ok; |
37 bool enable_texture_float_linear; | 42 bool enable_texture_float_linear; |
38 bool enable_texture_half_float_linear; | 43 bool enable_texture_half_float_linear; |
39 bool chromium_stream_texture; | 44 bool chromium_stream_texture; |
40 bool angle_translated_shader_source; | 45 bool angle_translated_shader_source; |
41 bool angle_pack_reverse_row_order; | 46 bool angle_pack_reverse_row_order; |
42 bool arb_texture_rectangle; | 47 bool arb_texture_rectangle; |
43 bool angle_instanced_arrays; | 48 bool angle_instanced_arrays; |
44 bool occlusion_query_boolean; | 49 bool occlusion_query_boolean; |
45 bool use_arb_occlusion_query2_for_occlusion_query_boolean; | 50 bool use_arb_occlusion_query2_for_occlusion_query_boolean; |
46 bool use_arb_occlusion_query_for_occlusion_query_boolean; | 51 bool use_arb_occlusion_query_for_occlusion_query_boolean; |
47 bool native_vertex_array_object; | 52 bool native_vertex_array_object; |
48 bool enable_shader_name_hashing; | 53 bool enable_shader_name_hashing; |
49 bool enable_samplers; | 54 bool enable_samplers; |
50 bool ext_draw_buffers; | 55 bool ext_draw_buffers; |
51 bool ext_frag_depth; | 56 bool ext_frag_depth; |
52 bool use_async_readpixels; | 57 bool use_async_readpixels; |
53 bool map_buffer_range; | 58 bool map_buffer_range; |
54 bool ext_discard_framebuffer; | 59 bool ext_discard_framebuffer; |
55 bool angle_depth_texture; | 60 bool angle_depth_texture; |
| 61 bool is_angle; |
56 }; | 62 }; |
57 | 63 |
58 struct Workarounds { | 64 struct Workarounds { |
59 Workarounds(); | 65 Workarounds(); |
60 | 66 |
61 #define GPU_OP(type, name) bool name; | 67 #define GPU_OP(type, name) bool name; |
62 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) | 68 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) |
63 #undef GPU_OP | 69 #undef GPU_OP |
64 | 70 |
65 // Note: 0 here means use driver limit. | 71 // Note: 0 here means use driver limit. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // Flags for Workarounds. | 130 // Flags for Workarounds. |
125 Workarounds workarounds_; | 131 Workarounds workarounds_; |
126 | 132 |
127 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); | 133 DISALLOW_COPY_AND_ASSIGN(FeatureInfo); |
128 }; | 134 }; |
129 | 135 |
130 } // namespace gles2 | 136 } // namespace gles2 |
131 } // namespace gpu | 137 } // namespace gpu |
132 | 138 |
133 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ | 139 #endif // GPU_COMMAND_BUFFER_SERVICE_FEATURE_INFO_H_ |
OLD | NEW |