This sample demonstrates the integration of NVIDIA NSight Aftermath SDK for GPU crash dump generation in Vulkan applications.
- Download NSight Aftermath SDK from NVIDIA Developer
- Set
NSIGHT_AFTERMATH_SDK
CMake variable to the SDK extraction path
- Integration is handled in
nvpro-core
(nsight_aftermath_vk.cpp) - Set
NSIGHT_AFTERMATH_SDK
in CMake to enableNVVK_SUPPORTS_AFTERMATH
- In
nvvk::Context
construction, setenableAftermath = true
innvvk::ContextCreateInfo
nvvk::ContextCreateInfo contextInfo;
contextInfo.enableAftermath = true;
Note: Enabling Aftermath may impact shader compilation time and add runtime overhead.
-
Modified Pipeline Crash:
- In
createPipeline()
, pipelines are created with various constant specializations - Shader contains
CRASH_TEST
variable set as a constant during pipeline creation - Setting
CRASH_TEST
to 1 creates an infinite loop in the vertex shader
- In
-
Additional crash scenarios are included for testing different error conditions
On VK_ERROR_DEVICE_LOST
, Aftermath intercepts the crash and generates a dump file:
Writing Aftermath dump file to:
C:\path\to\crash_aftermath-[PID]-[ID].nv-gpudmp
- Open the
.nv-gpudmp
file in NSight Graphics - Navigate to Crash Info for detailed crash analysis
- Test various crash scenarios to ensure proper dump generation
- Not all scenarios may crash, as drivers might recover from some errors
- Use NSight Graphics for in-depth analysis of generated crash dumps
This integration enables efficient debugging of GPU crashes in Vulkan applications using NVIDIA's NSight Aftermath toolkit.