summaryrefslogtreecommitdiffstats
path: root/source/slang/emit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/emit.cpp')
-rw-r--r--source/slang/emit.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp
index 3e601e119..af2fa68dc 100644
--- a/source/slang/emit.cpp
+++ b/source/slang/emit.cpp
@@ -4408,6 +4408,13 @@ struct EmitVisitor
emit("inout ");
type = inOutType->getValueType();
}
+ else if( auto refType = as<IRRefType>(type))
+ {
+ // Note: There is no HLSL/GLSL equivalent for by-reference parameters,
+ // so we don't actually expect to encounter these in user code.
+ emit("inout ");
+ type = inOutType->getValueType();
+ }
emitIRType(ctx, type, name);
}