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

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

Issue 1687353002: Force time elapsed queries on certain drivers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initial patch Created 4 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 | « no previous file | ui/gl/gpu_timing.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 c74942266e4bba510e32e1206eeea9bef0b8c508..6a5a725926dacc85a2efe524c6014cdc9a2776c8 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -654,10 +654,13 @@ void FeatureInfo::InitializeFeatures() {
validators_.read_pixel_format.AddValue(GL_BGRA_EXT);
}
- // We only support timer queries if we also support glGetInteger64v.
- // For GL_EXT_disjoint_timer_query, glGetInteger64v is only support under ES3.
- if ((gl_version_info_->is_es3 &&
- extensions.Contains("GL_EXT_disjoint_timer_query")) ||
+ // glGetInteger64v for timestamps is implemented on the client side in a way
+ // that it does not depend on a driver-level implementation of
+ // glGetInteger64v. The GPUTimer class which implements timer queries can also
+ // fallback to an implementation that does not depend on glGetInteget64v on
+ // ES2. Thus we can enable GL_EXT_disjoint_timer_query on ES2 contexts even
+ // though it does not support glGetInteger64v due to a specification bug.
+ if (extensions.Contains("GL_EXT_disjoint_timer_query") ||
extensions.Contains("GL_ARB_timer_query") ||
extensions.Contains("GL_EXT_timer_query")) {
AddExtensionString("GL_EXT_disjoint_timer_query");
« no previous file with comments | « no previous file | ui/gl/gpu_timing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698