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

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

Issue 1188013004: Added support for Time Elapsed queries through the command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed ppapi support Created 5 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
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 6806f126eecfad57034b913e38a67c25c3fdfdf5..a776e83fc68da95d87c56737e7d2f08cf29f63a7 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -11591,7 +11591,9 @@ error::Error GLES2DecoderImpl::HandleBeginQueryEXT(uint32 immediate_data_size,
return error::kNoError;
}
break;
- default:
+ case GL_SAMPLES_PASSED:
no sievers 2015/06/23 21:45:27 Good catch. Also, GL_SAMPLES_PASSED is actually no
David Yen 2015/06/23 23:35:32 We worked this out together, this should be okay.
+ case GL_ANY_SAMPLES_PASSED:
+ case GL_ANY_SAMPLES_PASSED_CONSERVATIVE:
no sievers 2015/06/23 21:45:27 @bajones: Do we support GL_TRANSFORM_FEEDBACK_PRIM
David Yen 2015/06/23 23:35:32 I talked this over with bajones, we do not support
if (!features().occlusion_query_boolean) {
LOCAL_SET_GL_ERROR(
GL_INVALID_OPERATION, "glBeginQueryEXT",
@@ -11599,6 +11601,19 @@ error::Error GLES2DecoderImpl::HandleBeginQueryEXT(uint32 immediate_data_size,
return error::kNoError;
}
break;
+ case GL_TIME_ELAPSED:
+ if (!query_manager_->GPUTimingAvailable()) {
+ LOCAL_SET_GL_ERROR(
+ GL_INVALID_OPERATION, "glBeginQueryEXT",
+ "not enabled for timing queries");
+ return error::kNoError;
+ }
+ break;
+ default:
+ LOCAL_SET_GL_ERROR(
+ GL_INVALID_OPERATION, "glBeginQueryEXT",
+ "unknown query target");
+ return error::kNoError;
}
if (state_.current_queries.find(target) != state_.current_queries.end()) {

Powered by Google App Engine
This is Rietveld 408576698