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

Unified Diff: ui/gl/gl_version_info.cc

Issue 2460943002: Lower ES3 capable requirement to GL 3.3 with extensions. (Closed)
Patch Set: address piman comment 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
« no previous file with comments | « 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..bce82642e1d015ee0e878361282bf49fadc50025 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_transform_feedback =
+ (IsAtLeastGL(4, 0) || has_extension("GL_ARB_transform_feedback2"));
+ bool has_sampler_indexing =
+ (IsAtLeastGL(4, 0) || has_extension("GL_ARB_gpu_shader5"));
+ // tex storage is available in core spec since GL 4.2.
bool has_tex_storage = has_extension("GL_ARB_texture_storage");
- return has_tex_storage;
+
+ // 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,
« no previous file with comments | « ui/gl/gl_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698