[llvm] [DirectX] add enum for PSV resource type/kind/flag. (PR #106227)
Damyan Pepper via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 12:33:41 PDT 2024
================
@@ -89,3 +89,33 @@ static const EnumEntry<PSV::InterpolationMode> InterpolationModeNames[] = {
ArrayRef<EnumEntry<PSV::InterpolationMode>> PSV::getInterpolationModes() {
return ArrayRef(InterpolationModeNames);
}
+
+#define RESOURCE_TYPE(Val, Enum) {#Enum, PSV::ResourceType::Enum},
+
+static const EnumEntry<PSV::ResourceType> ResourceTypeNames[] = {
+#include "llvm/BinaryFormat/DXContainerConstants.def"
+};
----------------
damyanp wrote:
I was about to give similar feedback in that llvm/include/llvm/BinaryFormat/DXContainer.h but it pretty consistently puts the `#define` before the enum.
I wonder if a fix here, or maybe in a follow up, to update DXContainer to this way would be worth doing?
https://github.com/llvm/llvm-project/pull/106227
More information about the llvm-commits
mailing list