MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXPT / SampleLogCallback

Method SampleLogCallback

Rtxpt/SampleCommon/SampleBaseApp.cpp:198–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198void SampleBaseApp::SampleLogCallback(donut::log::Severity severity, const char* message)
199{
200 // This lets us demote some of Streamline errors that aren't errors into warnings
201 if (severity == donut::log::Severity::Error)
202 {
203 std::string msg(message);
204 if (msg.find("Don't know the size") != std::string::npos)
205 severity = donut::log::Severity::Warning;
206 if (msg.find("dlss_gEntry.cpp") != std::string::npos)
207 {
208 if (msg.find("Unable to find DRS context") != std::string::npos
209 || msg.find("NGX indicates DLSS-G is not available") != std::string::npos)
210 severity = donut::log::Severity::Warning;
211 }
212 if (msg.find("Missing NGX context") != std::string::npos
213 || msg.find("Unable to find NGX ") != std::string::npos
214 || msg.find("NvAPI_D3D_Sleep") != std::string::npos)
215 severity = donut::log::Severity::Warning;
216 }
217
218 // Pass all other messages to donut's default callback
219 m_DonutDefaultCallback(severity, message);
220}
221
222donut::app::DeviceCreationParameters SampleBaseApp::GetDefaultDeviceParams() const
223{

Callers 1

RegisterDonutCallbackMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected