summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-c-like.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
-rw-r--r--source/slang/slang-emit-c-like.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp
index 5813819b4..58ca39b69 100644
--- a/source/slang/slang-emit-c-like.cpp
+++ b/source/slang/slang-emit-c-like.cpp
@@ -268,6 +268,16 @@ void CLikeSourceEmitter::emitSimpleType(IRType* type)
return decor;
}
+/* static */IRWaveSizeDecoration* CLikeSourceEmitter::getComputeWaveSize(IRFunc* func, Int* outWaveSize)
+{
+ IRWaveSizeDecoration* decor = func->findDecoration<IRWaveSizeDecoration>();
+ if (decor)
+ {
+ *outWaveSize = Int(getIntVal(decor->getOperand(0)));
+ }
+ return decor;
+}
+
List<IRWitnessTableEntry*> CLikeSourceEmitter::getSortedWitnessTableEntries(IRWitnessTable* witnessTable)
{
List<IRWitnessTableEntry*> sortedWitnessTableEntries;