SpiecsEngine
 
Loading...
Searching...
No Matches

◆ OnShaderSourceDebugInfoLookup()

void Spices::GpuCrashTracker::OnShaderSourceDebugInfoLookup ( const GFSDK_Aftermath_ShaderDebugName & shaderDebugName,
PFN_GFSDK_Aftermath_SetData setShaderBinary ) const
private

Handler for shader source debug info lookup callbacks. This is used by the JSON decoder for mapping shader instruction addresses to GLSL source lines, if the shaders used by the application were compiled with separate debug info data files.

Parameters
[in]shaderDebugNameGFSDK_Aftermath_ShaderDebugName.
[in]setShaderBinaryPFN_GFSDK_Aftermath_SetData.

Find source debug info for the shader DebugName in the shader database.

Early exit, nothing found. No need to call setShaderBinary.

Let the GPU crash dump decoder know about the shader debug data that was found.

Find source debug info for the shader DebugName in the shader database.

Early exit, nothing found. No need to call setShaderBinary.

Let the GPU crash dump decoder know about the shader debug data that was found.

Definition at line 456 of file NsightAftermathGpuCrashTracker.cpp.

461 {
463
467 std::vector<uint8_t> shaderBinary;
468 if (!m_ShaderDataBase.FindShaderBinaryWithDebugData(shaderDebugName, shaderBinary))
469 {
473 return;
474 }
475
480 setShaderBinary(shaderBinary.data(), static_cast<uint32_t>(shaderBinary.size()));
481 }
#define SPICES_PROFILE_ZONE
ShaderDataBase m_ShaderDataBase
The mock shader database.
bool FindShaderBinaryWithDebugData(const GFSDK_Aftermath_ShaderDebugName &shaderDebugName, std::vector< uint8_t > &shader) const
Find a source shader debug info by shader debug name generated by the DXC compiler.