[llvm] [DirectX] add enum for PSV resource type/kind/flag. (PR #106227)

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 07:00:59 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-directx
@llvm/pr-subscribers-objectyaml

@llvm/pr-subscribers-llvm-binary-utilities

Author: Xiang Li (python3kgae)

<details>
<summary>Changes</summary>

Add ResourceType, ResourceKind and ResourceFlag enum class for PSV resource.

This is for #<!-- -->103275

---

Patch is 64.55 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/106227.diff


40 Files Affected:

- (modified) llvm/include/llvm/BinaryFormat/DXContainer.h (+24-3) 
- (modified) llvm/include/llvm/BinaryFormat/DXContainerConstants.def (+46) 
- (modified) llvm/include/llvm/ObjectYAML/DXContainerYAML.h (+3) 
- (modified) llvm/lib/BinaryFormat/DXContainer.cpp (+31) 
- (modified) llvm/lib/ObjectYAML/DXContainerYAML.cpp (+18) 
- (modified) llvm/test/ObjectYAML/DXContainer/DomainMaskVectors.yaml (+3-3) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv0-amplification.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv0-compute.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv0-domain.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv0-geometry.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv0-hull.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv0-mesh.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv0-pixel.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv0-vertex.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv1-amplification.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv1-compute.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv1-domain.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv1-geometry.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv1-hull.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv1-mesh.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv1-pixel.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv1-vertex.yaml (+4-4) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv2-amplification.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv2-compute.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv2-domain.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv2-geometry.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv2-hull.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv2-mesh.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv2-pixel.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv2-vertex.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv3-amplification.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv3-compute.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv3-domain.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv3-geometry.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv3-hull.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv3-mesh.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv3-pixel.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/PSVv3-vertex.yaml (+12-12) 
- (modified) llvm/test/ObjectYAML/DXContainer/SigElements.yaml (+2-2) 
- (modified) llvm/unittests/Object/DXContainerTest.cpp (+32-32) 


``````````diff
diff --git a/llvm/include/llvm/BinaryFormat/DXContainer.h b/llvm/include/llvm/BinaryFormat/DXContainer.h
index 013431faff2728..d0e8fab219d5e8 100644
--- a/llvm/include/llvm/BinaryFormat/DXContainer.h
+++ b/llvm/include/llvm/BinaryFormat/DXContainer.h
@@ -299,6 +299,27 @@ enum class InterpolationMode : uint8_t {
 
 ArrayRef<EnumEntry<InterpolationMode>> getInterpolationModes();
 
+#define RESOURCE_TYPE(Val, Enum) Enum = Val,
+enum class ResourceType : uint32_t {
+#include "DXContainerConstants.def"
+};
+
+ArrayRef<EnumEntry<ResourceType>> getResourceTypes();
+
+#define RESOURCE_KIND(Val, Enum) Enum = Val,
+enum class ResourceKind : uint32_t {
+#include "DXContainerConstants.def"
+};
+
+ArrayRef<EnumEntry<ResourceKind>> getResourceKinds();
+
+#define RESOURCE_FLAG(Val, Enum) Enum = Val,
+enum class ResourceFlag : uint32_t {
+#include "DXContainerConstants.def"
+};
+
+ArrayRef<EnumEntry<ResourceFlag>> getResourceFlags();
+
 namespace v0 {
 struct RuntimeInfo {
   PipelinePSVInfo StageInfo;
@@ -315,7 +336,7 @@ struct RuntimeInfo {
 };
 
 struct ResourceBindInfo {
-  uint32_t Type;
+  ResourceType Type;
   uint32_t Space;
   uint32_t LowerBound;
   uint32_t UpperBound;
@@ -417,8 +438,8 @@ struct RuntimeInfo : public v1::RuntimeInfo {
 };
 
 struct ResourceBindInfo : public v0::ResourceBindInfo {
-  uint32_t Kind;
-  uint32_t Flags;
+  ResourceKind Kind;
+  ResourceFlag Flags;
 
   void swapBytes() {
     v0::ResourceBindInfo::swapBytes();
diff --git a/llvm/include/llvm/BinaryFormat/DXContainerConstants.def b/llvm/include/llvm/BinaryFormat/DXContainerConstants.def
index 62dc573555198b..4111cecb018bb3 100644
--- a/llvm/include/llvm/BinaryFormat/DXContainerConstants.def
+++ b/llvm/include/llvm/BinaryFormat/DXContainerConstants.def
@@ -150,6 +150,52 @@ INTERPOLATION_MODE(8, Invalid)
 #undef INTERPOLATION_MODE
 #endif // INTERPOLATION_MODE
 
+#ifdef RESOURCE_TYPE
+RESOURCE_TYPE(0, Invalid)
+RESOURCE_TYPE(1, Sampler)
+RESOURCE_TYPE(2, CBV)
+RESOURCE_TYPE(3, SRVTyped)
+RESOURCE_TYPE(4, SRVRaw)
+RESOURCE_TYPE(5, SRVStructured)
+RESOURCE_TYPE(6, UAVTyped)
+RESOURCE_TYPE(7, UAVRaw)
+RESOURCE_TYPE(8, UAVStructured)
+RESOURCE_TYPE(9, UAVStructuredWithCounter)
+
+#undef RESOURCE_TYPE
+#endif // RESOURCE_TYPE
+
+#ifdef RESOURCE_KIND
+RESOURCE_KIND(0, Invalid)
+RESOURCE_KIND(1, Texture1D)
+RESOURCE_KIND(2, Texture2D)
+RESOURCE_KIND(3, Texture2DMS)
+RESOURCE_KIND(4, Texture3D)
+RESOURCE_KIND(5, TextureCube)
+RESOURCE_KIND(6, Texture1DArray)
+RESOURCE_KIND(7, Texture2DArray)
+RESOURCE_KIND(8, Texture2DMSArray)
+RESOURCE_KIND(9, TextureCubeArray)
+RESOURCE_KIND(10, TypedBuffer)
+RESOURCE_KIND(11, RawBuffer)
+RESOURCE_KIND(12, StructuredBuffer)
+RESOURCE_KIND(13, CBuffer)
+RESOURCE_KIND(14, Sampler)
+RESOURCE_KIND(15, TBuffer)
+RESOURCE_KIND(16, RTAccelerationStructure)
+RESOURCE_KIND(17, FeedbackTexture2D)
+RESOURCE_KIND(18, FeedbackTexture2DArray)
+
+#undef RESOURCE_KIND
+#endif // RESOURCE_KIND
+
+#ifdef RESOURCE_FLAG
+RESOURCE_FLAG(0, None)
+RESOURCE_FLAG(1, UsedByAtomic64)
+
+#undef RESOURCE_FLAG
+#endif // RESOURCE_FLAG
+
 #ifdef D3D_SYSTEM_VALUE
 
 D3D_SYSTEM_VALUE(0, Undefined)
diff --git a/llvm/include/llvm/ObjectYAML/DXContainerYAML.h b/llvm/include/llvm/ObjectYAML/DXContainerYAML.h
index 9c4d9e19f11ba3..e432359b7bbd07 100644
--- a/llvm/include/llvm/ObjectYAML/DXContainerYAML.h
+++ b/llvm/include/llvm/ObjectYAML/DXContainerYAML.h
@@ -176,6 +176,9 @@ LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::DXContainerYAML::SignatureParameter)
 LLVM_YAML_DECLARE_ENUM_TRAITS(llvm::dxbc::PSV::SemanticKind)
 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/BinaryFormat/DXContainer.cpp b/llvm/lib/BinaryFormat/DXContainer.cpp
index 9c0e657b069697..efeb67acd3edc2 100644
--- a/llvm/lib/BinaryFormat/DXContainer.cpp
+++ b/llvm/lib/BinaryFormat/DXContainer.cpp
@@ -89,3 +89,34 @@ 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"
+};
+
+ArrayRef<EnumEntry<PSV::ResourceType>> PSV::getResourceTypes() {
+  return ArrayRef(ResourceTypeNames);
+}
+
+#define RESOURCE_KIND(Val, Enum) {#Enum, PSV::ResourceKind::Enum},
+
+static const EnumEntry<PSV::ResourceKind> ResourceKindNames[] = {
+#include "llvm/BinaryFormat/DXContainerConstants.def"
+};
+
+ArrayRef<EnumEntry<PSV::ResourceKind>> PSV::getResourceKinds() {
+  return ArrayRef(ResourceKindNames);
+}
+
+#define RESOURCE_FLAG(Val, Enum) {#Enum, PSV::ResourceFlag::Enum},
+
+static const EnumEntry<PSV::ResourceFlag> ResourceFlagNames[] = {
+#include "llvm/BinaryFormat/DXContainerConstants.def"
+};
+
+ArrayRef<EnumEntry<PSV::ResourceFlag>> PSV::getResourceFlags() {
+  return ArrayRef(ResourceFlagNames);
+}
+
diff --git a/llvm/lib/ObjectYAML/DXContainerYAML.cpp b/llvm/lib/ObjectYAML/DXContainerYAML.cpp
index 38063670aee6e8..21a966d5abd132 100644
--- a/llvm/lib/ObjectYAML/DXContainerYAML.cpp
+++ b/llvm/lib/ObjectYAML/DXContainerYAML.cpp
@@ -254,6 +254,24 @@ void ScalarEnumerationTraits<dxbc::PSV::InterpolationMode>::enumeration(
     IO.enumCase(Value, E.Name.str().c_str(), E.Value);
 }
 
+void ScalarEnumerationTraits<dxbc::PSV::ResourceType>::enumeration(
+    IO &IO, dxbc::PSV::ResourceType &Value) {
+  for (const auto &E : dxbc::PSV::getResourceTypes())
+    IO.enumCase(Value, E.Name.str().c_str(), E.Value);
+}
+
+void ScalarEnumerationTraits<dxbc::PSV::ResourceKind>::enumeration(
+    IO &IO, dxbc::PSV::ResourceKind &Value) {
+  for (const auto &E : dxbc::PSV::getResourceKinds())
+    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())
diff --git a/llvm/test/ObjectYAML/DXContainer/DomainMaskVectors.yaml b/llvm/test/ObjectYAML/DXContainer/DomainMaskVectors.yaml
index 713fbc61e094b5..04e9edd7398ec0 100644
--- a/llvm/test/ObjectYAML/DXContainer/DomainMaskVectors.yaml
+++ b/llvm/test/ObjectYAML/DXContainer/DomainMaskVectors.yaml
@@ -70,12 +70,12 @@ Parts:
       NumThreadsZ:     0
       ResourceStride:  24
       Resources:
-        - Type:            2
+        - Type:            CBV
           Space:           0
           LowerBound:      0
           UpperBound:      0
-          Kind:            13
-          Flags:           0
+          Kind:            CBuffer
+          Flags:           None
       SigInputElements:
         - Name:            AAA_HSFoo
           Indices:         [ 0 ]
diff --git a/llvm/test/ObjectYAML/DXContainer/PSVv0-amplification.yaml b/llvm/test/ObjectYAML/DXContainer/PSVv0-amplification.yaml
index d15bfadda41f07..3597b684fa032a 100644
--- a/llvm/test/ObjectYAML/DXContainer/PSVv0-amplification.yaml
+++ b/llvm/test/ObjectYAML/DXContainer/PSVv0-amplification.yaml
@@ -19,11 +19,11 @@ Parts:
       MaximumWaveLaneCount: 4294967295
       ResourceStride:       16
       Resources:
-        - Type:            1
+        - Type:            Sampler
           Space:           2
           LowerBound:      3
           UpperBound:      4
-        - Type:            128
+        - Type:            Invalid
           Space:           32768
           LowerBound:      8388608
           UpperBound:      2147483648
@@ -48,11 +48,11 @@ Parts:
 # CHECK-NEXT: MaximumWaveLaneCount: 4294967295
 # CHECK-NEXT: ResourceStride: 16
 # CHECK-NEXT: Resources:
-# CHECK-NEXT: - Type:            1
+# CHECK-NEXT: - Type:            Sampler
 # CHECK-NEXT: Space:           2
 # CHECK-NEXT: LowerBound:      3
 # CHECK-NEXT: UpperBound:      4
-# CHECK-NEXT: - Type:            128
+# CHECK-NEXT: - Type:            Invalid
 # CHECK-NEXT: Space:           32768
 # CHECK-NEXT: LowerBound:      8388608
 # CHECK-NEXT: UpperBound:      2147483648
diff --git a/llvm/test/ObjectYAML/DXContainer/PSVv0-compute.yaml b/llvm/test/ObjectYAML/DXContainer/PSVv0-compute.yaml
index 7e9f2fbd8b54de..4f8e60b780c560 100644
--- a/llvm/test/ObjectYAML/DXContainer/PSVv0-compute.yaml
+++ b/llvm/test/ObjectYAML/DXContainer/PSVv0-compute.yaml
@@ -18,11 +18,11 @@ Parts:
       MaximumWaveLaneCount: 4294967295
       ResourceStride:       16
       Resources:
-        - Type:            1
+        - Type:            Sampler
           Space:           2
           LowerBound:      3
           UpperBound:      4
-        - Type:            128
+        - Type:            Invalid
           Space:           32768
           LowerBound:      8388608
           UpperBound:      2147483648
@@ -46,11 +46,11 @@ Parts:
 # CHECK-NEXT: MaximumWaveLaneCount: 4294967295
 # CHECK-NEXT: ResourceStride: 16
 # CHECK-NEXT: Resources:
-# CHECK-NEXT: - Type:            1
+# CHECK-NEXT: - Type:            Sampler
 # CHECK-NEXT: Space:           2
 # CHECK-NEXT: LowerBound:      3
 # CHECK-NEXT: UpperBound:      4
-# CHECK-NEXT: - Type:            128
+# CHECK-NEXT: - Type:            Invalid
 # CHECK-NEXT: Space:           32768
 # CHECK-NEXT: LowerBound:      8388608
 # CHECK-NEXT: UpperBound:      2147483648
diff --git a/llvm/test/ObjectYAML/DXContainer/PSVv0-domain.yaml b/llvm/test/ObjectYAML/DXContainer/PSVv0-domain.yaml
index db2aee954b3466..fb8d148c286343 100644
--- a/llvm/test/ObjectYAML/DXContainer/PSVv0-domain.yaml
+++ b/llvm/test/ObjectYAML/DXContainer/PSVv0-domain.yaml
@@ -21,11 +21,11 @@ Parts:
       MaximumWaveLaneCount: 4294967295
       ResourceStride:       16
       Resources:
-        - Type:            1
+        - Type:            Sampler
           Space:           2
           LowerBound:      3
           UpperBound:      4
-        - Type:            128
+        - Type:            Invalid
           Space:           32768
           LowerBound:      8388608
           UpperBound:      2147483648
@@ -52,11 +52,11 @@ Parts:
 # CHECK-NEXT: MaximumWaveLaneCount: 4294967295
 # CHECK-NEXT: ResourceStride: 16
 # CHECK-NEXT: Resources:
-# CHECK-NEXT: - Type:            1
+# CHECK-NEXT: - Type:            Sampler
 # CHECK-NEXT: Space:           2
 # CHECK-NEXT: LowerBound:      3
 # CHECK-NEXT: UpperBound:      4
-# CHECK-NEXT: - Type:            128
+# CHECK-NEXT: - Type:            Invalid
 # CHECK-NEXT: Space:           32768
 # CHECK-NEXT: LowerBound:      8388608
 # CHECK-NEXT: UpperBound:      2147483648
diff --git a/llvm/test/ObjectYAML/DXContainer/PSVv0-geometry.yaml b/llvm/test/ObjectYAML/DXContainer/PSVv0-geometry.yaml
index 5509ac669e2d6b..cd59c6a10d1a3e 100644
--- a/llvm/test/ObjectYAML/DXContainer/PSVv0-geometry.yaml
+++ b/llvm/test/ObjectYAML/DXContainer/PSVv0-geometry.yaml
@@ -22,11 +22,11 @@ Parts:
       MaximumWaveLaneCount: 4294967295
       ResourceStride:       16
       Resources:
-        - Type:            1
+        - Type:            Sampler
           Space:           2
           LowerBound:      3
           UpperBound:      4
-        - Type:            128
+        - Type:            Invalid
           Space:           32768
           LowerBound:      8388608
           UpperBound:      2147483648
@@ -54,11 +54,11 @@ Parts:
 # CHECK-NEXT: MaximumWaveLaneCount: 4294967295
 # CHECK-NEXT: ResourceStride: 16
 # CHECK-NEXT: Resources:
-# CHECK-NEXT: - Type:            1
+# CHECK-NEXT: - Type:            Sampler
 # CHECK-NEXT: Space:           2
 # CHECK-NEXT: LowerBound:      3
 # CHECK-NEXT: UpperBound:      4
-# CHECK-NEXT: - Type:            128
+# CHECK-NEXT: - Type:            Invalid
 # CHECK-NEXT: Space:           32768
 # CHECK-NEXT: LowerBound:      8388608
 # CHECK-NEXT: UpperBound:      2147483648
diff --git a/llvm/test/ObjectYAML/DXContainer/PSVv0-hull.yaml b/llvm/test/ObjectYAML/DXContainer/PSVv0-hull.yaml
index cd60f2b192b2e2..a672f9260516a4 100644
--- a/llvm/test/ObjectYAML/DXContainer/PSVv0-hull.yaml
+++ b/llvm/test/ObjectYAML/DXContainer/PSVv0-hull.yaml
@@ -22,11 +22,11 @@ Parts:
       MaximumWaveLaneCount: 4294967295
       ResourceStride:       16
       Resources:
-        - Type:            1
+        - Type:            Sampler
           Space:           2
           LowerBound:      3
           UpperBound:      4
-        - Type:            128
+        - Type:            Invalid
           Space:           32768
           LowerBound:      8388608
           UpperBound:      2147483648
@@ -54,11 +54,11 @@ Parts:
 # CHECK-NEXT: MaximumWaveLaneCount: 4294967295
 # CHECK-NEXT: ResourceStride: 16
 # CHECK-NEXT: Resources:
-# CHECK-NEXT: - Type:            1
+# CHECK-NEXT: - Type:            Sampler
 # CHECK-NEXT: Space:           2
 # CHECK-NEXT: LowerBound:      3
 # CHECK-NEXT: UpperBound:      4
-# CHECK-NEXT: - Type:            128
+# CHECK-NEXT: - Type:            Invalid
 # CHECK-NEXT: Space:           32768
 # CHECK-NEXT: LowerBound:      8388608
 # CHECK-NEXT: UpperBound:      2147483648
diff --git a/llvm/test/ObjectYAML/DXContainer/PSVv0-mesh.yaml b/llvm/test/ObjectYAML/DXContainer/PSVv0-mesh.yaml
index 07fb656c5b72a7..07fee2ff65e5bf 100644
--- a/llvm/test/ObjectYAML/DXContainer/PSVv0-mesh.yaml
+++ b/llvm/test/ObjectYAML/DXContainer/PSVv0-mesh.yaml
@@ -23,11 +23,11 @@ Parts:
       MaximumWaveLaneCount: 4294967295
       ResourceStride:       16
       Resources:
-        - Type:            1
+        - Type:            Sampler
           Space:           2
           LowerBound:      3
           UpperBound:      4
-        - Type:            128
+        - Type:            Invalid
           Space:           32768
           LowerBound:      8388608
           UpperBound:      2147483648
@@ -56,11 +56,11 @@ Parts:
 # CHECK-NEXT: MaximumWaveLaneCount: 4294967295
 # CHECK-NEXT: ResourceStride: 16
 # CHECK-NEXT: Resources:
-# CHECK-NEXT: - Type:            1
+# CHECK-NEXT: - Type:            Sampler
 # CHECK-NEXT: Space:           2
 # CHECK-NEXT: LowerBound:      3
 # CHECK-NEXT: UpperBound:      4
-# CHECK-NEXT: - Type:            128
+# CHECK-NEXT: - Type:            Invalid
 # CHECK-NEXT: Space:           32768
 # CHECK-NEXT: LowerBound:      8388608
 # CHECK-NEXT: UpperBound:      2147483648
diff --git a/llvm/test/ObjectYAML/DXContainer/PSVv0-pixel.yaml b/llvm/test/ObjectYAML/DXContainer/PSVv0-pixel.yaml
index c7f956e5740cca..6bf18f340c3399 100644
--- a/llvm/test/ObjectYAML/DXContainer/PSVv0-pixel.yaml
+++ b/llvm/test/ObjectYAML/DXContainer/PSVv0-pixel.yaml
@@ -20,11 +20,11 @@ Parts:
       MaximumWaveLaneCount: 4294967295
       ResourceStride:       16
       Resources:
-        - Type:            1
+        - Type:            Sampler
           Space:           2
           LowerBound:      3
           UpperBound:      4
-        - Type:            128
+        - Type:            Invalid
           Space:           32768
           LowerBound:      8388608
           UpperBound:      2147483648
@@ -50,11 +50,11 @@ Parts:
 # CHECK-NEXT: MaximumWaveLaneCount: 4294967295
 # CHECK-NEXT: ResourceStride: 16
 # CHECK-NEXT: Resources:
-# CHECK-NEXT: - Type:            1
+# CHECK-NEXT: - Type:            Sampler
 # CHECK-NEXT: Space:           2
 # CHECK-NEXT: LowerBound:      3
 # CHECK-NEXT: UpperBound:      4
-# CHECK-NEXT: - Type:            128
+# CHECK-NEXT: - Type:            Invalid
 # CHECK-NEXT: Space:           32768
 # CHECK-NEXT: LowerBound:      8388608
 # CHECK-NEXT: UpperBound:      2147483648
diff --git a/llvm/test/ObjectYAML/DXContainer/PSVv0-vertex.yaml b/llvm/test/ObjectYAML/DXContainer/PSVv0-vertex.yaml
index 6df9169b73e2f5..e0690fba0e8c4c 100644
--- a/llvm/test/ObjectYAML/DXContainer/PSVv0-vertex.yaml
+++ b/llvm/test/ObjectYAML/DXContainer/PSVv0-vertex.yaml
@@ -19,11 +19,11 @@ Parts:
       MaximumWaveLaneCount: 4294967295
       ResourceStride:       16
       Resources:
-        - Type:            1
+        - Type:            Sampler
           Space:           2
           LowerBound:      3
           UpperBound:      4
-        - Type:            128
+        - Type:            Invalid
           Space:           32768
           LowerBound:      8388608
           UpperBound:      2147483648
@@ -48,11 +48,11 @@ Parts:
 # CHECK-NEXT: MaximumWaveLaneCount: 4294967295
 # CHECK-NEXT: ResourceStride: 16
 # CHECK-NEXT: Resources:
-# CHECK-NEXT: - Type:            1
+# CHECK-NEXT: - Type:            Sampler
 # CHECK-NEXT: Space:           2
 # CHECK-NEXT: LowerBound:      3
 # CHECK-NEXT: UpperBound:      4
-# CHECK-NEXT: - Type:            128
+# CHECK-NEXT: - Type:            Invalid
 # CHECK-NEXT: Space:           32768
 # CHECK-NEXT: LowerBound:      8388608
 # CHECK-NEXT: UpperBound:      2147483648
diff --git a/llvm/test/ObjectYAML/DXContainer/PSVv1-amplification.yaml b/llvm/test/ObjectYAML/DXContainer/PSVv1-amplification.yaml
index 982235549cddc6..beb85ee9828207 100644
--- a/llvm/test/ObjectYAML/DXContainer/PSVv1-amplification.yaml
+++ b/llvm/test/ObjectYAML/DXContainer/PSVv1-amplification.yaml
@@ -22,11 +22,11 @@ Parts:
       SigOutputVectors: [ 8, 16, 32, 64 ]
       ResourceStride:       16
       Resources:
-        - Type:            1
+        - Type:            Sampler
           Space:           2
           LowerBound:      3
           UpperBound:      4
-        - Type:            128
+        - Type:            Invalid
           Space:           32768
           LowerBound:      8388608
           UpperBound:      2147483648
@@ -62,11 +62,11 @@ Parts:
 # CHECK-NEXT: SigOutputVectors: [ 8, 16, 32, 64 ]
 # CHECK-NEXT: ResourceStride: 16
 # CHECK-NEXT: Resources:
-# CHECK-NEXT: - Type:            1
+# CHECK-NEXT: - Type:            Sampler
 # CHECK-NEXT: Space:           2
 # CHECK-NEXT: LowerBound:      3
 # CHECK-NEXT: UpperBound:      4
-# CHECK-NEXT: - Type:            128
+# CHECK-NEXT: - Type:            Invalid
 # CHECK-NEXT: Space:           32768
 # CHECK-NEXT: LowerBound:      8388608
 # CHECK-NEXT: UpperBound:      2147483648
diff --git a/llvm/test/ObjectYAML/DXContainer/PSVv1-compute.yaml b/llvm/test/ObjectYAML/DXContainer/PSVv1-compute.yaml
index 629d45c65a2081..6c90fbb206c6af 100644
--- a/llvm/test/ObjectYAML/DXContainer/PSVv1-compute.yaml
+++ b/llvm/test/ObjectYAML/DXContainer/PSVv1-compute.yaml
@@ -21,11 +21,11 @@ Parts:
       SigOutputVectors: [ 8, 16, 32, 64 ]
       ResourceStride:       16
       Resources:
-        - Type:            1
+        - Type:            Sampler
           Space:           2
           LowerBound:      3
           UpperBound:      4
-        - Type:            128
+        - Type:            Invalid
           Space:           32768
           LowerBound:      8388608
           UpperBound:      2147483648
@@ -60,11 +60,11 @@ Parts:
 # CHECK-NEXT: SigOutputVectors: [ 8, 16, 32, 64 ]
 # CHECK-NEXT: ResourceStride: 16
 # CHECK-NEXT: Resources:
-# CHECK-NEXT: - Type:            1
+# CHECK-NEXT: - Type:            Sampler
 # CHECK-NEXT: Space:           2
 # CHECK-NEXT: LowerBound:      3
 # CHECK-NEXT: UpperBound:      4
-# CHECK-NEXT: - Type:            128
+# CHECK-NEXT: - Type:            Invalid
 # CHECK-NEXT: Space:           32768
 # CHECK-NEXT: LowerBound:      8388608
 # CHECK-NEXT: UpperBound:      2147483648
diff --git a/llvm/test/ObjectYAML/DXContainer/PSVv1-domain.yaml b/llvm/test/ObjectYAML/DXContainer/PSVv1-domain.yaml
index 941ec16544a2df..28a4884d1228f3 100644
--- a/llvm/test/ObjectYAML/DXContainer/PSVv1-domain.yaml
+++ b/llvm/test/ObjectYAML/DXContainer/PSVv1-domain.yaml
@@ -25,11 +25,11 @@ Parts:
       SigOutputVectors: [ 0, 16, 32, 64 ]
       ResourceStride:       16
       Resources:
-        - Type:            1
+        - Type:            Sampler
           Space:           2
           LowerBound:      3
           UpperBound:      4
-        - Type:            128
+        - T...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/106227


More information about the llvm-commits mailing list