summaryrefslogtreecommitdiffstats
path: root/gpu/perftests
diff options
context:
space:
mode:
authordcastagna <dcastagna@chromium.org>2015-03-10 18:58:00 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-11 01:58:26 +0000
commit0806d06c6e34ff7b175aeb8eff21654c31bfde15 (patch)
tree5ffc4cdb5e07c294831f58f65368f0cc8329b9db /gpu/perftests
parentd37de7cfeb7da061c93bf1d75d795fadf84b5cf8 (diff)
downloadchromium_src-0806d06c6e34ff7b175aeb8eff21654c31bfde15.zip
chromium_src-0806d06c6e34ff7b175aeb8eff21654c31bfde15.tar.gz
chromium_src-0806d06c6e34ff7b175aeb8eff21654c31bfde15.tar.bz2
Add support for GL_EXT_timer_query to gpu_timing.
When a GL context is created on an integrated GPU using a compatibility profile on Macbook Pro, GL_EXT_timer_query is the only timing extension available. This extension predates the two extensions currently used by gpu_timing: GL_ARB_timer_query and GL_EXT_disjoint_timer_query. Unfortunately, GL_EXT_timer_query only supports a subset of the features supported by the two newer extensions. It does not support getting the current GPU time, therefore making it harder to get a precise delta between GPU and CPU timings. It also does not support getting single timestamps from the GPU--only time deltas. This makes it harder to implement interleaved timers. This patch partially implements the classes defined in gpu_timing. The offset is not available, and the GPUTimers created cannot be interleaved. GPUTracer has been modified in order to avoid capturing GPU timing if the offset is not available. TextureUploadPerfTest has been modified in order to avoid interleaved timers. BUG= Review URL: https://codereview.chromium.org/992713003 Cr-Commit-Position: refs/heads/master@{#320025}
Diffstat (limited to 'gpu/perftests')
-rw-r--r--gpu/perftests/texture_upload_perftest.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/gpu/perftests/texture_upload_perftest.cc b/gpu/perftests/texture_upload_perftest.cc
index 85e3333..47583c4 100644
--- a/gpu/perftests/texture_upload_perftest.cc
+++ b/gpu/perftests/texture_upload_perftest.cc
@@ -244,10 +244,9 @@ class TextureUploadPerfTest : public testing::Test {
std::vector<Measurement> UploadAndDraw(const gfx::Size& size,
const std::vector<uint8>& pixels,
const GLenum format) {
- MeasurementTimers total_timers(gpu_timing_client_.get());
GLuint texture_id = 0;
-
MeasurementTimers tex_timers(gpu_timing_client_.get());
+ CheckNoGlError();
glActiveTexture(GL_TEXTURE0);
glGenTextures(1, &texture_id);
glBindTexture(GL_TEXTURE_2D, texture_id);
@@ -280,7 +279,6 @@ class TextureUploadPerfTest : public testing::Test {
glFinish();
CheckNoGlError();
finish_timers.Record();
- total_timers.Record();
glDeleteTextures(1, &texture_id);
@@ -296,7 +294,6 @@ class TextureUploadPerfTest : public testing::Test {
gpu_timing_client_->IsAvailable() &&
gpu_timing_client_->CheckAndResetTimerErrors();
if (!gpu_timer_errors) {
- measurements.push_back(total_timers.GetAsMeasurement("total"));
measurements.push_back(tex_timers.GetAsMeasurement("teximage2d"));
measurements.push_back(draw_timers.GetAsMeasurement("drawarrays"));
measurements.push_back(finish_timers.GetAsMeasurement("finish"));