-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[DirectX] Replace ResourceFlag enum with struct fields #106617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Since we keep the resource flag as uint32_t, the yaml code is unused.
@llvm/pr-subscribers-llvm-binary-utilities @llvm/pr-subscribers-backend-directx Author: Xiang Li (python3kgae) ChangesSince we keep the resource flag as uint32_t, the yaml code is unused. Full diff: https://github.com/llvm/llvm-project/pull/106617.diff 2 Files Affected:
diff --git a/llvm/include/llvm/ObjectYAML/DXContainerYAML.h b/llvm/include/llvm/ObjectYAML/DXContainerYAML.h
index e432359b7bbd07..1407f16a3499fc 100644
--- a/llvm/include/llvm/ObjectYAML/DXContainerYAML.h
+++ b/llvm/include/llvm/ObjectYAML/DXContainerYAML.h
@@ -178,7 +178,6 @@ LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::PSV::ComponentType)
LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::PSV::InterpolationMode)
LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::PSV::ResourceType)
LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::PSV::ResourceKind)
-LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::PSV::ResourceFlag)
LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::D3DSystemValue)
LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::SigComponentType)
LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::SigMinPrecision)
diff --git a/llvm/lib/ObjectYAML/DXContainerYAML.cpp b/llvm/lib/ObjectYAML/DXContainerYAML.cpp
index 21a966d5abd132..b8a0d21c62d6b9 100644
--- a/llvm/lib/ObjectYAML/DXContainerYAML.cpp
+++ b/llvm/lib/ObjectYAML/DXContainerYAML.cpp
@@ -266,12 +266,6 @@ void ScalarEnumerationTraits<dxbc::PSV::ResourceKind>::enumeration(
IO.enumCase(Value, E.Name.str().c_str(), E.Value);
}
-void ScalarEnumerationTraits<dxbc::PSV::ResourceFlag>::enumeration(
- IO &IO, dxbc::PSV::ResourceFlag &Value) {
- for (const auto &E : dxbc::PSV::getResourceFlags())
- IO.enumCase(Value, E.Name.str().c_str(), E.Value);
-}
-
void ScalarEnumerationTraits<dxbc::D3DSystemValue>::enumeration(
IO &IO, dxbc::D3DSystemValue &Value) {
for (const auto &E : dxbc::getD3DSystemValues())
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a follow up to a previous PR? Might be good to have them linked.
Done. |
Have you considered instead handling this the way the SFI0 feature flags are enabled? That allows the YAML to be more expressive. |
✅ With the latest revision this PR passed the C/C++ code formatter. |
Updated. |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/3281 Here is the relevant piece of the build log for the reference
|
Remove the enum about ResourceFlag.
Add struct ResourceFlags which save the resource flags with bool fields.
This will get better yaml dump.
For #103275