|
| 1 | +; REQUIRES: dxil-1-10 |
| 2 | +; RUN: %dxv %s | FileCheck %s |
| 3 | + |
| 4 | +; CHECK: Validation succeeded. |
| 5 | + |
| 6 | +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" |
| 7 | +target triple = "dxil-ms-dx" |
| 8 | + |
| 9 | +%dx.types.Handle = type { i8* } |
| 10 | +%struct.Payload = type { <4 x float> } |
| 11 | +%struct.BuiltInTriangleIntersectionAttributes = type { <2 x float> } |
| 12 | +%dx.types.ResourceProperties = type { i32, i32 } |
| 13 | +%dx.types.HitObject = type { i8* } |
| 14 | + |
| 15 | +; Function Attrs: nounwind |
| 16 | +define void @"\01?test_closesthit@@YAXUPayload@@UBuiltInTriangleIntersectionAttributes@@@Z"(%struct.Payload* noalias nocapture %payload, %struct.BuiltInTriangleIntersectionAttributes* nocapture readnone %attr) #0 { |
| 17 | + %1 = call <9 x float> @dx.op.triangleObjectPosition.f32(i32 -2147483641) ; TriangleObjectPosition() |
| 18 | + ret void |
| 19 | +} |
| 20 | + |
| 21 | +; Function Attrs: nounwind |
| 22 | +define void @"\01?test_raygeneration@@YAXXZ"() #0 { |
| 23 | + %1 = call %dx.types.HitObject @dx.op.hitObject_MakeNop(i32 266) ; HitObject_MakeNop() |
| 24 | + %2 = call <9 x float> @dx.op.hitObject_TriangleObjectPosition.f32(i32 -2147483638, %dx.types.HitObject %1) ; HitObject_TriangleObjectPosition(hitObject) |
| 25 | + %3 = call i32 @dx.op.allocateRayQuery(i32 178, i32 0) ; AllocateRayQuery(constRayFlags) |
| 26 | + %4 = call <9 x float> @dx.op.rayQuery_CandidateTriangleObjectPosition.f32(i32 -2147483640, i32 %3) ; RayQuery_CandidateTriangleObjectPosition(rayQueryHandle) |
| 27 | + %5 = call <9 x float> @dx.op.rayQuery_CommittedTriangleObjectPosition.f32(i32 -2147483639, i32 %3) ; RayQuery_CommittedTriangleObjectPosition(rayQueryHandle) |
| 28 | + ret void |
| 29 | +} |
| 30 | + |
| 31 | +; Function Attrs: nounwind readnone |
| 32 | +declare <9 x float> @dx.op.triangleObjectPosition.f32(i32) #1 |
| 33 | + |
| 34 | +; Function Attrs: nounwind readnone |
| 35 | +declare <9 x float> @dx.op.hitObject_TriangleObjectPosition.f32(i32, %dx.types.HitObject) #1 |
| 36 | + |
| 37 | +; Function Attrs: nounwind readnone |
| 38 | +declare %dx.types.HitObject @dx.op.hitObject_MakeNop(i32) #1 |
| 39 | + |
| 40 | +; Function Attrs: nounwind |
| 41 | +declare i32 @dx.op.allocateRayQuery(i32, i32) #0 |
| 42 | + |
| 43 | +; Function Attrs: nounwind readonly |
| 44 | +declare <9 x float> @dx.op.rayQuery_CandidateTriangleObjectPosition.f32(i32, i32) #2 |
| 45 | + |
| 46 | +; Function Attrs: nounwind readonly |
| 47 | +declare <9 x float> @dx.op.rayQuery_CommittedTriangleObjectPosition.f32(i32, i32) #2 |
| 48 | + |
| 49 | +attributes #0 = { nounwind } |
| 50 | +attributes #1 = { nounwind readnone } |
| 51 | +attributes #2 = { nounwind readonly } |
| 52 | + |
| 53 | +!dx.version = !{!0} |
| 54 | +!dx.valver = !{!0} |
| 55 | +!dx.shaderModel = !{!1} |
| 56 | +!dx.typeAnnotations = !{!2} |
| 57 | +!dx.dxrPayloadAnnotations = !{!9} |
| 58 | +!dx.entryPoints = !{!12, !14, !17} |
| 59 | + |
| 60 | +!0 = !{i32 1, i32 10} |
| 61 | +!1 = !{!"lib", i32 6, i32 10} |
| 62 | +!2 = !{i32 1, void (%struct.Payload*, %struct.BuiltInTriangleIntersectionAttributes*)* @"\01?test_closesthit@@YAXUPayload@@UBuiltInTriangleIntersectionAttributes@@@Z", !3, void ()* @"\01?test_raygeneration@@YAXXZ", !8} |
| 63 | +!3 = !{!4, !6, !7} |
| 64 | +!4 = !{i32 1, !5, !5} |
| 65 | +!5 = !{} |
| 66 | +!6 = !{i32 2, !5, !5} |
| 67 | +!7 = !{i32 0, !5, !5} |
| 68 | +!8 = !{!4} |
| 69 | +!9 = !{i32 0, %struct.Payload undef, !10} |
| 70 | +!10 = !{!11} |
| 71 | +!11 = !{i32 0, i32 33} |
| 72 | +!12 = !{null, !"", null, null, !13} |
| 73 | +!13 = !{i32 0, i64 33554432} |
| 74 | +!14 = !{void (%struct.Payload*, %struct.BuiltInTriangleIntersectionAttributes*)* @"\01?test_closesthit@@YAXUPayload@@UBuiltInTriangleIntersectionAttributes@@@Z", !"\01?test_closesthit@@YAXUPayload@@UBuiltInTriangleIntersectionAttributes@@@Z", null, null, !15} |
| 75 | +!15 = !{i32 8, i32 10, i32 6, i32 16, i32 7, i32 8, i32 5, !16} |
| 76 | +!16 = !{i32 0} |
| 77 | +!17 = !{void ()* @"\01?test_raygeneration@@YAXXZ", !"\01?test_raygeneration@@YAXXZ", null, null, !18} |
| 78 | +!18 = !{i32 8, i32 7, i32 5, !16} |
0 commit comments