i965: Make sure that the shader_time report at context destroy happens.
authorEric Anholt <eric@anholt.net>
Fri, 14 Dec 2012 22:02:34 +0000 (14:02 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 14 Dec 2012 23:05:10 +0000 (15:05 -0800)
Otherwise, you end up with some report from within a second of context
destroy, which is now what you really want for testing the impact of
changes

src/mesa/drivers/dri/i965/brw_vtbl.c

index f2f0e7b9590bdfa9d90dbfdb347a87988ffd0026..237ec1ef78a081af4b03313bdf13626030d38528 100644 (file)
@@ -71,6 +71,9 @@ static void brw_destroy_context( struct intel_context *intel )
    struct brw_context *brw = brw_context(&intel->ctx);
 
    if (INTEL_DEBUG & DEBUG_SHADER_TIME) {
+      /* Force a report. */
+      brw->shader_time.report_time = 0;
+
       brw_collect_and_report_shader_time(brw);
       brw_destroy_shader_time(brw);
    }