What is the AMD FidelityFX Breadcrumbs library?
With growing complexity of modern graphics cards and explicit nature of graphics APIs like Direct3D® 12 and Vulkan®, the responsibility of developers increased in terms of making sure that all work is correctly scheduled and synchronized on the GPU.
With such responsibility comes also great danger – dealing with and resolving various crashes that incorrectly scheduled work can cause.
With such new burden on developer’s shoulders, it has become clear that need for better tooling aiding in analysing GPU crashes has arisen.
So far we have released fully fledged tool that can help you greatly in post-mortem analysis of various crashes on AMD GPUs – Radeon GPU Detective, make sure to check it out!
The AMD FidelityFX Breadcrumbs library serves similar purpose, but as an cross platform library that you as a developer can add to your game.
The Breadcrumbs library will track your workload on the GPU, and in the presence of crash it will give you possiblity to create report on current state of GPU work execution.
Usage
Full integration of AMD FidelityFX Breadcrumbs library is described in its extensive documentation, but as a set of steps needed for Breadcrumbs to work, you just need to:
- Create Breadcrumbs context.
- Each frame:
- Mark start of new rendering frame.
- Register command lists used with Breadcrumbs methods.
- Place begin-end markers around calls you are interested in tracking (other marker systems already in place are good fit for that).
- Check whether GPU crash occured (usually at the end of the frame while presenting new frame with swapchain) and if so then you can gather text report from Breadcrumbs library to incorporate it in your own reporting system.
- Destroy Breadcrumbs context.
With these steps, the Breadcrumbs library is fully operational and can be used as a lightweight means of gathering crash data and aiding you in development of your game.
You can customize the amount of information passed into the library with additional comments, registered pipeline states, and various markers types that will enhance Breadcrumbs output to better track down source of the malicious GPU crash.
Example output
Below you can find example output of the FidelityFX Breadcrumbs. It can be extended with additional device information specific to available data and metrics in currently used graphics API.
Copied!
[BREADCRUMBS]
<Frame 250>
- [>] Queue type <0>, submission no. 0, command list 1: "VK test command list"
├─[X] RESOURCE_BARRIER: "Backbuffer barrier to RT"
├─[>] Main Rendering
│ ├─[X] CLEAR_RENDER_TARGET: "Reset current backbuffer contents"
│ └─[>] DRAW_INDEXED: "Draw simple triangle"
└─[ ] RESOURCE_BARRIER: "Backbuffer barrier to PRESENT"
<Frame 251>
- [ ] Queue type <0>, submission no. 0, command list 1: "VK test command list"
├─[ ] RESOURCE_BARRIER: "Backbuffer barrier to RT"
├─[ ] Main Rendering
│ ├─[ ] CLEAR_RENDER_TARGET: "Reset current backbuffer contents"
│ └─[ ] DRAW_INDEXED: "Draw simple triangle"
└─[ ] RESOURCE_BARRIER: "Backbuffer barrier to PRESENT"
<Frame 252>
- [ ] Queue type <0>, submission no. 0, command list 1: "VK test command list"
├─[ ] RESOURCE_BARRIER: "Backbuffer barrier to RT"
├─[ ] Main Rendering
│ ├─[ ] CLEAR_RENDER_TARGET: "Reset current backbuffer contents"
│ └─[ ] DRAW_INDEXED: "Draw simple triangle"
└─[ ] RESOURCE_BARRIER: "Backbuffer barrier to PRESENT"