diff options
| author | Yong He <yonghe@google.com> | 2019-01-25 17:45:42 -0800 |
|---|---|---|
| committer | Yong He <yonghe@google.com> | 2019-01-25 18:10:57 -0800 |
| commit | 864c38ee72991f414f2478ccacb462bfb11b4bca (patch) | |
| tree | 6cf97e1d3ad5546c8ee139cdc2acffc790804031 /source/slang/emit.cpp | |
| parent | a38490d7716ef6cbf9cbb992b880b9bbc9c1ac93 (diff) | |
fix up empty-struct-parameters
Diffstat (limited to 'source/slang/emit.cpp')
| -rw-r--r-- | source/slang/emit.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index c3e1b2d08..536c72e11 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -3572,6 +3572,9 @@ struct EmitVisitor UInt argCount = inst->getOperandCount(); for( UInt aa = 1; aa < argCount; ++aa ) { + auto operand = inst->getOperand(aa); + if (as<IRVoidType>(operand->getDataType())) + continue; if(aa != 1) emit(", "); emitIROperand(ctx, inst->getOperand(aa), mode, kEOp_General); } @@ -6087,6 +6090,8 @@ struct EmitVisitor { varType = outType->getValueType(); } + if (as<IRVoidType>(varType)) + return; // When a global shader parameter represents a "parameter group" // (either a constant buffer or a parameter block with non-resource |
