Skip to content

Commit 08c41b4

Browse files
Greg Rothbob80905github-actions[bot]
authored
Implement mesh node output params (#6482)
To enable reuse of the mesh code generation for output parameters, mesh nodes now share the mesh shader function properties instead of having their own copies. This allows us to rely on the same code to detect errors and pass along parameter information. Since nodes don't store their info in the shader info union, there isn't a conflict. Similar sharing with mesh signature lowering is possible by calling the mesh signature lowering stages for mesh nodes and lightly altering those functions to accomodate for node shaders. Some changes were made to validation to allow for the new parameters and DXIL intrinsics in node shaders. Created a convenience method in function properties to identify mesh nodes as I was tired of typing out the conditionals to identify it. Adds tests for invalid output parameters, misuse of SetMeshOutputCounts, and a thorough end-to-end node record-to-mesh output test. Fixes #6475 --------- Co-authored-by: Joshua Batista <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 97f3605 commit 08c41b4

28 files changed

+488
-75
lines changed

docs/DXIL.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3088,7 +3088,7 @@ INSTR.MIPLEVELFORGETDIMENSION Use mip level on buffer when GetDimens
30883088
INSTR.MIPONUAVLOAD uav load don't support mipLevel/sampleIndex.
30893089
INSTR.MISSINGSETMESHOUTPUTCOUNTS Missing SetMeshOutputCounts call.
30903090
INSTR.MULTIPLEGETMESHPAYLOAD GetMeshPayload cannot be called multiple times.
3091-
INSTR.MULTIPLESETMESHOUTPUTCOUNTS SetMeshOUtputCounts cannot be called multiple times.
3091+
INSTR.MULTIPLESETMESHOUTPUTCOUNTS SetMeshOutputCounts cannot be called multiple times.
30923092
INSTR.NODERECORDHANDLEUSEAFTERCOMPLETE Invalid use of completed record handle.
30933093
INSTR.NOGENERICPTRADDRSPACECAST Address space cast between pointer types must have one part to be generic address space.
30943094
INSTR.NOIDIVBYZERO No signed integer division by zero.

include/dxc/DXIL/DxilFunctionProps.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,6 @@ struct DxilFunctionProps {
182182
unsigned MaxDispatchGrid[3];
183183
unsigned MaxRecursionDepth;
184184
// BEGIN experimental mesh node properties
185-
DXIL::MeshOutputTopology OutputTopology;
186-
unsigned MaxVertexCount;
187-
unsigned MaxPrimitiveCount;
188185
unsigned MaxInputRecordsPerGraphEntryRecord;
189186
bool MaxInputRecSharedAcrossNodeArray;
190187
// END experimental mesh node properties
@@ -238,6 +235,13 @@ struct DxilFunctionProps {
238235
return shaderKind == DXIL::ShaderKind::Node ||
239236
Node.LaunchType != DXIL::NodeLaunchType::Invalid;
240237
};
238+
bool IsMeshNode() const {
239+
return shaderKind == DXIL::ShaderKind::Node &&
240+
Node.LaunchType == DXIL::NodeLaunchType::Mesh;
241+
};
242+
bool UsesPatchConstOrPrimSignature() {
243+
return IsHS() || IsDS() || IsMS() || IsMeshNode();
244+
}
241245
};
242246

243247
} // namespace hlsl

include/dxc/DXIL/DxilSigPoint.inl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ DXIL::SigPointKind SigPoint::GetKind(DXIL::ShaderKind shaderKind,
317317
}
318318
break;
319319
case DXIL::ShaderKind::Mesh:
320+
// Assuming mesh node
321+
case DXIL::ShaderKind::Node:
320322
switch (sigKind) {
321323
case DXIL::SignatureKind::Input:
322324
return DXIL::SigPointKind::MSIn;

lib/DXIL/DxilMetadataHelper.cpp

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,18 +1902,16 @@ void DxilMDHelper::LoadDxilEntryProperties(const MDOperand &MDO,
19021902
} break;
19031903
case DxilMDHelper::kDxilNodeMeshOutputTopologyTag: {
19041904
hasNodeTag = true;
1905-
auto &Node = props.Node;
1906-
Node.OutputTopology = (DXIL::MeshOutputTopology)ConstMDToUint32(MDO);
1905+
props.ShaderProps.MS.outputTopology =
1906+
(DXIL::MeshOutputTopology)ConstMDToUint32(MDO);
19071907
} break;
19081908
case DxilMDHelper::kDxilNodeMeshMaxVertexCountTag: {
19091909
hasNodeTag = true;
1910-
auto &Node = props.Node;
1911-
Node.MaxVertexCount = ConstMDToUint32(MDO);
1910+
props.ShaderProps.MS.maxVertexCount = ConstMDToUint32(MDO);
19121911
} break;
19131912
case DxilMDHelper::kDxilNodeMeshMaxPrimitiveCountTag: {
19141913
hasNodeTag = true;
1915-
auto &Node = props.Node;
1916-
Node.MaxPrimitiveCount = ConstMDToUint32(MDO);
1914+
props.ShaderProps.MS.maxPrimitiveCount = ConstMDToUint32(MDO);
19171915
} break;
19181916
case DxilMDHelper::kDxilNodeMaxInputRecordsPerGraphEntryRecordTag: {
19191917
hasNodeTag = true;
@@ -1981,10 +1979,12 @@ void DxilMDHelper::SerializeNodeProps(SmallVectorImpl<llvm::Metadata *> &MDVals,
19811979
MDVals.push_back(Uint32ToConstMD(NodeProps.MaxDispatchGrid[1]));
19821980
MDVals.push_back(Uint32ToConstMD(NodeProps.MaxDispatchGrid[2]));
19831981
MDVals.push_back(Uint32ToConstMD(NodeProps.MaxRecursionDepth));
1984-
if (DXIL::CompareVersions(m_MinValMajor, m_MinValMinor, 1, 9) >= 0) {
1985-
MDVals.emplace_back(Uint32ToConstMD((unsigned)NodeProps.OutputTopology));
1986-
MDVals.emplace_back(Uint32ToConstMD(NodeProps.MaxVertexCount));
1987-
MDVals.emplace_back(Uint32ToConstMD(NodeProps.MaxPrimitiveCount));
1982+
if (props->IsMeshNode()) {
1983+
MDVals.emplace_back(
1984+
Uint32ToConstMD((unsigned)props->ShaderProps.MS.outputTopology));
1985+
MDVals.emplace_back(Uint32ToConstMD(props->ShaderProps.MS.maxVertexCount));
1986+
MDVals.emplace_back(
1987+
Uint32ToConstMD(props->ShaderProps.MS.maxPrimitiveCount));
19881988
MDVals.push_back(
19891989
Uint32ToConstMD(NodeProps.MaxInputRecordsPerGraphEntryRecord));
19901990
MDVals.push_back(BoolToConstMD(NodeProps.MaxInputRecSharedAcrossNodeArray));
@@ -2042,11 +2042,13 @@ void DxilMDHelper::DeserializeNodeProps(const MDTuple *pProps, unsigned &idx,
20422042
NodeProps.MaxDispatchGrid[1] = ConstMDToUint32(pProps->getOperand(idx++));
20432043
NodeProps.MaxDispatchGrid[2] = ConstMDToUint32(pProps->getOperand(idx++));
20442044
NodeProps.MaxRecursionDepth = ConstMDToUint32(pProps->getOperand(idx++));
2045-
if (DXIL::CompareVersions(m_MinValMajor, m_MinValMinor, 1, 9) >= 0) {
2046-
NodeProps.OutputTopology =
2045+
if (props->IsMeshNode()) {
2046+
props->ShaderProps.MS.outputTopology =
20472047
(DXIL::MeshOutputTopology)ConstMDToUint32(pProps->getOperand(idx++));
2048-
NodeProps.MaxVertexCount = ConstMDToUint32(pProps->getOperand(idx++));
2049-
NodeProps.MaxPrimitiveCount = ConstMDToUint32(pProps->getOperand(idx++));
2048+
props->ShaderProps.MS.maxVertexCount =
2049+
ConstMDToUint32(pProps->getOperand(idx++));
2050+
props->ShaderProps.MS.maxPrimitiveCount =
2051+
ConstMDToUint32(pProps->getOperand(idx++));
20502052
NodeProps.MaxInputRecordsPerGraphEntryRecord =
20512053
ConstMDToUint32(pProps->getOperand(idx++));
20522054
NodeProps.MaxInputRecSharedAcrossNodeArray =
@@ -2791,22 +2793,24 @@ void DxilMDHelper::EmitDxilNodeState(std::vector<llvm::Metadata *> &MDVals,
27912793
}
27922794

27932795
// Experimental mesh node shader properties
2794-
if (Node.OutputTopology != DXIL::MeshOutputTopology::Undefined) {
2796+
if (props.IsMeshNode()) {
27952797
MDVals.emplace_back(
27962798
Uint32ToConstMD(DxilMDHelper::kDxilNodeMeshOutputTopologyTag));
2797-
MDVals.emplace_back(Uint32ToConstMD((unsigned)Node.OutputTopology));
2799+
MDVals.emplace_back(
2800+
Uint32ToConstMD((unsigned)props.ShaderProps.MS.outputTopology));
27982801
}
27992802

2800-
if (Node.MaxVertexCount > 0) {
2803+
if (props.ShaderProps.MS.maxVertexCount > 0) {
28012804
MDVals.emplace_back(
28022805
Uint32ToConstMD(DxilMDHelper::kDxilNodeMeshMaxVertexCountTag));
2803-
MDVals.emplace_back(Uint32ToConstMD(Node.MaxVertexCount));
2806+
MDVals.emplace_back(Uint32ToConstMD(props.ShaderProps.MS.maxVertexCount));
28042807
}
28052808

2806-
if (Node.MaxPrimitiveCount > 0) {
2809+
if (props.ShaderProps.MS.maxPrimitiveCount > 0) {
28072810
MDVals.emplace_back(
28082811
Uint32ToConstMD(DxilMDHelper::kDxilNodeMeshMaxPrimitiveCountTag));
2809-
MDVals.emplace_back(Uint32ToConstMD(Node.MaxPrimitiveCount));
2812+
MDVals.emplace_back(
2813+
Uint32ToConstMD(props.ShaderProps.MS.maxPrimitiveCount));
28102814
}
28112815

28122816
if (Node.MaxInputRecordsPerGraphEntryRecord) {

lib/DXIL/DxilModule.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,8 +2344,7 @@ void DxilModule::UpdateFunctionToShaderCompat(const llvm::Function *dxilFunc) {
23442344
if (DXIL::OpCode::SetMeshOutputCounts == OP::GetDxilOpFuncCallInst(CI) &&
23452345
HasDxilFunctionProps(F)) {
23462346
const DxilFunctionProps &props = GetDxilFunctionProps(F);
2347-
if (props.shaderKind != DXIL::ShaderKind::Node ||
2348-
props.Node.LaunchType != DXIL::NodeLaunchType::Mesh)
2347+
if (!props.IsMeshNode())
23492348
mask &= ~SFLAG(Node);
23502349
}
23512350
info.mask &= mask;

lib/DXIL/DxilOperations.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3251,16 +3251,16 @@ void OP::GetMinShaderModelAndMask(OpCode C, bool bWithTranslation,
32513251
mask = SFLAG(Library) | SFLAG(Pixel);
32523252
return;
32533253
}
3254-
// Instructions: EmitIndices=169, GetMeshPayload=170, StoreVertexOutput=171,
3255-
// StorePrimitiveOutput=172
3256-
if ((169 <= op && op <= 172)) {
3254+
// Instructions: GetMeshPayload=170
3255+
if (op == 170) {
32573256
major = 6;
32583257
minor = 5;
32593258
mask = SFLAG(Mesh);
32603259
return;
32613260
}
3262-
// Instructions: SetMeshOutputCounts=168
3263-
if (op == 168) {
3261+
// Instructions: SetMeshOutputCounts=168, EmitIndices=169,
3262+
// StoreVertexOutput=171, StorePrimitiveOutput=172
3263+
if ((168 <= op && op <= 169) || (171 <= op && op <= 172)) {
32643264
major = 6;
32653265
minor = 5;
32663266
mask = SFLAG(Mesh) | SFLAG(Node);

lib/DXIL/DxilTypeSystem.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,8 @@ DXIL::SigPointKind SigPointFromInputQual(DxilParamInputQual Q,
782782
}
783783
break;
784784
case DXIL::ShaderKind::Mesh:
785+
// assuming mesh node, wouldn't be here otherwise
786+
case DXIL::ShaderKind::Node:
785787
switch (Q) {
786788
case DxilParamInputQual::In:
787789
case DxilParamInputQual::InPayload:

lib/DxilContainer/DxilContainerAssembler.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,13 +1656,14 @@ class DxilRDATWriter : public DxilPartWriter {
16561656
funcAttribs.push_back(Builder.InsertRecord(nAttrib));
16571657
}
16581658

1659-
if (props.Node.OutputTopology != DXIL::MeshOutputTopology::Undefined) {
1659+
if (props.Node.LaunchType == NodeLaunchType::Mesh) {
16601660
nAttrib = {};
16611661
nAttrib.AttribKind = (uint32_t)RDAT::NodeFuncAttribKind::MeshShaderInfo;
16621662
RDAT::MSInfo info = {};
1663-
info.MeshOutputTopology = (uint8_t)props.Node.OutputTopology;
1664-
info.MaxOutputVertices = (uint16_t)props.Node.MaxVertexCount;
1665-
info.MaxOutputPrimitives = (uint16_t)props.Node.MaxPrimitiveCount;
1663+
info.MeshOutputTopology = (uint8_t)props.ShaderProps.MS.outputTopology;
1664+
info.MaxOutputVertices = (uint16_t)props.ShaderProps.MS.maxVertexCount;
1665+
info.MaxOutputPrimitives =
1666+
(uint16_t)props.ShaderProps.MS.maxPrimitiveCount;
16661667
nAttrib.MeshShaderInfo = Builder.InsertRecord(info);
16671668
funcAttribs.push_back(Builder.InsertRecord(nAttrib));
16681669
}

lib/HLSL/DxilValidation.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,8 +1463,7 @@ static void ValidateSignatureDxilOp(CallInst *CI, DXIL::OpCode opcode,
14631463
}
14641464
} break;
14651465
case DXIL::OpCode::SetMeshOutputCounts: {
1466-
if (!props.IsMS() && (!props.IsNode() || props.Node.LaunchType !=
1467-
DXIL::NodeLaunchType::Mesh)) {
1466+
if (!props.IsMS() && !props.IsMeshNode()) {
14681467
ValCtx.EmitInstrFormatError(CI, ValidationRule::SmOpcodeInInvalidFunction,
14691468
{"SetMeshOutputCounts", "Mesh shader"});
14701469
}
@@ -2797,10 +2796,7 @@ static void ValidateMsIntrinsics(Function *F, ValidationContext &ValCtx,
27972796
CallInst *getMeshPayload) {
27982797
if (ValCtx.DxilMod.HasDxilFunctionProps(F)) {
27992798
DxilFunctionProps &props = ValCtx.DxilMod.GetDxilFunctionProps(F);
2800-
DXIL::ShaderKind shaderKind = props.shaderKind;
2801-
if (shaderKind != DXIL::ShaderKind::Mesh &&
2802-
(shaderKind != DXIL::ShaderKind::Node ||
2803-
props.Node.LaunchType != DXIL::NodeLaunchType::Mesh))
2799+
if (!props.IsMS() && !props.IsMeshNode())
28042800
return;
28052801
} else {
28062802
return;
@@ -5170,6 +5166,7 @@ static void ValidateEntrySignatures(ValidationContext &ValCtx,
51705166
bool isGS = props.IsGS();
51715167
bool isCS = props.IsCS();
51725168
bool isMS = props.IsMS();
5169+
bool isMN = props.IsMeshNode();
51735170

51745171
if (isPS) {
51755172
// PS output no interp mode.
@@ -5179,7 +5176,7 @@ static void ValidateEntrySignatures(ValidationContext &ValCtx,
51795176
ValidateNoInterpModeSignature(ValCtx, S.InputSignature);
51805177
}
51815178

5182-
if (isMS) {
5179+
if (isMS || isMN) {
51835180
// primitive output constant interp mode.
51845181
ValidateConstantInterpModeSignature(ValCtx, S.PatchConstOrPrimSignature);
51855182
} else {
@@ -5204,6 +5201,10 @@ static void ValidateEntrySignatures(ValidationContext &ValCtx,
52045201
maxOutputScalars = DXIL::kMaxOutputTotalScalars;
52055202
maxPatchConstantScalars = DXIL::kMaxHSOutputPatchConstantTotalScalars;
52065203
break;
5204+
case DXIL::ShaderKind::Node:
5205+
if (!isMN)
5206+
break;
5207+
LLVM_FALLTHROUGH;
52075208
case DXIL::ShaderKind::Mesh:
52085209
maxOutputScalars = DXIL::kMaxOutputTotalScalars;
52095210
maxPatchConstantScalars = DXIL::kMaxOutputTotalScalars;

lib/HLSL/HLSignatureLower.cpp

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -467,12 +467,13 @@ void HLSignatureLower::CreateDxilSignatures() {
467467
if (HLModule::IsStreamOutputPtrType(Ty))
468468
continue;
469469

470-
// Skip OutIndices and InPayload
470+
// Skip OutIndices, InPayload, and NodeIO
471471
DxilParameterAnnotation &paramAnnotation =
472472
EntryAnnotation->GetParameterAnnotation(arg.getArgNo());
473473
hlsl::DxilParamInputQual qual = paramAnnotation.GetParamInputQual();
474474
if (qual == hlsl::DxilParamInputQual::OutIndices ||
475-
qual == hlsl::DxilParamInputQual::InPayload)
475+
qual == hlsl::DxilParamInputQual::InPayload ||
476+
qual == hlsl::DxilParamInputQual::NodeIO)
476477
continue;
477478

478479
ProcessArgument(Entry, EntryAnnotation, arg, props, pSM,
@@ -523,17 +524,15 @@ void HLSignatureLower::AllocateDxilInputOutputs() {
523524
"Failed to allocate all input signature elements in available space.");
524525
}
525526

526-
if (props.shaderKind != DXIL::ShaderKind::Amplification) {
527+
if (!props.IsAS()) {
527528
hlsl::PackDxilSignature(EntrySig.OutputSignature, packing);
528529
if (!EntrySig.OutputSignature.IsFullyAllocated()) {
529530
llvm_unreachable("Failed to allocate all output signature elements in "
530531
"available space.");
531532
}
532533
}
533534

534-
if (props.shaderKind == DXIL::ShaderKind::Hull ||
535-
props.shaderKind == DXIL::ShaderKind::Domain ||
536-
props.shaderKind == DXIL::ShaderKind::Mesh) {
535+
if (props.UsesPatchConstOrPrimSignature()) {
537536
hlsl::PackDxilSignature(EntrySig.PatchConstOrPrimSignature, packing);
538537
if (!EntrySig.PatchConstOrPrimSignature.IsFullyAllocated()) {
539538
llvm_unreachable("Failed to allocate all patch constant signature "
@@ -886,7 +885,7 @@ struct InputOutputAccessInfo {
886885
void collectInputOutputAccessInfo(
887886
Value *GV, Constant *constZero,
888887
std::vector<InputOutputAccessInfo> &accessInfoList, bool hasVertexOrPrimID,
889-
bool bInput, bool bRowMajor, bool isMS) {
888+
bool bInput, bool bRowMajor) {
890889
// merge GEP use for input output.
891890
dxilutil::MergeGepUse(GV);
892891
for (auto User = GV->user_begin(); User != GV->user_end();) {
@@ -1129,8 +1128,8 @@ void HLSignatureLower::GenerateDxilInputsOutputs(DXIL::SignatureKind SK) {
11291128
opcode = OP::OpCode::LoadInput;
11301129
break;
11311130
case DXIL::SignatureKind::Output:
1132-
opcode =
1133-
props.IsMS() ? OP::OpCode::StoreVertexOutput : OP::OpCode::StoreOutput;
1131+
opcode = props.IsMS() || props.IsMeshNode() ? OP::OpCode::StoreVertexOutput
1132+
: OP::OpCode::StoreOutput;
11341133
break;
11351134
case DXIL::SignatureKind::PatchConstOrPrim:
11361135
opcode = OP::OpCode::StorePrimitiveOutput;
@@ -1141,7 +1140,7 @@ void HLSignatureLower::GenerateDxilInputsOutputs(DXIL::SignatureKind SK) {
11411140
bool bInput = SK == DXIL::SignatureKind::Input;
11421141
bool bNeedVertexOrPrimID =
11431142
bInput && (props.IsGS() || props.IsDS() || props.IsHS());
1144-
bNeedVertexOrPrimID |= !bInput && props.IsMS();
1143+
bNeedVertexOrPrimID |= !bInput && (props.IsMS() || props.IsMeshNode());
11451144

11461145
Constant *OpArg = hlslOP->GetU32Const((unsigned)opcode);
11471146

@@ -1155,7 +1154,7 @@ void HLSignatureLower::GenerateDxilInputsOutputs(DXIL::SignatureKind SK) {
11551154

11561155
Constant *constZero = hlslOP->GetU32Const(0);
11571156

1158-
Value *undefVertexIdx = props.IsMS() || !bInput
1157+
Value *undefVertexIdx = props.IsMS() || props.IsMeshNode() || !bInput
11591158
? nullptr
11601159
: UndefValue::get(Type::getInt32Ty(HLM.GetCtx()));
11611160

@@ -1236,7 +1235,7 @@ void HLSignatureLower::GenerateDxilInputsOutputs(DXIL::SignatureKind SK) {
12361235
std::vector<InputOutputAccessInfo> accessInfoList;
12371236
collectInputOutputAccessInfo(GV, constZero, accessInfoList,
12381237
bNeedVertexOrPrimID && bIsArrayTy, bInput,
1239-
bRowMajor, props.IsMS());
1238+
bRowMajor);
12401239

12411240
for (InputOutputAccessInfo &info : accessInfoList) {
12421241
GenerateInputOutputUserCall(
@@ -1258,6 +1257,14 @@ void HLSignatureLower::GenerateDxilComputeAndNodeCommonInputs() {
12581257
DxilParameterAnnotation &paramAnnotation =
12591258
funcAnnotation->GetParameterAnnotation(arg.getArgNo());
12601259

1260+
DxilParamInputQual inputQual = paramAnnotation.GetParamInputQual();
1261+
// Skip mesh node out params
1262+
if (funcProps.IsMeshNode() &&
1263+
(inputQual == DxilParamInputQual::OutIndices ||
1264+
inputQual == DxilParamInputQual::OutVertices ||
1265+
inputQual == DxilParamInputQual::OutPrimitives))
1266+
continue;
1267+
12611268
llvm::StringRef semanticStr = paramAnnotation.GetSemanticString();
12621269

12631270
if (semanticStr.empty()) {
@@ -1424,8 +1431,7 @@ void HLSignatureLower::GenerateDxilPatchConstantLdSt() {
14241431
}
14251432
std::vector<InputOutputAccessInfo> accessInfoList;
14261433
collectInputOutputAccessInfo(GV, constZero, accessInfoList,
1427-
bNeedVertexOrPrimID, bIsInput, bRowMajor,
1428-
false);
1434+
bNeedVertexOrPrimID, bIsInput, bRowMajor);
14291435

14301436
bool bIsArrayTy = GV->getType()->getPointerElementType()->isArrayTy();
14311437
bool isPrecise = m_preciseSigSet.count(SE);
@@ -1499,8 +1505,7 @@ void HLSignatureLower::GenerateDxilPatchConstantFunctionInputs() {
14991505
}
15001506
std::vector<InputOutputAccessInfo> accessInfoList;
15011507
collectInputOutputAccessInfo(&arg, constZero, accessInfoList,
1502-
/*hasVertexOrPrimID*/ true, true, bRowMajor,
1503-
false);
1508+
/*hasVertexOrPrimID*/ true, true, bRowMajor);
15041509
for (InputOutputAccessInfo &info : accessInfoList) {
15051510
Constant *OpArg = hlslOP->GetU32Const((unsigned)opcode);
15061511
if (LoadInst *ldInst = dyn_cast<LoadInst>(info.user)) {
@@ -1802,6 +1807,13 @@ void HLSignatureLower::Run() {
18021807
GenerateDxilPrimOutputs();
18031808
}
18041809
} else if (props.IsCS() || props.IsNode()) {
1810+
if (props.IsMeshNode()) {
1811+
GenerateEmitIndicesOperations();
1812+
CreateDxilSignatures();
1813+
AllocateDxilInputOutputs();
1814+
GenerateDxilOutputs();
1815+
GenerateDxilPrimOutputs();
1816+
}
18051817
GenerateDxilComputeAndNodeCommonInputs();
18061818
}
18071819

0 commit comments

Comments
 (0)