Skip to content

Commit 36afa22

Browse files
committed
removing assert and adding lastEntry
1 parent 4074ceb commit 36afa22

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

llvm/include/llvm/BinaryFormat/DXContainer.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,7 @@ inline bool isValidParameterType(uint32_t V) {
203203
}
204204

205205
inline bool isValidRangeType(uint32_t V) {
206-
static_assert(llvm::to_underlying(dxil::ResourceClass::Sampler) == 3,
207-
"dxil::ResourceClass numeric values must match the Root "
208-
"Signature values associated to each class.");
209-
return V <= llvm::to_underlying(dxil::ResourceClass::Sampler);
206+
return V <= llvm::to_underlying(dxil::ResourceClass::LastEntry);
210207
}
211208

212209
#define SHADER_VISIBILITY(Val, Enum) Enum = Val,

llvm/include/llvm/Support/DXILABI.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ enum class ResourceClass : uint8_t {
2828
UAV,
2929
CBuffer,
3030
Sampler,
31+
LastEntry = Sampler,
3132
};
3233

3334
/// The kind of resource for an SRV or UAV resource. Sometimes referred to as

0 commit comments

Comments
 (0)