diff options
author | Kenneth Graunke <[email protected]> | 2013-10-22 11:21:43 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-11-21 15:01:14 -0800 |
commit | 1172974ddddd785e7441d0eb68cc561b4e8d010f (patch) | |
tree | c1112f5b844d720ff6ece681ac0983dbe9efa8fa /src/mesa | |
parent | fedc14a050cac9cc4501a648b9c84c62fc6e1086 (diff) |
i965: Reserve batchbuffer space for a closing MI_REPORT_PERF_COUNT.
In order to use the Observability Architecture effectively, we'll need
to take snapshots of the OA counters via MI_REPORT_PERF_COUNT at the
start and end of each batch.
Experimentation reveals that we need to flush before and after each
MI_REPORT_PERF_COUNT to get working values. For simplicitly, I chose to
use intel_batchbuffer_emit_mi_flush(), which unfortunately expands to
triple pipe controls on Sandybridge.
We may want to start computing per-generation reserved batch space to
avoid the insanity of Sandybridge's PIPE_CONTROL cost. That said, much
of this cost existed before I rewrote the query object support to use
hardware contexts, so it's at least not entirely new.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_batchbuffer.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.h b/src/mesa/drivers/dri/i965/intel_batchbuffer.h index 3b43ccfba13..ac8eb7dc3b0 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.h +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.h @@ -20,8 +20,14 @@ extern "C" { * - Any state emitted by vtbl->finish_batch(): * - Gen4-5 record ending occlusion query values (4 * 4 = 16 bytes) * - Disabling OA counters on Gen6+ (3 DWords = 12 bytes) + * - Ending MI_REPORT_PERF_COUNT on Gen5+, plus associated PIPE_CONTROLs: + * - Two sets of PIPE_CONTROLs, which become 3 PIPE_CONTROLs each on SNB, + * which are 4 DWords each ==> 2 * 3 * 4 * 4 = 96 bytes + * - 3 DWords for MI_REPORT_PERF_COUNT itself on Gen6+. ==> 12 bytes. + * On Ironlake, it's 6 DWords, but we have some slack due to the lack of + * Sandybridge PIPE_CONTROL madness. */ -#define BATCH_RESERVED 36 +#define BATCH_RESERVED 146 struct intel_batchbuffer; |