i965: Dump more information about batch buffer usage.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 14 Aug 2013 23:07:51 +0000 (16:07 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 16 Aug 2013 22:54:24 +0000 (15:54 -0700)
commite29931aa7423209d29a23be2ad754abb0f79315e
tree98d2bd602542e627ec346c2cc289829e70a98015
parent2a9492f3215ee01ed679aa02809099f090291969
i965: Dump more information about batch buffer usage.

Previously, INTEL_DEBUG=bat would dump messages like:

intel_mipmap_tree.c:1643: Batchbuffer flush with 456b used

This only reported the space used for command packets, and didn't
report any information on the space used for indirect state.

Now it dumps:

intel_context.c:366: Batchbuffer flush with 6128b (pkt) + 4288b (state)
= 10416b (31.8%)

This conveniently shows the breakdown of space used for packets vs.
state, as well as the percentage of batchbuffer space.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/intel_batchbuffer.c