i965/fs: Print out the estimated cycle count in INTEL_DEBUG=wm
authorEric Anholt <eric@anholt.net>
Mon, 8 Apr 2013 23:38:57 +0000 (16:38 -0700)
committerEric Anholt <eric@anholt.net>
Mon, 29 Apr 2013 18:44:35 +0000 (11:44 -0700)
This could be used by shader-db for hopefully more accurate regression
testing.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp

index 901a36210472646cfdc60c31e57b9367f39e8d54..75671230023cc9da6bb6fd329c3851c7d00ffc63 100644 (file)
@@ -834,6 +834,11 @@ instruction_scheduler::schedule_instructions(fs_inst *next_block_header)
       }
    }
 
+   if (unlikely(INTEL_DEBUG & DEBUG_WM) && post_reg_alloc) {
+      printf("fs%d estimated execution time: %d cycles\n",
+             v->dispatch_width, time);
+   }
+
    assert(instructions_to_schedule == 0);
 }