42 const static unsigned int c_markerFrameHistory = 4;
43 typedef std::array<std::map<uint64_t, std::string>, c_markerFrameHistory> MarkerMap;
45 GpuCrashTracker(
const MarkerMap& markerMap);
49 void Initialize(
bool applicationUsesStrippedShaders);
53 void SetCommandLine(
const std::string& commandLine) { m_commandLine = commandLine; }
62 void OnCrashDump(
const void* pGpuCrashDump,
const uint32_t gpuCrashDumpSize);
65 void OnShaderDebugInfo(
const void* pShaderDebugInfo,
const uint32_t shaderDebugInfoSize);
68 void OnDescription(PFN_GFSDK_Aftermath_AddGpuCrashDumpDescription addDescription);
71 void OnResolveMarker(
const void* pMarkerData,
const uint32_t markerDataSize, PFN_GFSDK_Aftermath_ResolveMarker resolveMarker);
79 void WriteGpuCrashDumpToFile(
const void* pGpuCrashDump,
const uint32_t gpuCrashDumpSize);
82 void WriteShaderDebugInformationToFile(
83 GFSDK_Aftermath_ShaderDebugInfoIdentifier identifier,
84 const void* pShaderDebugInfo,
85 const uint32_t shaderDebugInfoSize);
92 void OnShaderDebugInfoLookup(
93 const GFSDK_Aftermath_ShaderDebugInfoIdentifier& identifier,
94 PFN_GFSDK_Aftermath_SetData setShaderDebugInfo)
const;
98 const GFSDK_Aftermath_ShaderBinaryHash& shaderHash,
99 PFN_GFSDK_Aftermath_SetData setShaderBinary)
const;
102 void OnShaderSourceDebugInfoLookup(
103 const GFSDK_Aftermath_ShaderDebugName& shaderDebugName,
104 PFN_GFSDK_Aftermath_SetData setShaderBinary)
const;
111 static void GpuCrashDumpCallback(
112 const void* pGpuCrashDump,
113 const uint32_t gpuCrashDumpSize,
117 static void ShaderDebugInfoCallback(
118 const void* pShaderDebugInfo,
119 const uint32_t shaderDebugInfoSize,
123 static void CrashDumpDescriptionCallback(
124 PFN_GFSDK_Aftermath_AddGpuCrashDumpDescription addDescription,
128 static void ResolveMarkerCallback(
129 const void* pMarkerData,
130 const uint32_t markerDataSize,
132 PFN_GFSDK_Aftermath_ResolveMarker resolveMarker);
135 static void ShaderDebugInfoLookupCallback(
136 const GFSDK_Aftermath_ShaderDebugInfoIdentifier* pIdentifier,
137 PFN_GFSDK_Aftermath_SetData setShaderDebugInfo,
141 static void ShaderLookupCallback(
142 const GFSDK_Aftermath_ShaderBinaryHash* pShaderHash,
143 PFN_GFSDK_Aftermath_SetData setShaderBinary,
147 static void ShaderSourceDebugInfoLookupCallback(
148 const GFSDK_Aftermath_ShaderDebugName* pShaderDebugName,
149 PFN_GFSDK_Aftermath_SetData setShaderBinary,
160 mutable std::mutex m_mutex;
163 std::map<GFSDK_Aftermath_ShaderDebugInfoIdentifier, std::vector<uint8_t>> m_shaderDebugInfo;
169 const MarkerMap& m_markerMap;
172 std::string m_commandLine;