Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: gpu/command_buffer/service/feature_info.cc

Issue 960873002: Update from https://crrev.com/318214 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/feature_info.h ('k') | gpu/command_buffer/service/feature_info_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 803b1210b8e55c96764869810a5ddc7a5e9130a3..897afd3477adb3a314093c8849077a6d1b1fc9b3 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -132,7 +132,10 @@ FeatureInfo::FeatureFlags::FeatureFlags()
use_arb_occlusion_query2_for_occlusion_query_boolean(false),
use_arb_occlusion_query_for_occlusion_query_boolean(false),
native_vertex_array_object(false),
+ ext_texture_format_atc(false),
ext_texture_format_bgra8888(false),
+ ext_texture_format_dxt1(false),
+ ext_texture_format_dxt5(false),
enable_shader_name_hashing(false),
enable_samplers(false),
ext_draw_buffers(false),
@@ -333,6 +336,8 @@ void FeatureInfo::InitializeFeatures() {
}
if (enable_dxt1) {
+ feature_flags_.ext_texture_format_dxt1 = true;
+
AddExtensionString("GL_EXT_texture_compression_dxt1");
validators_.compressed_texture_format.AddValue(
GL_COMPRESSED_RGB_S3TC_DXT1_EXT);
@@ -350,6 +355,8 @@ void FeatureInfo::InitializeFeatures() {
}
if (enable_dxt5) {
+ feature_flags_.ext_texture_format_dxt5 = true;
+
// The difference between GL_EXT_texture_compression_s3tc and
// GL_CHROMIUM_texture_compression_dxt5 is that the former
// requires on the fly compression. The latter does not.
@@ -358,6 +365,17 @@ void FeatureInfo::InitializeFeatures() {
GL_COMPRESSED_RGBA_S3TC_DXT5_EXT);
}
+ bool have_atc = extensions.Contains("GL_AMD_compressed_ATC_texture") ||
+ extensions.Contains("GL_ATI_texture_compression_atitc");
+ if (have_atc) {
+ feature_flags_.ext_texture_format_atc = true;
+
+ AddExtensionString("GL_AMD_compressed_ATC_texture");
+ validators_.compressed_texture_format.AddValue(GL_ATC_RGB_AMD);
+ validators_.compressed_texture_format.AddValue(
+ GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD);
+ }
+
// Check if we should enable GL_EXT_texture_filter_anisotropic.
if (extensions.Contains("GL_EXT_texture_filter_anisotropic")) {
AddExtensionString("GL_EXT_texture_filter_anisotropic");
@@ -471,7 +489,9 @@ void FeatureInfo::InitializeFeatures() {
enable_texture_format_bgra8888 = true;
}
- if (extensions.Contains("GL_EXT_bgra")) {
+ // Only desktop GL extension GL_EXT_bgra or ANGLE guarantee that we can
+ // allocate a renderbuffer with this format.
+ if (extensions.Contains("GL_EXT_bgra") || gl_version_info_->is_angle) {
enable_render_buffer_bgra = true;
}
« no previous file with comments | « gpu/command_buffer/service/feature_info.h ('k') | gpu/command_buffer/service/feature_info_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698