================
@@ -1241,6 +1241,20 @@ bool SemaHLSL::handleRootSignatureElements(
         << /*version minor*/ VersionEnum;
   };
 
+  auto toDescriptorRangeType = [](llvm::dxil::ResourceClass Type) {
+    switch (Type) {
+    case llvm::dxil::ResourceClass::SRV:
+      return llvm::dxbc::DescriptorRangeType::SRV;
+    case llvm::dxil::ResourceClass::UAV:
+      return llvm::dxbc::DescriptorRangeType::UAV;
+    case llvm::dxil::ResourceClass::CBuffer:
+      return llvm::dxbc::DescriptorRangeType::CBV;
+    case llvm::dxil::ResourceClass::Sampler:
+      return llvm::dxbc::DescriptorRangeType::Sampler;
+    }
+    llvm_unreachable("Unhandled Resource Class");
+  };
----------------
joaosaffran wrote:

This file is already quite large, didn't find an obvious place to put static 
functions, so created a lambda, I think it is okay, since that is only used 
here.

https://github.com/llvm/llvm-project/pull/154629
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to