diff options
| author | Yong He <yonghe@outlook.com> | 2024-11-13 16:50:00 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-13 16:50:00 -0800 |
| commit | f7149b94847a91f9f1f364e79f1be750aaf90191 (patch) | |
| tree | 2d335ba70f29777a7d04a04166fe70ee0ff47e63 /source | |
| parent | 91f19bedb902fb8b97c9b9da9fcb9c82e6f1c785 (diff) | |
WASM-binding: default to sm_6_6 when targeting hlsl. (#5554)
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang-wasm/slang-wasm.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/slang-wasm/slang-wasm.cpp b/source/slang-wasm/slang-wasm.cpp index c6c008483..10fc86029 100644 --- a/source/slang-wasm/slang-wasm.cpp +++ b/source/slang-wasm/slang-wasm.cpp @@ -75,6 +75,10 @@ Session* GlobalSession::createSession(int compileTarget) constexpr SlangInt targetCount = 1; TargetDesc target = {}; target.format = (SlangCompileTarget)compileTarget; + if (compileTarget == SLANG_HLSL) + { + target.profile = spFindProfile(m_interface, "sm_6_6"); + } sessionDesc.targets = ⌖ sessionDesc.targetCount = targetCount; SlangResult result = m_interface->createSession(sessionDesc, session.writeRef()); |
