summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_performance_monitor.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2015-07-11 14:36:25 -0700
committerMatt Turner <mattst88@gmail.com>2015-07-15 13:09:22 -0700
commit131573df7aea0b10e97d9d5db0d26d89f8dfef54 (patch)
tree5d1d7a2937e7cdea71fefc938dbd109bd03b703e /src/mesa/drivers/dri/i965/brw_performance_monitor.c
parent09348c12fceba59c22219fe3272260eb8ea6051e (diff)
downloadexternal_mesa3d-131573df7aea0b10e97d9d5db0d26d89f8dfef54.zip
external_mesa3d-131573df7aea0b10e97d9d5db0d26d89f8dfef54.tar.gz
external_mesa3d-131573df7aea0b10e97d9d5db0d26d89f8dfef54.tar.bz2
i965: Add and use USED_BATCH macro.
The next patch will replace the .used field with an on-demand calculation of batchbuffer usage. Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_performance_monitor.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_performance_monitor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_monitor.c b/src/mesa/drivers/dri/i965/brw_performance_monitor.c
index 0a12375..7e90e8a 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_monitor.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_monitor.c
@@ -710,7 +710,7 @@ emit_mi_report_perf_count(struct brw_context *brw,
/* Make sure the commands to take a snapshot fits in a single batch. */
intel_batchbuffer_require_space(brw, MI_REPORT_PERF_COUNT_BATCH_DWORDS * 4,
RENDER_RING);
- int batch_used = brw->batch.used;
+ int batch_used = USED_BATCH(brw->batch);
/* Reports apparently don't always get written unless we flush first. */
brw_emit_mi_flush(brw);
@@ -754,7 +754,7 @@ emit_mi_report_perf_count(struct brw_context *brw,
brw_emit_mi_flush(brw);
(void) batch_used;
- assert(brw->batch.used - batch_used <= MI_REPORT_PERF_COUNT_BATCH_DWORDS * 4);
+ assert(USED_BATCH(brw->batch) - batch_used <= MI_REPORT_PERF_COUNT_BATCH_DWORDS * 4);
}
/**
@@ -1386,7 +1386,7 @@ void
brw_perf_monitor_new_batch(struct brw_context *brw)
{
assert(brw->batch.ring == RENDER_RING);
- assert(brw->gen < 6 || brw->batch.used == 0);
+ assert(brw->gen < 6 || USED_BATCH(brw->batch) == 0);
if (brw->perfmon.oa_users == 0)
return;