Hi, I am using aftermath to detective random gpu hung/ tdr. when there is a gpu hung crash, only PFN_GFSDK_Aftermath_GpuCrashDumpCb is called by Aftermath, PFN_GFSDK_Aftermath_ShaderDebugInfoCb is not called by Aftermath, what is the reason for this happening
Hi XPX,
Thank you for using Aftermath SDK and providing your feedback. It’s hard for me to suggest anything based on your description, but here is the comment from Aftermath SDK’s header file GFSDK_Aftermath_GpuCrashDump.h
, there are some notes about shader debug info callback. Do you follow the notes in the comments?
/////////////////////////////////////////////////////////////////////////
// GFSDK_Aftermath_ShaderDebugInfoCb
// ---------------------------------
//
// Shader debug information callback.
//
// If registered via 'GFSDK_Aftermath_EnableGpuCrashDumps' it will be called with
// shader debug information (line tables for mapping from the shader IL passed to the
// driver to the shader microcode) if the shader debug information generation feature
// is enabled: 'GFSDK_Aftermath_FeatureFlags_GenerateShaderDebugInfo' or
// 'VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV'. Also see the
// description of 'GFSDK_Aftermath_EnableGpuCrashDumps' for more details.
//
// NOTE: Except for the 'pUserData' pointer, all pointer values passed to the
// callbacks are only valid for the duration of the call! An implementation
// must make copies of the data if it intends to store it beyond that.
//
/////////////////////////////////////////////////////////////////////////
// shaderDebugInfoCb;
// Optional, can be NULL.
//
// Callback function to be called when new shader debug information data is
// available. Shader debug information generation needs to be enabled by
// setting the corresponding feature flags:
// * For DX: 'GFSDK_Aftermath_FeatureFlags_GenerateShaderDebugInfo'
// * For Vulkan: 'VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV'
//
// NOTE: Shader debug information is only supported for DX12 (DXIL) and Vulkan
// (SPIR-V) shaders.
//
// NOTE: If not using 'GFSDK_Aftermath_GpuCrashDumpFeatureFlags_DeferDebugInfoCallbacks',
// 'shaderDebugInfoCb' will be invoked for every shader compilation by the
// graphics driver, even if there will be never an invocation of 'gpuCrashDumpCb'.
//
// NOTE: This callback is free-threaded, ensure the provided function is
// thread-safe.
Thanks
An
Yes, I use all the GFSDK_Aftermath_FeatureFlags except GFSDK_Aftermath_FeatureFlags_EnableShaderErrorReporting. If I wrote a infinite loop in shader or array out of bounds, the ShaderDebugInfoCb will be called, But in my game, the ShaderDebugInfoCb not called, what is the reason for this happening?
Hi XPX,
It’s hard for me to say anything right now. Could you please provide a simple example that would allow us to reproduce the issue? This will help us in investigating and resolving the problem more efficiently.
Thanks
An
Hi, AYan
Thanks for your reply very much. In my case is that I played the game many times but the gpu not always crash. I also found an similar post: ShaderDebugInfoCallback() sometimes is not called when crashing, is my situation as described in the similar post?
Hi XPX,
It looks similar but very hard to say the root cause is the same, that topic was posted 2 years ago, that’s a long time.
Thanks
An
Hi AYan,
There are an GPU Crash on 1080ti, driver version is 536.40. the PFN_GFSDK_Aftermath_GpuCrashDumpCb called one time, but the PFN_GFSDK_Aftermath_ShaderDebugInfoCb called two times, how did this happen?
And seems the crash does not make sense, it’s very simple basic mathematical operations . Blow are the detail info.