Skip to content

Commit 2b6ca2e

Browse files
committed
[HLSL][RootSignature] Implement serialization of StaicSampler
- adds the easy cases
1 parent 749c762 commit 2b6ca2e

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

llvm/include/llvm/Frontend/HLSL/HLSLRootSignatureUtils.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ LLVM_ABI raw_ostream &operator<<(raw_ostream &OS,
3535
LLVM_ABI raw_ostream &operator<<(raw_ostream &OS,
3636
const RootDescriptor &Descriptor);
3737

38+
LLVM_ABI raw_ostream &operator<<(raw_ostream &OS,
39+
const StaticSampler &StaticSampler);
40+
3841
LLVM_ABI raw_ostream &operator<<(raw_ostream &OS,
3942
const DescriptorTableClause &Clause);
4043

llvm/lib/Frontend/HLSL/HLSLRootSignatureUtils.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,18 @@ raw_ostream &operator<<(raw_ostream &OS, const RootDescriptor &Descriptor) {
251251
return OS;
252252
}
253253

254+
raw_ostream &operator<<(raw_ostream &OS, const StaticSampler &Sampler) {
255+
OS << "StaticSampler(" << Sampler.Reg
256+
<< ", mipLODBias = " << Sampler.MipLODBias
257+
<< ", maxAnisotropy = " << Sampler.MaxAnisotropy
258+
<< ", minLOD = " << Sampler.MinLOD
259+
<< ", maxLOD = " << Sampler.MaxLOD
260+
<< ", space = " << Sampler.Space
261+
<< ", visibility = " << Sampler.Visibility
262+
<< ")";
263+
return OS;
264+
}
265+
254266
raw_ostream &operator<<(raw_ostream &OS, const DescriptorTable &Table) {
255267
OS << "DescriptorTable(numClauses = " << Table.NumClauses
256268
<< ", visibility = " << Table.Visibility << ")";

0 commit comments

Comments
 (0)