Index: gpu/command_buffer/service/feature_info.cc |
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc |
index e58e6c21fc7b0afaa76c230f716566c9907120cf..bddffdeff1b524cc383b9b7f65c6762f6bd73729 100644 |
--- a/gpu/command_buffer/service/feature_info.cc |
+++ b/gpu/command_buffer/service/feature_info.cc |
@@ -395,10 +395,12 @@ void FeatureInfo::InitializeFeatures() { |
bool enable_texture_format_bgra8888 = false; |
bool enable_read_format_bgra = false; |
bool enable_render_buffer_bgra = false; |
+ bool enable_immutable_texture_format_bgra = |
+ extensions.Contains("GL_APPLE_texture_format_BGRA8888"); |
// Check if we should allow GL_EXT_texture_format_BGRA8888 |
if (extensions.Contains("GL_EXT_texture_format_BGRA8888") || |
- extensions.Contains("GL_APPLE_texture_format_BGRA8888") || |
+ enable_immutable_texture_format_bgra || |
extensions.Contains("GL_EXT_bgra")) { |
enable_texture_format_bgra8888 = true; |
} |
@@ -691,7 +693,12 @@ void FeatureInfo::InitializeFeatures() { |
validators_.texture_parameter.AddValue(GL_TEXTURE_USAGE_ANGLE); |
} |
- if (extensions.Contains("GL_EXT_texture_storage")) { |
+ // Only APPLE_texture_format_BGRA8888 extension allows BGRA8_EXT in ES3's |
+ // glTexStorage2D. |
+ enable_immutable_texture_format_bgra &= is_es3; |
piman
2014/08/26 19:06:29
nit: modifying this variable is hard to follow. Ho
|
+ if (extensions.Contains("GL_EXT_texture_storage") || |
+ extensions.Contains("GL_ARB_texture_storage") || |
piman
2014/08/26 19:06:29
So, GL_ARB_texture_storage doesn't by itself allow
dshwang
2014/08/26 19:24:04
Linux mesa GL driver on both desktop and chromeboo
|
+ enable_immutable_texture_format_bgra) { |
feature_flags_.ext_texture_storage = true; |
AddExtensionString("GL_EXT_texture_storage"); |
validators_.texture_parameter.AddValue(GL_TEXTURE_IMMUTABLE_FORMAT_EXT); |