[llvm-branch-commits] [clang] [llvm] [DirectX] Add Range Overlap validation to `DXILPostOptimizationValidation.cpp` (PR #148919)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jul 21 17:01:03 PDT 2025
================
@@ -0,0 +1,15 @@
+; RUN: not opt -S -passes='dxil-post-optimization-validation' -mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1 | FileCheck %s
+; CHECK: error: register CBuffer (space=0, register=0) is overlapping with register CBuffer (space=0, register=2), verify your root signature definition
+
+define void @CSMain() "hlsl.shader"="compute" {
+entry:
+ ret void
+}
+
+; RootConstants(num32BitConstants=4, b2), DescriptorTable(CBV(b10, numDescriptors=3))
----------------
joaosaffran wrote:
Thanks, it was supposed to be: `RootConstants(num32BitConstants=4, b2), DescriptorTable(CBV(b0, numDescriptors=3))`. In that case, `b2` will overlap.
https://github.com/llvm/llvm-project/pull/148919
More information about the llvm-branch-commits
mailing list