24 lines · plain
1; RUN: not opt -S -passes='dxil-post-optimization-validation' -mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1 | FileCheck %s2; CHECK: error: SRV register 0 in space 0 does not have a binding in the Root Signature3 4@SB.str = private unnamed_addr constant [3 x i8] c"SB\00", align 15 6define void @CSMain() "hlsl.shader"="compute" {7entry:8; StructuredBuffer<int> In : register(t0, space0);9 %SB = tail call target("dx.RawBuffer", i32, 0, 0) @llvm.dx.resource.handlefrombinding.tdx.RawBuffer_i32_0_0t(i32 0, i32 0, i32 1, i32 0, ptr nonnull @SB.str)10 ret void11}12 13!dx.rootsignatures = !{!0}14 15!0 = !{ptr @CSMain, !1, i32 2}16!1 = !{!2, !3, !5, !7}17!2 = !{!"RootCBV", i32 0, i32 3, i32 666, i32 4}18!3 = !{!"DescriptorTable", i32 1, !4}19!4 = !{!"SRV", i32 1, i32 0, i32 0, i32 -1, i32 4}20!5 = !{!"DescriptorTable", i32 0, !6}21!6 = !{!"Sampler", i32 2, i32 0, i32 0, i32 -1, i32 0}22!7 = !{!"DescriptorTable", i32 0, !8}23!8 = !{!"UAV", i32 -1, i32 0, i32 0, i32 -1, i32 2}24