i965: Add an INTEL_DEBUG=submit option for printing batch statistics.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 5 Sep 2017 22:46:30 +0000 (15:46 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 13 Sep 2017 20:52:38 +0000 (13:52 -0700)
commitedfd8d42a9ac870a6ebc5a56fc003f60f86b702c
tree43fa8703c4125e2fc87a7967bee22a5a490b767e
parent64d9bd149aa7f5a09f73cae07499577933722fb2
i965: Add an INTEL_DEBUG=submit option for printing batch statistics.

When a batch is submitted, INTEL_DEBUG=bat prints a message indicating
which part of the code triggered the flush, and some statistics about
the batch/state buffer utilization.

It also decodes the batchbuffer in debug builds...which is so much
output that it drowns out the utilization messages, if that's all you
care about.

INTEL_DEBUG=submit now just does the utilization messages.
INTEL_DEBUG=bat continues to do both (as the message is a good indicator
that we're starting decode of a new batch).

v2: Rename from "flush" to "submit" (suggested by Chris) because we
    might want "flush" for PIPE_CONTROL debugging someday.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
docs/envvars.html
src/intel/common/gen_debug.c
src/intel/common/gen_debug.h
src/mesa/drivers/dri/i965/intel_batchbuffer.c