[Mesa-dev] [RFC PATCH 0/2] intel: implement command buffer debug messages

Lionel Landwerlin lionel.g.landwerlin at intel.com
Tue Jun 20 20:25:23 UTC 2017


Hi all,

While debugging some of my work, I find it difficult to relate the
aubinator decoded instructions to the part of the API that actually
emitted those packets (especially with Anv that records batches of
instructions per pipeline and just dumps them out in a batchbuffer
later) .

This series introduce a new debug parameter
(INTEL_DEBUG=batch-messages) that will require the driver to emit
debug messages in the command stream. For now they're implemented
using MI_NOOP. When the "Identification Number Register Write Enable"
field is set to false, the 21 bits "Identification Number" can be used
for stuff 3 ascii characters.

For now there are only a few debug messages but you probably want to
write your own depending what you're debbuging.

Patch 2 also implement the reading back of those messages in either
aubinator, aubinator_error_decode or while debugging with
INTEL_DEBUG=batch.

Looking forward to comments!

Cheers,

Lionel Landwerlin (2):
  anv/i965/blorp: add command streamer debug messages
  intel/i965: teach command streamer parsers about debug messages

 src/intel/blorp/blorp.h                       |  2 +
 src/intel/blorp/blorp_blit.c                  |  4 ++
 src/intel/blorp/blorp_clear.c                 | 24 +++++++
 src/intel/common/gen_debug.c                  |  1 +
 src/intel/common/gen_debug.h                  |  2 +-
 src/intel/common/gen_decoder.c                | 98 +++++++++++++++++++++++----
 src/intel/common/gen_decoder.h                | 17 +++++
 src/intel/tools/aubinator.c                   |  6 +-
 src/intel/tools/aubinator_error_decode.c      | 14 ++--
 src/intel/vulkan/anv_batch_chain.c            | 21 ++++++
 src/intel/vulkan/anv_blorp.c                  | 15 ++++
 src/intel/vulkan/anv_genX.h                   |  6 +-
 src/intel/vulkan/anv_private.h                | 11 +++
 src/intel/vulkan/genX_cmd_buffer.c            | 24 +++++++
 src/intel/vulkan/genX_state.c                 |  2 +
 src/mesa/drivers/dri/i965/brw_blorp.c         | 24 +++++++
 src/mesa/drivers/dri/i965/brw_context.h       | 11 +++
 src/mesa/drivers/dri/i965/genX_state_upload.c | 30 ++++++++
 src/mesa/drivers/dri/i965/intel_batchbuffer.c | 18 +++--
 19 files changed, 305 insertions(+), 25 deletions(-)

--
2.11.0


More information about the mesa-dev mailing list