Skip to content

anv: Implement rudimentary VK_AMD_buffer_marker support

Kenneth Graunke requested to merge kwg/mesa:amd-buffer-marker into main

This provides a basic implementation of VK_AMD_buffer_marker: we can write the 32-bit markers from within a command buffer. Unfortunately, our hardware has several limitations that make this difficult to implement well:

  1. We don't have insight into when specific stages finish (i.e. all geometry shaders are done, but pixel rasterization may still be occurring).

  2. We cannot perform pipelined writes of 32-bit values to arbitrary memory locations. PIPE_CONTROL::Write Immediate Value would be the obvious way to implement this, but it only supports 64-bit values, and the extension doesn't allow us to do that. We instead use MI_STORE_DATA_IMM to write 32-bit values, but this requires hard stalls.

Despite those limitations, the extension may still be useful for tools to debug GPU hangs. We hope to offer another extension in the future which offers similar functionality but is more efficient on our GPUs.

Merge request reports