diff options
author | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-22 23:27:05 +0000 |
---|---|---|
committer | jbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-22 23:27:05 +0000 |
commit | 14045bab00fcd742710e22364e2bec697a31f788 (patch) | |
tree | 500772af6a1ce1ed1579786121c1fb5c99c8931f /gpu | |
parent | bfa013384b6a5160779887b2a8dc2081f22c0b4e (diff) | |
download | chromium_src-14045bab00fcd742710e22364e2bec697a31f788.zip chromium_src-14045bab00fcd742710e22364e2bec697a31f788.tar.gz chromium_src-14045bab00fcd742710e22364e2bec697a31f788.tar.bz2 |
Allow cubemaps <= 1024 in size on 10.7.3 Macs
Larger cubemaps seem to work on newer versions of OS X, so raise the limits there.
BUG=154417
Review URL: https://chromiumcodereview.appspot.com/11249002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163437 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/context_group.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc index 3fe50ad..aca6002 100644 --- a/gpu/command_buffer/service/context_group.cc +++ b/gpu/command_buffer/service/context_group.cc @@ -9,6 +9,7 @@ #include "base/command_line.h" #include "base/string_util.h" +#include "base/sys_info.h" #include "gpu/command_buffer/common/id_allocator.h" #include "gpu/command_buffer/service/buffer_manager.h" #include "gpu/command_buffer/service/framebuffer_manager.h" @@ -138,7 +139,7 @@ bool ContextGroup::Initialize(const DisallowedFeatures& disallowed_features, return false; } - // Limit Intel on Mac to 4096 max tex size and 512 max cube map tex size. + // Limit Intel on Mac to 4096 max tex size and 1024 max cube map tex size. // Limit AMD on Mac to 4096 max tex size and max cube map tex size. // TODO(gman): Update this code to check for a specific version of // the drivers above which we no longer need this fix. @@ -147,8 +148,16 @@ bool ContextGroup::Initialize(const DisallowedFeatures& disallowed_features, if (feature_info_->feature_flags().is_intel) { max_texture_size = std::min( static_cast<GLint>(4096), max_texture_size); + + GLint cubemap_size_limit = 1024; + // Cubemaps > 512 in size were broken before 10.7.3. + int32 major, minor, bugfix; + base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix); + if (major < 10 || + (major == 10 && ((minor == 7 && bugfix < 3) || (minor < 7)))) + cubemap_size_limit = 512; max_cube_map_texture_size = std::min( - static_cast<GLint>(512), max_cube_map_texture_size); + cubemap_size_limit, max_cube_map_texture_size); } if (feature_info_->feature_flags().is_amd) { max_texture_size = std::min( |