[Mesa-dev] [PATCH 0/5] anv: add better debug resourde dumping

Jason Ekstrand jason at jlekstrand.net
Fri Jun 17 20:44:11 UTC 2016


A while ago while debugging some driver errors, I added a basic image
dumping mechanism to dump images to PPM files.  This little series improves
things and adds support for dumping the framebuffer at the end of every
renderpass.  With these patches, you can dump rendering for a frame as
follows:

 1) Start the application in GDB
 2) Run until you get to the point where the rendering errors occur
 3) Pause in GDB and set a breakpoint in anv_QueuePresentKHR
 4) Continue until it reaches anv_QueuePresentKHR
 5) Call anv_dump_start(queue->device, ANV_DUMP_FRAMEBUFFERS_BIT)
 6) Continue until the next anv_QueuePresentKHR call
 7) Call anv_dump_finish() to complete the dump and write files

While it's a bit manual, the process does allow you to do some very
valuable debugging by dumping every render target at the end of every
render pass.  It's worth noting that this assumes that the application
creates all of the command buffers more-or-less in-order and between the
two anv_QueuePresentKHR calls.

Jason Ekstrand (5):
  anv/dump: Take an aspect in dump_image_to_ppm
  anv/dump: Use anv_minify instead of hand-rolling it
  anv/dump: Refactor the guts into helpers
  anv/dump: Add a barrier for the source image
  anv/dump: Add support for dumping framebuffers

 src/intel/vulkan/anv_dump.c        | 356 +++++++++++++++++++++++++++++--------
 src/intel/vulkan/anv_private.h     |  13 +-
 src/intel/vulkan/genX_cmd_buffer.c |   4 +
 3 files changed, 298 insertions(+), 75 deletions(-)

-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list