Skip to content

Commit cb6c7c4

Browse files
committed
add collection of StaticSamplers
1 parent 447dca9 commit cb6c7c4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

clang/lib/Sema/SemaHLSL.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,17 @@ bool SemaHLSL::handleRootSignatureDecl(HLSLRootSignatureDecl *D,
11281128
Info.Visibility = Constants->Visibility;
11291129
Infos.push_back(Info);
11301130
}
1131+
if (const auto *Sampler =
1132+
std::get_if<llvm::hlsl::rootsig::StaticSampler>(&Elem)) {
1133+
RangeInfo Info;
1134+
Info.LowerBound = Sampler->Reg.Number;
1135+
Info.UpperBound = Info.LowerBound; // use inclusive ranges []
1136+
1137+
Info.Class = llvm::dxil::ResourceClass::Sampler;
1138+
Info.Space = Sampler->Space;
1139+
Info.Visibility = Sampler->Visibility;
1140+
Infos.push_back(Info);
1141+
}
11311142
}
11321143

11331144
// 2. Sort the RangeInfo's by their GroupT to form groupings

0 commit comments

Comments
 (0)