summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/context_group.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/command_buffer/service/context_group.cc')
-rw-r--r--gpu/command_buffer/service/context_group.cc13
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(