summaryrefslogtreecommitdiffstats
path: root/gpu/perftests
diff options
context:
space:
mode:
authorsiva.gunturi <siva.gunturi@samsung.com>2015-03-25 00:50:59 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-25 07:51:49 +0000
commitf82e8f7c7ab63b38b715c664f3bb23a608b5d28b (patch)
tree11da66d9d54ac06f96a55138fc6880c12c1529be /gpu/perftests
parent66175b0031526dd7d2575b6bcce62a1c5c2db580 (diff)
downloadchromium_src-f82e8f7c7ab63b38b715c664f3bb23a608b5d28b.zip
chromium_src-f82e8f7c7ab63b38b715c664f3bb23a608b5d28b.tar.gz
chromium_src-f82e8f7c7ab63b38b715c664f3bb23a608b5d28b.tar.bz2
Time of first use cost of upload.
This test is to check whether there is a time-of-first-use cost (e.g. driver doesn't upload to the texture until we draw with it). BUG= 423481 Review URL: https://codereview.chromium.org/1031463002 Cr-Commit-Position: refs/heads/master@{#322131}
Diffstat (limited to 'gpu/perftests')
-rw-r--r--gpu/perftests/texture_upload_perftest.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/gpu/perftests/texture_upload_perftest.cc b/gpu/perftests/texture_upload_perftest.cc
index c14a151..b425272 100644
--- a/gpu/perftests/texture_upload_perftest.cc
+++ b/gpu/perftests/texture_upload_perftest.cc
@@ -349,8 +349,11 @@ class TextureUploadPerfTest : public testing::Test {
UploadTexture(texture_id, size, pixels, format, subimage);
tex_timers.Record();
- MeasurementTimers draw_timers(gpu_timing_client_.get());
+ MeasurementTimers first_draw_timers(gpu_timing_client_.get());
+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
+ first_draw_timers.Record();
+ MeasurementTimers draw_timers(gpu_timing_client_.get());
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
draw_timers.Record();
@@ -374,6 +377,8 @@ class TextureUploadPerfTest : public testing::Test {
if (!gpu_timer_errors) {
measurements.push_back(tex_timers.GetAsMeasurement(
subimage ? "texsubimage2d" : "teximage2d"));
+ measurements.push_back(
+ first_draw_timers.GetAsMeasurement("firstdrawarrays"));
measurements.push_back(draw_timers.GetAsMeasurement("drawarrays"));
measurements.push_back(finish_timers.GetAsMeasurement("finish"));
}