NVIDIAGameWorks / Falcor

Real-Time Rendering Framework
https://developer.nvidia.com/falcor
Other
2.72k stars 497 forks source link

Falcor 8.0 floods slang warnings #450

Open Hyiker opened 1 month ago

Hyiker commented 1 month ago

Just get my fork upgraded to Falcor 8.0 aligning with commit 9dc819c162b2070335c65060436041690b7937f8. Running Mogwai with PathTracer.py on cornell box scene leads to flooding slang warnings:

...
warning 41016: use of uninitialized variable 'result'
                    path.setDeltaOnlyPath(result.isLobe(LobeType::DeltaReflection) || result.isLobe(LobeType::DeltaTransmission));
...

More than 1000+ lines of resembling logs are produced.

Checked the slang version 2024.1.34 supports slang::CompilerOptionName::DisableWarning api in deed, but it still floods warnings on my computer even if I create a brand new clone from https://github.com/NVIDIAGameWorks/Falcor and build.

I found adding spOverrideDiagnosticSeverity in createSlangCompileRequest could suppress the warning, but it's definitely not a good practice.