27 lines · plain
1; RUN: llc %s --filetype=obj -o - | obj2yaml | FileCheck %s2 3; Check that resources are emitted to the object in the order that matches what4; the DXIL validator expects: CBuffers, Samplers, SRVs, and then UAVs.5 6; CHECK: Resources:7; CHECK: - Type: CBV8; TODO: - Type: Sampler9; CHECK: - Type: SRVRaw10; CHECK: - Type: UAVTyped11 12target triple = "dxil-unknown-shadermodel6.0-compute"13 14define void @main() #0 {15 %uav0 = call target("dx.TypedBuffer", i32, 1, 0, 1)16 @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_i32_1_0t(17 i32 2, i32 7, i32 1, i32 0, ptr null)18 %srv0 = call target("dx.RawBuffer", i8, 0, 0)19 @llvm.dx.resource.handlefrombinding.tdx.RawBuffer_i8_0_0t(20 i32 1, i32 8, i32 1, i32 0, ptr null)21 %cbuf = call target("dx.CBuffer", <{ float }>)22 @llvm.dx.resource.handlefrombinding(i32 3, i32 2, i32 1, i32 0, ptr null)23 ret void24}25 26attributes #0 = { "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" }27