Skip to content

Commit 710cc3e

Browse files
committed
self-review: touch-up
1 parent c3b4c86 commit 710cc3e

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

llvm/include/llvm/Frontend/HLSL/HLSLRootSignature.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct RootConstants {
9393
ShaderVisibility Visibility = ShaderVisibility::All;
9494
};
9595

96-
using DescriptorType = llvm::dxil::ResourceClass;
96+
enum class DescriptorType : uint8_t { SRV = 0, UAV, CBuffer };
9797
// Models RootDescriptor : CBV | SRV | UAV, by collecting like parameters
9898
struct RootDescriptor {
9999
DescriptorType Type;
@@ -103,18 +103,14 @@ struct RootDescriptor {
103103
RootDescriptorFlags Flags;
104104

105105
void setDefaultFlags() {
106-
assert(Type != ParamType::Sampler &&
107-
"Sampler is not a valid type of ParamType");
108106
switch (Type) {
109-
case ParamType::CBuffer:
110-
case ParamType::SRV:
107+
case DescriptorType::CBuffer:
108+
case DescriptorType::SRV:
111109
Flags = RootDescriptorFlags::DataStaticWhileSetAtExecute;
112110
break;
113-
case ParamType::UAV:
111+
case DescriptorType::UAV:
114112
Flags = RootDescriptorFlags::DataVolatile;
115113
break;
116-
case ParamType::Sampler:
117-
break;
118114
}
119115
}
120116
};

0 commit comments

Comments
 (0)