MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / gfxReportError

Function gfxReportError

Source/Falcor/Core/API/GFXAPI.cpp:39–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37namespace Falcor
38{
39void gfxReportError(const char* api, const char* call, gfx::Result result)
40{
41 const char* resultStr = nullptr;
42#if FALCOR_HAS_D3D12
43 switch (result)
44 {
45 case DXGI_ERROR_DEVICE_REMOVED:
46 resultStr = "DXGI_ERROR_DEVICE_REMOVED";
47 break;
48 case DXGI_ERROR_DEVICE_HUNG:
49 resultStr = "DXGI_ERROR_DEVICE_HUNG";
50 break;
51 case DXGI_ERROR_DEVICE_RESET:
52 resultStr = "DXGI_ERROR_DEVICE_RESET";
53 break;
54 }
55#endif
56
57#if FALCOR_HAS_AFTERMATH
58 if (!waitForAftermathDumps())
59 logError("Aftermath GPU crash dump generation failed.");
60#endif
61
62 std::string fullMsg = resultStr ? fmt::format("{} call '{}' failed with error {} ({}).", api, call, result, resultStr)
63 : fmt::format("{} call '{}' failed with error {}", api, call, result);
64
65 reportFatalErrorAndTerminate(fullMsg);
66}
67} // namespace Falcor

Callers

nothing calls this directly

Calls 3

waitForAftermathDumpsFunction · 0.85
logErrorFunction · 0.85

Tested by

no test coverage detected