diff options
| author | kaizhangNV <149626564+kaizhangNV@users.noreply.github.com> | 2024-05-10 17:32:09 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-10 17:32:09 -0700 |
| commit | 86a9da1573e1eea62fbaeddc97521f2b97ebc255 (patch) | |
| tree | 7e830978ae22b7451df8a022ca240ead384d233f /source/slang/slang-options.cpp | |
| parent | 1dcd814f5038229703e52841b1b0304c22bffb73 (diff) | |
Fix race-condition and visual artifacts issues (#4152)
* Fix race-condition and visual artifacts issues
In PerformanceProfiler::getProfiler() we return a static object
for the profiler implementation, this is not thread-safe, so change
it to thead_local.
There is still some visual artifacts when using slang as the shading
language. We don't know the root cause yet, but found out it's related
to our loop inversion algorithm. So stage this feature for now, and turn
it into an internal option and default off. We will re-enable it after
more investigation on this optimization.
File an new issue 4151 to track it.
* Add '-loop-inversion' to the few tests
Diffstat (limited to 'source/slang/slang-options.cpp')
| -rw-r--r-- | source/slang/slang-options.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index fc2fd42c2..1f27c5efa 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -542,6 +542,7 @@ void initCommandOptions(CommandOptions& options) { OptionKind::SaveStdLibBinSource, "-save-stdlib-bin-source","-save-stdlib-bin-source <filename>", "Same as -save-stdlib but output " "the data as a C array.\n"}, { OptionKind::TrackLiveness, "-track-liveness", nullptr, "Enable liveness tracking. Places SLANG_LIVE_START, and SLANG_LIVE_END in output source to indicate value liveness." }, + { OptionKind::LoopInversion, "-loop-inversion", nullptr, "Enable loop inversion in the code-gen optimization. Default is off" }, }; _addOptions(makeConstArrayView(internalOpts), options); @@ -1689,6 +1690,7 @@ SlangResult OptionsParser::_parse( case OptionKind::IncompleteLibrary: case OptionKind::NoHLSLBinding: case OptionKind::NoHLSLPackConstantBufferElements: + case OptionKind::LoopInversion: linkage->m_optionSet.set(optionKind, true); break; break; case OptionKind::MatrixLayoutRow: |
