SpiecsEngine
 
Loading...
Searching...
No Matches

◆ OnShaderLookup()

void Spices::GpuCrashTracker::OnShaderLookup ( const GFSDK_Aftermath_ShaderBinaryHash & shaderHash,
PFN_GFSDK_Aftermath_SetData setShaderBinary ) const
private

Handler for shader lookup callbacks. This is used by the JSON decoder for mapping shader instruction addresses to SPIR-V IL lines or GLSL source lines. NOTE: If the application loads stripped shader binaries (ie; –strip-all in spirv-remap), Aftermath will require access to both the stripped and the not stripped shader binaries.

Parameters
[in]shaderHashGFSDK_Aftermath_ShaderBinaryHash.
[in]setShaderBinaryPFN_GFSDK_Aftermath_SetData.

Find shader binary data for the shader hash in the shader database.

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

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

Find shader binary data for the shader hash in the shader database.

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

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

Definition at line 429 of file NsightAftermathGpuCrashTracker.cpp.

434 {
436
440 std::vector<uint8_t> shaderBinary;
441 if (!m_ShaderDataBase.FindShaderBinary(shaderHash, shaderBinary))
442 {
446 return;
447 }
448
453 setShaderBinary(shaderBinary.data(), static_cast<uint32_t>(shaderBinary.size()));
454 }
#define SPICES_PROFILE_ZONE
ShaderDataBase m_ShaderDataBase
The mock shader database.
bool FindShaderBinary(const GFSDK_Aftermath_ShaderBinaryHash &shaderHash, std::vector< uint8_t > &shader) const
Find a shader bytecode binary by shader hash.