summaryrefslogtreecommitdiff
path: root/source/slang-wasm
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-10-14 14:03:01 -0700
committerGitHub <noreply@github.com>2024-10-14 14:03:01 -0700
commitf857815a8c0a4e8d4f35c9a49c655545fb692195 (patch)
tree78fecf229aece79d27d4d42664eda267706670c5 /source/slang-wasm
parent5126d58ab2252357014df4136a4a1e07c7c2d5f4 (diff)
Misc build fixes. (#5271)
* Don't use __assume for SLANG_ASSERT + build fixes. * Fix. * build slang-wasm conditionally * Fix. * revert retry open file * revert include. * another attempt of silencing compiler warnings. * revert assume change.
Diffstat (limited to 'source/slang-wasm')
-rw-r--r--source/slang-wasm/slang-wasm.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/slang-wasm/slang-wasm.cpp b/source/slang-wasm/slang-wasm.cpp
index c2cbe66b6..ee64f0e9b 100644
--- a/source/slang-wasm/slang-wasm.cpp
+++ b/source/slang-wasm/slang-wasm.cpp
@@ -45,10 +45,9 @@ Session* GlobalSession::createSession()
SessionDesc sessionDesc = {};
sessionDesc.structureSize = sizeof(sessionDesc);
constexpr SlangInt targetCount = 1;
- TargetDesc targets[targetCount] = {
- {.structureSize = sizeof(TargetDesc), .format = SLANG_WGSL}
- };
- sessionDesc.targets = targets;
+ TargetDesc target = {};
+ target.format = SLANG_WGSL;
+ sessionDesc.targets = &target;
sessionDesc.targetCount = targetCount;
SlangResult result = m_interface->createSession(sessionDesc, &session);
if (result != SLANG_OK)