Skip to content

Draft: anv: build annotation buffers with INTEL_DEBUG=bat

Lionel Landwerlin requested to merge llandwerlin/mesa:review/anv-annotate into main

Essentially side buffer containing pointers to the batch and describing what it does.

End result (scrubbed a bit) :

   0xfffffffeffffbf04:  0x7a000004:  PIPE_CONTROL
      ...
   DESC  ANNOTATION: previous pc emitted=(+pb_stall +cs_stall ) reason: gfx12_cmd_buffer_apply_pipe_flushes
   0xfffffffeffffbf1c:  0x7b000005:  3DPRIMITIVE
      ...
   0xfffffffeffffbf38:  0x10000002:  MI_STORE_DATA_IMM
      ...
   DESC  ANNOTATION: pc queue=(+rt_flush +pb_stall ) reason: before blorp BTI change
   0xfffffffeffffbf48:  0x7a000004:  PIPE_CONTROL
      ...
   DESC  ANNOTATION: previous pc emitted=(+rt_flush +pb_stall +cs_stall ) reason: gfx12_cmd_buffer_apply_pipe_flushes
      ...
   0xfffffffeffffc290:  0x7b000005:  3DPRIMITIVE
      ...
   DESC  ANNOTATION: pc queue=(+depth_flush +dc_flush +hdc_flush +rt_flush +tile_flush ) reason: pipe barrier
   0xfffffffeffffc2ac:  0x7a000204:  PIPE_CONTROL
      ...
   DESC  ANNOTATION: previous pc emitted=(+depth_flush +dc_flush +hdc_flush +rt_flush +tile_flush +pb_stall +depth_stall +cs_stall ) reason: gfx12_cmd_buffer_apply_pipe_flushes

Original idea by @ickle

What I haven't done is adding support for aubinator_error_decode yet, but that's easy. Done.

Edited by Lionel Landwerlin

Merge request reports