summaryrefslogtreecommitdiffstats
path: root/source/slang
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang')
-rw-r--r--source/slang/slang-diagnostic-defs.h6
-rw-r--r--source/slang/slang-ir-metal-legalize.cpp3
2 files changed, 8 insertions, 1 deletions
diff --git a/source/slang/slang-diagnostic-defs.h b/source/slang/slang-diagnostic-defs.h
index 1f2fdd693..08e852547 100644
--- a/source/slang/slang-diagnostic-defs.h
+++ b/source/slang/slang-diagnostic-defs.h
@@ -2960,12 +2960,16 @@ DIAGNOSTIC(
Error,
divisionByMatrixNotSupported,
"division by matrix is not supported for Metal and WGSL targets.")
-
DIAGNOSTIC(
56103,
Error,
int16NotSupportedInWGSL,
"16-bit integer type '$0' is not supported by the WGSL backend.")
+DIAGNOSTIC(
+ 56104,
+ Error,
+ assignToRefNotSupported,
+ "whole struct must be assiged to mesh output at once for Metal target.")
DIAGNOSTIC(57001, Warning, spirvOptFailed, "spirv-opt failed. $0")
DIAGNOSTIC(57002, Error, unknownPatchConstantParameter, "unknown patch constant parameter '$0'.")
diff --git a/source/slang/slang-ir-metal-legalize.cpp b/source/slang/slang-ir-metal-legalize.cpp
index 116feeab4..fd950b91a 100644
--- a/source/slang/slang-ir-metal-legalize.cpp
+++ b/source/slang/slang-ir-metal-legalize.cpp
@@ -214,6 +214,9 @@ static void processInst(IRInst* inst, DiagnosticSink* sink)
case kIROp_Leq:
legalizeBinaryOp(inst, sink, CodeGenTarget::Metal);
break;
+ case kIROp_MeshOutputRef:
+ sink->diagnose(getDiagnosticPos(inst), Diagnostics::assignToRefNotSupported);
+ break;
case kIROp_MetalCastToDepthTexture:
{
// If the operand is already a depth texture, don't do anything.