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

Unified Diff: ui/gl/gl_version_info.cc

Issue 2460943002: Lower ES3 capable requirement to GL 3.3 with extensions. (Closed)
Patch Set: fix win build Created 4 years, 2 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
« gpu/command_buffer/service/gpu_preferences.h ('K') | « ui/gl/gl_switches.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_version_info.cc
diff --git a/ui/gl/gl_version_info.cc b/ui/gl/gl_version_info.cc
index aae40dd1f3f82a79633dbd863655255dbd78b8bf..a9365e0c768233712088abf327056539cf0bb7a1 100644
--- a/ui/gl/gl_version_info.cc
+++ b/ui/gl/gl_version_info.cc
@@ -83,13 +83,23 @@ bool GLVersionInfo::IsES3Capable(
return true;
}
- // Don't try supporting ES3 on ES2, or desktop before 4.0.
- if (is_es || !IsAtLeastGL(4, 0)) {
+ // Don't try supporting ES3 on ES2, or desktop before 3.3.
+ if (is_es || !IsAtLeastGL(3, 3)) {
return false;
}
- bool has_tex_storage = has_extension("GL_ARB_texture_storage");
- return has_tex_storage;
+ bool has_transform_feedback =
+ (IsAtLeastGL(4, 0) || has_extension("GL_ARB_transform_feedback2"));
+ bool has_sampler_indexing =
+ (IsAtLeastGL(4, 0) || has_extension("GL_ARB_gpu_shader5"));
+ bool has_tex_storage =
+ (IsAtLeastGL(4, 2) || has_extension("GL_ARB_texture_storage"));
piman 2016/10/28 20:01:21 nit: you can skip IsAtLeastGL(4, 2), since it's al
Zhenyao Mo 2016/10/28 23:22:12 Done.
+
+ // TODO(cwallez) check for texture related extensions. See crbug.com/623577
+
+ return (has_transform_feedback &&
+ has_sampler_indexing &&
+ has_tex_storage);
}
void GLVersionInfo::ParseVersionString(const char* version_str,
« gpu/command_buffer/service/gpu_preferences.h ('K') | « ui/gl/gl_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698