From: Eric Anholt Date: Thu, 20 Feb 2014 22:54:29 +0000 (-0800) Subject: i965: Stop throwing away our double precision for time calculations. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c2ebbe2728cd709029313f4b9c9cc53432c510a1;p=mesa.git i965: Stop throwing away our double precision for time calculations. Fixes negative times being reported in our perf debug. Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 65f2c808626..ce8a51518d5 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -3506,7 +3506,7 @@ brw_wm_fs_emit(struct brw_context *brw, struct brw_wm_compile *c, unsigned *final_assembly_size) { bool start_busy = false; - float start_time = 0; + double start_time = 0; if (unlikely(brw->perf_debug)) { start_busy = (brw->batch.last_bo && diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index fbf7fb9e78b..3c9631f53cd 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -1651,7 +1651,7 @@ brw_vs_emit(struct brw_context *brw, unsigned *final_assembly_size) { bool start_busy = false; - float start_time = 0; + double start_time = 0; if (unlikely(brw->perf_debug)) { start_busy = (brw->batch.last_bo && diff --git a/src/mesa/drivers/dri/i965/intel_buffer_objects.c b/src/mesa/drivers/dri/i965/intel_buffer_objects.c index a493c3b7d57..d286a9fef60 100644 --- a/src/mesa/drivers/dri/i965/intel_buffer_objects.c +++ b/src/mesa/drivers/dri/i965/intel_buffer_objects.c @@ -55,7 +55,7 @@ brw_bo_map(struct brw_context *brw, if (likely(!brw->perf_debug) || !drm_intel_bo_busy(bo)) return drm_intel_bo_map(bo, write_enable); - float start_time = get_time(); + double start_time = get_time(); int ret = drm_intel_bo_map(bo, write_enable); @@ -71,7 +71,7 @@ brw_bo_map_gtt(struct brw_context *brw, drm_intel_bo *bo, const char *bo_name) if (likely(!brw->perf_debug) || !drm_intel_bo_busy(bo)) return drm_intel_gem_bo_map_gtt(bo); - float start_time = get_time(); + double start_time = get_time(); int ret = drm_intel_gem_bo_map_gtt(bo);