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

Unified Diff: gpu/perftests/texture_upload_perftest.cc

Issue 1066863002: TextureUploadPerfTest.renaming should output renaming status Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/perftests/texture_upload_perftest.cc
diff --git a/gpu/perftests/texture_upload_perftest.cc b/gpu/perftests/texture_upload_perftest.cc
index 3a1af627acd344cb5e79dae661b594da677437e9..f77470bf89342dc49f29d9d4c55c4b863be78613 100644
--- a/gpu/perftests/texture_upload_perftest.cc
+++ b/gpu/perftests/texture_upload_perftest.cc
@@ -504,14 +504,20 @@ TEST_F(TextureUploadPerfTest, renaming) {
MeasurementTimers upload_and_draw_timers(gpu_timing_client_.get());
+ GLint current_tex_id = -1;
+ bool is_renaming = false;
for (int i = 0; i < 4; ++i) {
UploadTexture(texture_id, texture_size, pixels[i % 4], GL_RGBA, true);
+ if (!is_renaming && current_tex_id != -1 &&
+ static_cast<GLuint>(current_tex_id) != texture_id)
+ is_renaming = true;
DCHECK_NE(-1, translation_location_);
glUniform2f(translation_location_, positions[i % 4].x(),
positions[i % 4].y());
// Draw the same quad multiple times to make sure that the time spent on the
// gpu is more than the cpu time.
for (int draw = 0; draw < 128; ++draw) {
+ glGetIntegerv(GL_TEXTURE_BINDING_2D, &current_tex_id);
Daniele Castagna 2015/04/07 16:27:08 This returns the name of the texture currently bou
patro 2015/04/08 15:19:49 You are right this patch doesn't work as intended.
Daniele Castagna 2015/04/14 16:13:15 I was thinking about this perftest to print out ra
sivag 2015/04/27 12:39:02 Daniele, Can you elaborate more on this? How this
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
}
@@ -541,6 +547,14 @@ TEST_F(TextureUploadPerfTest, renaming) {
upload_and_draw_timers.GetAsMeasurement("upload_and_draw")
.PrintResult("renaming");
finish_timers.GetAsMeasurement("finish").PrintResult("renaming");
+ if (is_renaming)
+ perf_test::PrintResult("renaming", "",
+ "Driver renames texture internally", "True", "",
+ true);
+ else
+ perf_test::PrintResult("renaming", "",
+ "Driver renames texture internally", "False", "",
+ true);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698