Skip to content

Commit ec1dd87

Browse files
author
joaosaffran
committed
addressing changes
1 parent 4b177e2 commit ec1dd87

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

llvm/include/llvm/BinaryFormat/DXContainer.h

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -612,13 +612,29 @@ struct RootSignatureValidations {
612612
}
613613

614614
static bool isValidParameterType(dxbc::RootParameterType Type) {
615-
// RootParameterType::Empty is the higest value in the enum.
616-
return Type < dxbc::RootParameterType::Empty;
615+
switch (Type) {
616+
case dxbc::RootParameterType::Constants32Bit:
617+
return true;
618+
default:
619+
return false;
620+
}
617621
}
618622

619623
static bool isValidShaderVisibility(dxbc::ShaderVisibility Visibility) {
620-
// ShaderVisibilityFlag::Empty is the higest value in the enum.
621-
return Visibility < dxbc::ShaderVisibility::Empty;
624+
switch (Visibility) {
625+
626+
case ShaderVisibility::All:
627+
case ShaderVisibility::Vertex:
628+
case ShaderVisibility::Hull:
629+
case ShaderVisibility::Domain:
630+
case ShaderVisibility::Geometry:
631+
case ShaderVisibility::Pixel:
632+
case ShaderVisibility::Amplification:
633+
case ShaderVisibility::Mesh:
634+
return true;
635+
case ShaderVisibility::Empty:
636+
return false;
637+
}
622638
}
623639
};
624640

0 commit comments

Comments
 (0)