diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-23 22:43:15 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-23 22:43:15 +0000 |
commit | 62e155e92cfb165405fb3e6bc6c8dc5f2e9a95ac (patch) | |
tree | c880a8e1f73d8ed4d0da13299460d2f2559c885c /gpu/command_buffer/service/feature_info.h | |
parent | e4de4d19d22ee0fd320b2f275858acdf3d44694d (diff) | |
download | chromium_src-62e155e92cfb165405fb3e6bc6c8dc5f2e9a95ac.zip chromium_src-62e155e92cfb165405fb3e6bc6c8dc5f2e9a95ac.tar.gz chromium_src-62e155e92cfb165405fb3e6bc6c8dc5f2e9a95ac.tar.bz2 |
Move workarounds to one spot.
I felt like all the platform checks should only be in one place
and the workarounds should work on flags rather than specific
platforms.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/11250002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163709 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service/feature_info.h')
-rw-r--r-- | gpu/command_buffer/service/feature_info.h | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/gpu/command_buffer/service/feature_info.h b/gpu/command_buffer/service/feature_info.h index 2f3268d..076264e 100644 --- a/gpu/command_buffer/service/feature_info.h +++ b/gpu/command_buffer/service/feature_info.h @@ -8,6 +8,7 @@ #include <string> #include "base/hash_tables.h" #include "base/memory/ref_counted.h" +#include "base/sys_info.h" #include "gpu/command_buffer/service/gles2_cmd_decoder.h" #include "gpu/command_buffer/service/gles2_cmd_validation.h" #include "gpu/gpu_export.h" @@ -38,12 +39,24 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { bool occlusion_query_boolean; bool use_arb_occlusion_query2_for_occlusion_query_boolean; bool use_arb_occlusion_query_for_occlusion_query_boolean; - bool native_vertex_array_object_; + bool native_vertex_array_object; bool disable_workarounds; - bool is_intel; - bool is_nvidia; - bool is_amd; - bool is_mesa; + }; + + struct Workarounds { + Workarounds(); + + bool clear_alpha_in_readpixels; + bool clear_uniforms_before_program_use; + bool needs_glsl_built_in_function_emulation; + bool needs_offscreen_buffer_workaround; + bool reverse_point_sprite_coord_origin; + bool set_texture_filter_before_generating_mipmap; + bool use_current_program_after_successful_link; + + // Note: 0 here means use driver limit. + GLint max_texture_size; + GLint max_cube_map_texture_size; }; FeatureInfo(); @@ -74,6 +87,10 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { return feature_flags_; } + const Workarounds& workarounds() const { + return workarounds_; + } + private: friend class base::RefCounted<FeatureInfo>; @@ -94,6 +111,9 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> { // Flags for some features FeatureFlags feature_flags_; + // Flags for Workarounds. + Workarounds workarounds_; + DISALLOW_COPY_AND_ASSIGN(FeatureInfo); }; |