summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-hlsl.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2023-05-05 03:46:42 +0800
committerGitHub <noreply@github.com>2023-05-04 12:46:42 -0700
commitab3ac985479132856613d6dcc8b43f4a4ef8c6b7 (patch)
treee4e911d10b8ec2866e7e408f9a10b51d743ee675 /source/slang/slang-emit-hlsl.cpp
parentc0b6f59a6920a9efbb4ecc3b622529db484c64ef (diff)
Add SLANG_ASSUME and use it in release asserts (#2859)
* Remove UNREACHABLE * formatting * Remove unused SLANG_EXPECT macros * Add SLANG_ASSUME and use it in release asserts * Reassure GCC that we are using memcpy responsibly --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-emit-hlsl.cpp')
-rw-r--r--source/slang/slang-emit-hlsl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp
index 434f0803e..96b751789 100644
--- a/source/slang/slang-emit-hlsl.cpp
+++ b/source/slang/slang-emit-hlsl.cpp
@@ -1168,7 +1168,7 @@ void HLSLSourceEmitter::emitMeshOutputModifiersImpl(IRInst* varInst)
: as<IRIndicesDecoration>(modifier) ? "indices "
: as<IRPrimitivesDecoration>(modifier) ? "primitives "
: nullptr;
- SLANG_EXPECT(s, "Unhandled type of mesh output decoration");
+ SLANG_ASSERT(s && "Unhandled type of mesh output decoration");
m_writer->emit(s);
}
}