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

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

Issue 2145363002: Enable occlusion query feature on OpenGL3.3 and later (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve related unittest errors Created 4 years, 5 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
Index: gpu/command_buffer/service/query_manager.cc
diff --git a/gpu/command_buffer/service/query_manager.cc b/gpu/command_buffer/service/query_manager.cc
index a5071e335d7ad1cb9088f785168894d98293e995..f353eae6c9f9248d3c812161aedd8dd6600461b5 100644
--- a/gpu/command_buffer/service/query_manager.cc
+++ b/gpu/command_buffer/service/query_manager.cc
@@ -714,6 +714,12 @@ QueryManager::QueryManager(
use_arb_occlusion_query_for_occlusion_query_boolean_(
feature_info->feature_flags(
).use_arb_occlusion_query_for_occlusion_query_boolean),
+ no_covert_any_samples_passed_conservative_target_for_es3_(
+ feature_info->feature_flags(
+ ).no_covert_any_samples_passed_conservative_target_for_es3),
+ covert_any_samples_passed_conservative_target_for_low_gl_(
+ feature_info->feature_flags(
+ ).covert_any_samples_passed_conservative_target_for_low_gl),
update_disjoints_continually_(false),
disjoint_notify_shm_id_(-1),
disjoint_notify_shm_offset_(0),
@@ -876,16 +882,23 @@ GLenum QueryManager::AdjustTargetForEmulation(GLenum target) {
switch (target) {
case GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT:
case GL_ANY_SAMPLES_PASSED_EXT:
- if (use_arb_occlusion_query2_for_occlusion_query_boolean_) {
- // ARB_occlusion_query2 does not have a
- // GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT
- // target.
- target = GL_ANY_SAMPLES_PASSED_EXT;
- } else if (use_arb_occlusion_query_for_occlusion_query_boolean_) {
- // ARB_occlusion_query does not have a
- // GL_ANY_SAMPLES_PASSED_EXT
- // target.
- target = GL_SAMPLES_PASSED_ARB;
+ if (!no_covert_any_samples_passed_conservative_target_for_es3_) {
+ if (use_arb_occlusion_query2_for_occlusion_query_boolean_) {
+ // ARB_occlusion_query2 does not have a
+ // GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT
+ // target.
+ target = GL_ANY_SAMPLES_PASSED_EXT;
+ } else if (use_arb_occlusion_query_for_occlusion_query_boolean_) {
+ // ARB_occlusion_query does not have a
+ // GL_ANY_SAMPLES_PASSED_EXT
+ // target.
+ target = GL_SAMPLES_PASSED_ARB;
+ } else if (covert_any_samples_passed_conservative_target_for_low_gl_) {
+ // When underlying driver is lower than OpenGL4.3, it does not have a
+ // GL_ANY_SAMPLES_PASSED_CONSERVATIVE
+ // target.
+ target = GL_ANY_SAMPLES_PASSED_EXT;
+ }
}
break;
default:
« gpu/command_buffer/service/feature_info.cc ('K') | « gpu/command_buffer/service/query_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698