[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)
Finn Plummer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu May 29 12:15:26 PDT 2025
================
@@ -951,6 +952,108 @@ void SemaHLSL::emitLogicalOperatorFixIt(Expr *LHS, Expr *RHS,
<< NewFnName << FixItHint::CreateReplacement(FullRange, OS.str());
}
+namespace {
+
+// A resource range overlaps with another resource range if they have:
+// - equivalent ResourceClass (SRV, UAV, CBuffer, Sampler)
+// - equivalent resource space
+// - overlapping visbility
+class ResourceRanges {
+public:
+ // KeyT: 32-lsb denotes resource space, and 32-msb denotes resource type enum
+ using KeyT = uint64_t;
+
+ static const unsigned NumVisEnums =
----------------
inbelic wrote:
I guess since this is could be `size_t` to best describe that is an upper bound of a range.
Regarding inconsistencies, they were copied over from DXC, since they are spread out throughout the file, I will create a clean-up pr to audit the uses everywhere in `HLSLRootSignature.h`
https://github.com/llvm/llvm-project/pull/140962
More information about the llvm-branch-commits
mailing list