brintos

brintos / llvm-project-archived public Read only

0
0
Text · 859 B · 775fc35 Raw
22 lines · plain
1; RUN: opt -S -passes='dxil-post-optimization-validation' %s 2; Valid scenario where shader stage is not blocked from accessing root bindings3target triple = "dxil-pc-shadermodel6.6-geometry"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"="geometry" {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}14attributes #0 = { noinline nounwind "exp-shader"="cs" "hlsl.numthreads"="1,2,1" "hlsl.shader"="geometry" }15 16!dx.rootsignatures = !{!0}17 18!0 = !{ptr @CSMain, !1, i32 2}19!1 = !{!2, !3}20!2 = !{ !"RootFlags", i32 294 } ; 294 = deny_pixel/hull/vertex/amplification_shader_root_access21!3 = !{ !"RootCBV", i32 0, i32 2, i32 0, i32 0 }22