Skip to content

Latest commit

 

History

History

crash_aftermath

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

NSight Aftermath Integration for Vulkan

NSight Aftermath Example

This sample demonstrates the integration of NVIDIA NSight Aftermath SDK for GPU crash dump generation in Vulkan applications.

Setup

  1. Download NSight Aftermath SDK from NVIDIA Developer
  2. Set NSIGHT_AFTERMATH_SDK CMake variable to the SDK extraction path

Implementation

Enabling Aftermath

  1. Integration is handled in nvpro-core (nsight_aftermath_vk.cpp)
  2. Set NSIGHT_AFTERMATH_SDK in CMake to enable NVVK_SUPPORTS_AFTERMATH
  3. In nvvk::Context construction, set enableAftermath = true in nvvk::ContextCreateInfo
nvvk::ContextCreateInfo contextInfo;
contextInfo.enableAftermath = true;

Note: Enabling Aftermath may impact shader compilation time and add runtime overhead.

Crash Scenarios

  1. 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
  2. Additional crash scenarios are included for testing different error conditions

Crash Dump Generation

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

Analysis

  1. Open the .nv-gpudmp file in NSight Graphics
  2. Navigate to Crash Info for detailed crash analysis

Crash Analysis

Best Practices

  • 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.