|
| 1 | +; RUN: %dxilver 1.9 | %dxv %s |
| 2 | + |
| 3 | +; Buffer Definitions: |
| 4 | +; |
| 5 | +; |
| 6 | +; Resource Bindings: |
| 7 | +; |
| 8 | +; Name Type Format Dim ID HLSL Bind Count |
| 9 | +; ------------------------------ ---------- ------- ----------- ------- -------------- ------ |
| 10 | +; BAB UAV byte r/w U0 u1 1 |
| 11 | +; |
| 12 | +target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64" |
| 13 | +target triple = "dxil-ms-dx" |
| 14 | + |
| 15 | +%dx.types.Handle = type { i8* } |
| 16 | +%dx.types.ResourceProperties = type { i32, i32 } |
| 17 | +%struct.RWByteAddressBuffer = type { i32 } |
| 18 | + |
| 19 | +@"\01?BAB@@3URWByteAddressBuffer@@A" = external constant %dx.types.Handle, align 4 |
| 20 | + |
| 21 | +; Function Attrs: nounwind |
| 22 | +define void @"\01?main@@YAXXZ"() #0 { |
| 23 | + %1 = load %dx.types.Handle, %dx.types.Handle* @"\01?BAB@@3URWByteAddressBuffer@@A", align 4 |
| 24 | + call void @dx.op.barrierByMemoryType(i32 244, i32 1, i32 8) ; BarrierByMemoryType(MemoryTypeFlags,SemanticFlags) |
| 25 | + %2 = call %dx.types.Handle @dx.op.createHandleForLib.dx.types.Handle(i32 160, %dx.types.Handle %1) ; CreateHandleForLib(Resource) |
| 26 | + %3 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %2, %dx.types.ResourceProperties { i32 4107, i32 0 }) ; AnnotateHandle(res,props) resource: RWByteAddressBuffer |
| 27 | + call void @dx.op.barrierByMemoryHandle(i32 245, %dx.types.Handle %3, i32 8) ; BarrierByMemoryHandle(object,SemanticFlags) |
| 28 | + ret void |
| 29 | +} |
| 30 | + |
| 31 | +; Function Attrs: noduplicate nounwind |
| 32 | +declare void @dx.op.barrierByMemoryType(i32, i32, i32) #1 |
| 33 | + |
| 34 | +; Function Attrs: noduplicate nounwind |
| 35 | +declare void @dx.op.barrierByMemoryHandle(i32, %dx.types.Handle, i32) #1 |
| 36 | + |
| 37 | +; Function Attrs: nounwind readnone |
| 38 | +declare %dx.types.Handle @dx.op.annotateHandle(i32, %dx.types.Handle, %dx.types.ResourceProperties) #2 |
| 39 | + |
| 40 | +; Function Attrs: nounwind readonly |
| 41 | +declare %dx.types.Handle @dx.op.createHandleForLib.dx.types.Handle(i32, %dx.types.Handle) #3 |
| 42 | + |
| 43 | +attributes #0 = { nounwind } |
| 44 | +attributes #1 = { noduplicate nounwind } |
| 45 | +attributes #2 = { nounwind readnone } |
| 46 | +attributes #3 = { nounwind readonly } |
| 47 | + |
| 48 | +!dx.version = !{!0} |
| 49 | +!dx.valver = !{!0} |
| 50 | +!dx.shaderModel = !{!1} |
| 51 | +!dx.resources = !{!2} |
| 52 | +!dx.typeAnnotations = !{!5} |
| 53 | +!dx.entryPoints = !{!9, !11} |
| 54 | + |
| 55 | +!0 = !{i32 1, i32 9} |
| 56 | +!1 = !{!"lib", i32 6, i32 9} |
| 57 | +!2 = !{null, !3, null, null} |
| 58 | +!3 = !{!4} |
| 59 | +!4 = !{i32 0, %struct.RWByteAddressBuffer* bitcast (%dx.types.Handle* @"\01?BAB@@3URWByteAddressBuffer@@A" to %struct.RWByteAddressBuffer*), !"BAB", i32 0, i32 1, i32 1, i32 11, i1 false, i1 false, i1 false, null} |
| 60 | +!5 = !{i32 1, void ()* @"\01?main@@YAXXZ", !6} |
| 61 | +!6 = !{!7} |
| 62 | +!7 = !{i32 1, !8, !8} |
| 63 | +!8 = !{} |
| 64 | +!9 = !{null, !"", null, !2, !10} |
| 65 | +!10 = !{i32 0, i64 8589934608} |
| 66 | +!11 = !{void ()* @"\01?main@@YAXXZ", !"\01?main@@YAXXZ", null, null, !12} |
| 67 | +!12 = !{i32 8, i32 7, i32 5, !13} |
| 68 | +!13 = !{i32 0} |
0 commit comments