summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-11-13 16:50:00 -0800
committerGitHub <noreply@github.com>2024-11-13 16:50:00 -0800
commitf7149b94847a91f9f1f364e79f1be750aaf90191 (patch)
tree2d335ba70f29777a7d04a04166fe70ee0ff47e63 /source
parent91f19bedb902fb8b97c9b9da9fcb9c82e6f1c785 (diff)
WASM-binding: default to sm_6_6 when targeting hlsl. (#5554)
Diffstat (limited to 'source')
-rw-r--r--source/slang-wasm/slang-wasm.cpp4
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 = &target;
sessionDesc.targetCount = targetCount;
SlangResult result = m_interface->createSession(sessionDesc, session.writeRef());