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

Unified Diff: ui/gl/gl_version_info.cc

Issue 2109773003: GLVersionInfo: for ES3 check for sampler array indexing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comment Created 4 years, 6 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 | « no previous file | 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 f91321aa160212ccec4a01f02ddd211611d9ae0d..31392527db15c7a34ecaefbb75146c0a253fbcd1 100644
--- a/ui/gl/gl_version_info.cc
+++ b/ui/gl/gl_version_info.cc
@@ -90,6 +90,11 @@ bool GLVersionInfo::IsES3Capable(
has_extension("GL_ARB_shader_bit_encoding");
bool has_transform_feedback =
IsAtLeastGL(4, 0) || has_extension("GL_ARB_transform_feedback2");
+ // Technically this is required for ES2 as well, but some drivers silently
+ // support it, without the required extensions. To avoid breaking WebGL for
+ // some users, only require detectable support for ES3.
+ bool has_sampler_indexing =
+ IsAtLeastGL(4, 0) || is_es || has_extension("GL_ARB_gpu_shader5");
bool has_samplers =
IsAtLeastGL(3, 3) || has_extension("GL_ARB_sampler_object");
bool has_swizzle = IsAtLeastGL(3, 3) ||
@@ -100,8 +105,8 @@ bool GLVersionInfo::IsES3Capable(
// TODO(cwallez) check for texture related extensions. See crbug.com/623577
- return has_shader_packing && has_transform_feedback && has_samplers &&
- has_swizzle && has_attrib_location;
+ return has_shader_packing && has_transform_feedback && has_sampler_indexing &&
+ has_samplers && has_swizzle && has_attrib_location;
}
void GLVersionInfo::ParseVersionString(const char* version_str,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698