Bug 1522352 - Add GPU timer group for scale operations. r=kamidphish
authorGlenn Watson <github@intuitionlibrary.com>
Thu, 24 Jan 2019 02:32:08 +0000
changeset 455212 27600f531b833fed53e3eb8bf9159f2c09e24370
parent 455211 ac16e1408d672d6a94d5410b135af06ce30484a1
child 455213 768f85969239f064d87a0776afc12ac851d0ec9d
push id35423
push useropoprus@mozilla.com
push dateThu, 24 Jan 2019 10:17:05 +0000
treeherdermozilla-central@1fce91651f43 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskamidphish
bugs1522352
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1522352 - Add GPU timer group for scale operations. r=kamidphish Differential Revision: https://phabricator.services.mozilla.com/D17432
gfx/wr/webrender/src/renderer.rs
--- a/gfx/wr/webrender/src/renderer.rs
+++ b/gfx/wr/webrender/src/renderer.rs
@@ -174,16 +174,20 @@ const GPU_TAG_PRIM_TEXT_RUN: GpuProfileT
 const GPU_TAG_BLUR: GpuProfileTag = GpuProfileTag {
     label: "Blur",
     color: debug_colors::VIOLET,
 };
 const GPU_TAG_BLIT: GpuProfileTag = GpuProfileTag {
     label: "Blit",
     color: debug_colors::LIME,
 };
+const GPU_TAG_SCALE: GpuProfileTag = GpuProfileTag {
+    label: "Scale",
+    color: debug_colors::GHOSTWHITE,
+};
 
 const GPU_SAMPLER_TAG_ALPHA: GpuProfileTag = GpuProfileTag {
     label: "Alpha Targets",
     color: debug_colors::BLACK,
 };
 const GPU_SAMPLER_TAG_OPAQUE: GpuProfileTag = GpuProfileTag {
     label: "Opaque Pass",
     color: debug_colors::BLACK,
@@ -3084,16 +3088,18 @@ impl Renderer {
         source: TextureSource,
         projection: &Transform3D<f32>,
         stats: &mut RendererStats,
     ) {
         if scalings.is_empty() {
             return
         }
 
+        let _timer = self.gpu_profile.start_timer(GPU_TAG_SCALE);
+
         match source {
             TextureSource::PrevPassColor => {
                 self.shaders.borrow_mut().cs_scale_rgba8.bind(&mut self.device,
                                                               &projection,
                                                               &mut self.renderer_errors);
             }
             TextureSource::PrevPassAlpha => {
                 self.shaders.borrow_mut().cs_scale_a8.bind(&mut self.device,
@@ -4054,17 +4060,17 @@ impl Renderer {
         self.device.disable_depth_write();
         self.set_blend(false, FramebufferKind::Other);
         self.device.disable_stencil();
 
         self.bind_frame_data(frame);
         self.texture_resolver.begin_frame();
 
         for (pass_index, pass) in frame.passes.iter_mut().enumerate() {
-            self.gpu_profile.place_marker(&format!("pass {}", pass_index));
+            let _gm = self.gpu_profile.start_marker(&format!("pass {}", pass_index));
 
             self.texture_resolver.bind(
                 &TextureSource::PrevPassAlpha,
                 TextureSampler::PrevPassAlpha,
                 &mut self.device,
             );
             self.texture_resolver.bind(
                 &TextureSource::PrevPassColor,