diff options
| author | Yong He <yonghe@outlook.com> | 2025-04-28 11:42:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-28 11:42:22 -0700 |
| commit | c39c29bf4c52a85d7c83cc8b66ae45e265f9e078 (patch) | |
| tree | 969339828d49d7db92ed9294a17bd34cc021db84 /source/slang/slang-check-shader.cpp | |
| parent | 8f6c6e333c06ae1c3b9f00396563c14a2ae09b4d (diff) | |
Add Slang Byte Code generation and interpreter. (#6896)
* Add Slang Byte Code generation and interpreter.
* Fix compile issues.
* format code
* More compile fix.
* Fix clang issue.
* Fix more clang issues.
* Another clang fix.
* Fix clang issues.
* Fix another clang issue.
* Fix wasm build.
* Update building.md
* Fix test-server.
* Fix compile error.
* Fix bug.
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-check-shader.cpp')
| -rw-r--r-- | source/slang/slang-check-shader.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/slang/slang-check-shader.cpp b/source/slang/slang-check-shader.cpp index a8c3aee15..4547281e1 100644 --- a/source/slang/slang-check-shader.cpp +++ b/source/slang/slang-check-shader.cpp @@ -448,6 +448,7 @@ void validateEntryPoint(EntryPoint* entryPoint, DiagnosticSink* sink) } bool canHaveVaryingInput = false; + bool shouldWarnOnNonUniformParam = true; switch (stage) { case Stage::Vertex: @@ -462,6 +463,9 @@ void validateEntryPoint(EntryPoint* entryPoint, DiagnosticSink* sink) case Stage::Domain: canHaveVaryingInput = true; break; + case Stage::Dispatch: + shouldWarnOnNonUniformParam = false; + break; default: break; } @@ -499,10 +503,13 @@ void validateEntryPoint(EntryPoint* entryPoint, DiagnosticSink* sink) // support varying input/output. We will automatically convert it to a 'uniform' parameter, // and diagnose a warning. addModifier(param, getCurrentASTBuilder()->create<HLSLUniformModifier>()); - sink->diagnose( - param, - Diagnostics::nonUniformEntryPointParameterTreatedAsUniform, - param->getName()); + if (shouldWarnOnNonUniformParam) + { + sink->diagnose( + param, + Diagnostics::nonUniformEntryPointParameterTreatedAsUniform, + param->getName()); + } } for (auto target : linkage->targets) |
