21 lines · plain
1; RUN: not opt -S -passes='dxil-post-optimization-validation' %s 2>&1 | FileCheck %s2; CHECK: error: Shader has root bindings but root signature uses a DENY flag to disallow root binding access to the shader stage.3target triple = "dxil-pc-shadermodel6.6-pixel"4 5%__cblayout_CB = type <{ float }>6 7@CB.str = private unnamed_addr constant [3 x i8] c"CB\00", align 18 9define void @CSMain() "hlsl.shader"="compute" {10entry:11 %CB = tail call target("dx.CBuffer", target("dx.Layout", %__cblayout_CB, 4, 0)) @llvm.dx.resource.handlefrombinding(i32 0, i32 2, i32 1, i32 0, ptr nonnull @CB.str)12 ret void13}14 15!dx.rootsignatures = !{!0}16 17!0 = !{ptr @CSMain, !1, i32 2}18!1 = !{!2, !3}19!2 = !{!"RootConstants", i32 0, i32 2, i32 0, i32 4}20!3 = !{!"RootFlags", i32 294} ; 294 = deny_pixel/hull/vertex/amplification_shader_root_access21