Skip to content

Commit e6b8799

Browse files
committed
Add TraceRayInline tests, including for RayDesc from cbuffer
1 parent b5bdcc7 commit e6b8799

7 files changed

Lines changed: 742 additions & 0 deletions

File tree

tools/clang/test/HLSLFileCheck/hlsl/objects/RayQuery/tracerayinline.hlsl renamed to tools/clang/test/CodeGenDXIL/hlsl/objects/RayQuery/tracerayinline.hlsl

File renamed without changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// RUN: %dxc -T vs_6_5 -E main %s | FileCheck %s
2+
3+
// CHECK-DAG: %[[RTAS:[^ ]+]] = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 0, i32 0, i32 0, i1 false)
4+
// CHECK-DAG: %[[RQ:[^ ]+]] = call i32 @dx.op.allocateRayQuery(i32 178, i32 513)
5+
// CHECK: call void @dx.op.rayQuery_TraceRayInline(i32 179, i32 %[[RQ]], %dx.types.Handle %[[RTAS]], i32 1, i32 2,
6+
7+
RaytracingAccelerationStructure RTAS;
8+
9+
RayDesc rayDesc;
10+
11+
void main() {
12+
RayQuery<RAY_FLAG_FORCE_OPAQUE|RAY_FLAG_SKIP_PROCEDURAL_PRIMITIVES> rayQuery;
13+
rayQuery.TraceRayInline(RTAS, 1, 2, rayDesc);
14+
}
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
; RUN: %dxopt %s -hlsl-passes-resume -dxilgen -S | FileCheck %s
2+
3+
; Based on tools/clang/test/CodeGenDXIL/hlsl/objects/RayQuery/tracerayinline_cb_raydesc.hlsl
4+
5+
; Capture CB, RTAS, and RayQuery
6+
; CHECK-DAG: %[[CB:[^ ,]+]] = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %"$Globals", %dx.types.ResourceProperties { i32 13, i32 32 })
7+
; CHECK-DAG: %[[RTAS:[^ ,]+]] = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %{{[^ ,]+}}, %dx.types.ResourceProperties { i32 16, i32 0 })
8+
; CHECK-DAG: %[[RQ:[^ ,]+]] = call i32 @dx.op.allocateRayQuery(i32 178, i32 513)
9+
10+
; Load RayDesc.Origin
11+
; CHECK: %[[ORIG_CB_LD:[^ ,]+]] = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %[[CB]], i32 0)
12+
; CHECK: %[[ORIG_EX0:[^ ,]+]] = extractvalue %dx.types.CBufRet.f32 %[[ORIG_CB_LD]], 0
13+
; CHECK: %[[ORIG_VX:[^ ,]+]] = insertelement <3 x float> undef, float %[[ORIG_EX0]], i64 0
14+
; CHECK: %[[ORIG_EX1:[^ ,]+]] = extractvalue %dx.types.CBufRet.f32 %[[ORIG_CB_LD]], 1
15+
; CHECK: %[[ORIG_VXY:[^ ,]+]] = insertelement <3 x float> %[[ORIG_VX]], float %[[ORIG_EX1]], i64 1
16+
; CHECK: %[[ORIG_EX2:[^ ,]+]] = extractvalue %dx.types.CBufRet.f32 %[[ORIG_CB_LD]], 2
17+
; CHECK: %[[ORIG_VXYZ:[^ ,]+]] = insertelement <3 x float> %[[ORIG_VXY]], float %[[ORIG_EX2]], i64 2
18+
19+
; Load RayDesc.TMin
20+
; CHECK: %[[TMIN_CB_LD:[^ ,]+]] = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %[[CB]], i32 0)
21+
; CHECK: %[[TMIN:[^ ,]+]] = extractvalue %dx.types.CBufRet.f32 %[[TMIN_CB_LD]], 3
22+
23+
; Load RayDesc.Direction
24+
; CHECK: %[[DIR_CB_LD:[^ ,]+]] = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %[[CB]], i32 1)
25+
; CHECK: %[[DIR_EX0:[^ ,]+]] = extractvalue %dx.types.CBufRet.f32 %[[DIR_CB_LD]], 0
26+
; CHECK: %[[DIR_VX:[^ ,]+]] = insertelement <3 x float> undef, float %[[DIR_EX0]], i64 0
27+
; CHECK: %[[DIR_EX1:[^ ,]+]] = extractvalue %dx.types.CBufRet.f32 %[[DIR_CB_LD]], 1
28+
; CHECK: %[[DIR_VXY:[^ ,]+]] = insertelement <3 x float> %[[DIR_VX]], float %[[DIR_EX1]], i64 1
29+
; CHECK: %[[DIR_EX2:[^ ,]+]] = extractvalue %dx.types.CBufRet.f32 %[[DIR_CB_LD]], 2
30+
; CHECK: %[[DIR_VXYZ:[^ ,]+]] = insertelement <3 x float> %[[DIR_VXY]], float %[[DIR_EX2]], i64 2
31+
32+
; Load RayDesc.TMax
33+
; CHECK: %21 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %[[CB]], i32 1)
34+
; CHECK: %22 = extractvalue %dx.types.CBufRet.f32 %21, 3
35+
36+
; Extract RayDesc vector fields
37+
; CHECK: %[[ORIGX:[^ ,]+]] = extractelement <3 x float> %[[ORIG_VXYZ]], i64 0
38+
; CHECK: %[[ORIGY:[^ ,]+]] = extractelement <3 x float> %[[ORIG_VXYZ]], i64 1
39+
; CHECK: %[[ORIGZ:[^ ,]+]] = extractelement <3 x float> %[[ORIG_VXYZ]], i64 2
40+
; CHECK: %[[DIRX:[^ ,]+]] = extractelement <3 x float> %[[DIR_VXYZ]], i64 0
41+
; CHECK: %[[DIRY:[^ ,]+]] = extractelement <3 x float> %[[DIR_VXYZ]], i64 1
42+
; CHECK: %[[DIRZ:[^ ,]+]] = extractelement <3 x float> %[[DIR_VXYZ]], i64 2
43+
44+
; Call TraceRayInline
45+
; CHECK: call void @dx.op.rayQuery_TraceRayInline(i32 179, i32 %[[RQ]], %dx.types.Handle %[[RTAS]], i32 1, i32 2, float %[[ORIGX]], float %[[ORIGY]], float %[[ORIGZ]], float %[[TMIN]], float %[[DIRX]], float %[[DIRY]], float %[[DIRZ]], float %22)
46+
47+
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"
48+
target triple = "dxil-ms-dx"
49+
50+
%struct.RaytracingAccelerationStructure = type { i32 }
51+
%"$Globals" = type { %struct.RayDesc }
52+
%struct.RayDesc = type { <3 x float>, float, <3 x float>, float }
53+
%dx.types.Handle = type { i8* }
54+
%dx.types.ResourceProperties = type { i32, i32 }
55+
%"class.RayQuery<513, 0>" = type { i32 }
56+
57+
@"\01?RTAS@@3URaytracingAccelerationStructure@@A" = external global %struct.RaytracingAccelerationStructure, align 4
58+
@"$Globals" = external constant %"$Globals"
59+
60+
; Function Attrs: nounwind
61+
define void @main() #0 {
62+
entry:
63+
%0 = call %dx.types.Handle @"dx.hl.createhandle..%dx.types.Handle (i32, %\22$Globals\22*, i32)"(i32 0, %"$Globals"* @"$Globals", i32 0)
64+
%1 = call %dx.types.Handle @"dx.hl.annotatehandle..%dx.types.Handle (i32, %dx.types.Handle, %dx.types.ResourceProperties, %\22$Globals\22)"(i32 14, %dx.types.Handle %0, %dx.types.ResourceProperties { i32 13, i32 32 }, %"$Globals" undef)
65+
%2 = call %"$Globals"* @"dx.hl.subscript.cb.rn.%\22$Globals\22* (i32, %dx.types.Handle, i32)"(i32 6, %dx.types.Handle %1, i32 0)
66+
%3 = getelementptr inbounds %"$Globals", %"$Globals"* %2, i32 0, i32 0
67+
%rayQuery1 = call i32 @"dx.hl.op..i32 (i32, i32, i32)"(i32 4, i32 513, i32 0), !dbg !34 ; line:12 col:71
68+
%4 = load %struct.RaytracingAccelerationStructure, %struct.RaytracingAccelerationStructure* @"\01?RTAS@@3URaytracingAccelerationStructure@@A", !dbg !38 ; line:13 col:3
69+
%5 = call %dx.types.Handle @"dx.hl.createhandle..%dx.types.Handle (i32, %struct.RaytracingAccelerationStructure)"(i32 0, %struct.RaytracingAccelerationStructure %4), !dbg !38 ; line:13 col:3
70+
%6 = call %dx.types.Handle @"dx.hl.annotatehandle..%dx.types.Handle (i32, %dx.types.Handle, %dx.types.ResourceProperties, %struct.RaytracingAccelerationStructure)"(i32 14, %dx.types.Handle %5, %dx.types.ResourceProperties { i32 16, i32 0 }, %struct.RaytracingAccelerationStructure zeroinitializer), !dbg !38 ; line:13 col:3
71+
%7 = getelementptr inbounds %struct.RayDesc, %struct.RayDesc* %3, i32 0, i32 0, !dbg !38 ; line:13 col:3
72+
%8 = load <3 x float>, <3 x float>* %7, !dbg !38 ; line:13 col:3
73+
%9 = getelementptr inbounds %struct.RayDesc, %struct.RayDesc* %3, i32 0, i32 1, !dbg !38 ; line:13 col:3
74+
%10 = load float, float* %9, !dbg !38 ; line:13 col:3
75+
%11 = getelementptr inbounds %struct.RayDesc, %struct.RayDesc* %3, i32 0, i32 2, !dbg !38 ; line:13 col:3
76+
%12 = load <3 x float>, <3 x float>* %11, !dbg !38 ; line:13 col:3
77+
%13 = getelementptr inbounds %struct.RayDesc, %struct.RayDesc* %3, i32 0, i32 3, !dbg !38 ; line:13 col:3
78+
%14 = load float, float* %13, !dbg !38 ; line:13 col:3
79+
call void @"dx.hl.op..void (i32, i32, %dx.types.Handle, i32, i32, <3 x float>, float, <3 x float>, float)"(i32 325, i32 %rayQuery1, %dx.types.Handle %6, i32 1, i32 2, <3 x float> %8, float %10, <3 x float> %12, float %14), !dbg !38 ; line:13 col:3
80+
ret void, !dbg !39 ; line:14 col:1
81+
}
82+
83+
; Function Attrs: nounwind readnone
84+
declare %dx.types.Handle @"dx.hl.createhandle..%dx.types.Handle (i32, %struct.RaytracingAccelerationStructure)"(i32, %struct.RaytracingAccelerationStructure) #1
85+
86+
; Function Attrs: nounwind readnone
87+
declare %dx.types.Handle @"dx.hl.annotatehandle..%dx.types.Handle (i32, %dx.types.Handle, %dx.types.ResourceProperties, %struct.RaytracingAccelerationStructure)"(i32, %dx.types.Handle, %dx.types.ResourceProperties, %struct.RaytracingAccelerationStructure) #1
88+
89+
; Function Attrs: nounwind readnone
90+
declare %"$Globals"* @"dx.hl.subscript.cb.rn.%\22$Globals\22* (i32, %dx.types.Handle, i32)"(i32, %dx.types.Handle, i32) #1
91+
92+
; Function Attrs: nounwind readnone
93+
declare %dx.types.Handle @"dx.hl.createhandle..%dx.types.Handle (i32, %\22$Globals\22*, i32)"(i32, %"$Globals"*, i32) #1
94+
95+
; Function Attrs: nounwind readnone
96+
declare %dx.types.Handle @"dx.hl.annotatehandle..%dx.types.Handle (i32, %dx.types.Handle, %dx.types.ResourceProperties, %\22$Globals\22)"(i32, %dx.types.Handle, %dx.types.ResourceProperties, %"$Globals") #1
97+
98+
; Function Attrs: nounwind
99+
declare i32 @"dx.hl.op..i32 (i32, i32, i32)"(i32, i32, i32) #0
100+
101+
; Function Attrs: nounwind
102+
declare void @"dx.hl.op..void (i32, i32, %dx.types.Handle, i32, i32, <3 x float>, float, <3 x float>, float)"(i32, i32, %dx.types.Handle, i32, i32, <3 x float>, float, <3 x float>, float) #0
103+
104+
attributes #0 = { nounwind }
105+
attributes #1 = { nounwind readnone }
106+
107+
!llvm.module.flags = !{!0}
108+
!pauseresume = !{!1}
109+
!llvm.ident = !{!2}
110+
!dx.version = !{!3}
111+
!dx.valver = !{!4}
112+
!dx.shaderModel = !{!5}
113+
!dx.typeAnnotations = !{!6, !20}
114+
!dx.entryPoints = !{!24}
115+
!dx.fnprops = !{!31}
116+
!dx.options = !{!32, !33}
117+
118+
!0 = !{i32 2, !"Debug Info Version", i32 3}
119+
!1 = !{!"hlsl-hlemit", !"hlsl-hlensure"}
120+
!2 = !{!"dxc(private) 1.8.0.14861 (main, 33bc44a3d)"}
121+
!3 = !{i32 1, i32 5}
122+
!4 = !{i32 1, i32 9}
123+
!5 = !{!"vs", i32 6, i32 5}
124+
!6 = !{i32 0, %struct.RayDesc undef, !7, %"class.RayQuery<513, 0>" undef, !12, %"$Globals" undef, !18}
125+
!7 = !{i32 32, !8, !9, !10, !11}
126+
!8 = !{i32 6, !"Origin", i32 3, i32 0, i32 7, i32 9}
127+
!9 = !{i32 6, !"TMin", i32 3, i32 12, i32 7, i32 9}
128+
!10 = !{i32 6, !"Direction", i32 3, i32 16, i32 7, i32 9}
129+
!11 = !{i32 6, !"TMax", i32 3, i32 28, i32 7, i32 9}
130+
!12 = !{i32 4, !13, !14}
131+
!13 = !{i32 6, !"h", i32 3, i32 0, i32 7, i32 5}
132+
!14 = !{i32 0, !15}
133+
!15 = !{!16, !17}
134+
!16 = !{i32 1, i64 513}
135+
!17 = !{i32 1, i64 0}
136+
!18 = !{i32 32, !19}
137+
!19 = !{i32 6, !"rayDesc", i32 3, i32 0}
138+
!20 = !{i32 1, void ()* @main, !21}
139+
!21 = !{!22}
140+
!22 = !{i32 1, !23, !23}
141+
!23 = !{}
142+
!24 = !{void ()* @main, !"main", null, !25, null}
143+
!25 = !{!26, null, !29, null}
144+
!26 = !{!27}
145+
!27 = !{i32 0, %struct.RaytracingAccelerationStructure* @"\01?RTAS@@3URaytracingAccelerationStructure@@A", !"RTAS", i32 -1, i32 -1, i32 1, i32 16, i32 0, !28}
146+
!28 = !{i32 0, i32 4}
147+
!29 = !{!30}
148+
!30 = !{i32 0, %"$Globals"* @"$Globals", !"$Globals", i32 0, i32 -1, i32 1, i32 32, null}
149+
!31 = !{void ()* @main, i32 1}
150+
!32 = !{i32 64}
151+
!33 = !{i32 -1}
152+
!34 = !DILocation(line: 12, column: 71, scope: !35)
153+
!35 = !DISubprogram(name: "main", scope: !36, file: !36, line: 11, type: !37, isLocal: false, isDefinition: true, scopeLine: 11, flags: DIFlagPrototyped, isOptimized: false, function: void ()* @main)
154+
!36 = !DIFile(filename: "tools/clang/test/CodeGenDXIL/hlsl/objects/RayQuery/tracerayinline_cb_raydesc.hlsl", directory: "")
155+
!37 = !DISubroutineType(types: !23)
156+
!38 = !DILocation(line: 13, column: 3, scope: !35)
157+
!39 = !DILocation(line: 14, column: 1, scope: !35)
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
; RUN: %dxopt %s -hlsl-passes-resume -dxilgen -S | FileCheck %s
2+
3+
; Based on tools/clang/test/CodeGenDXIL/hlsl/objects/RayQuery/tracerayinline.hlsl,
4+
; with call to DoTrace commented out.
5+
6+
; Load RayDesc fields from input
7+
; CHECK-DAG: %[[ORIGX_LI:[^ ,]+]] = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef)
8+
; CHECK-DAG: %[[ORIGY_LI:[^ ,]+]] = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef)
9+
; CHECK-DAG: %[[ORIGZ_LI:[^ ,]+]] = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 undef)
10+
; CHECK-DAG: %[[TMIN:[^ ,]+]] = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 undef)
11+
; CHECK-DAG: %[[DIRX_LI:[^ ,]+]] = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 0, i32 undef)
12+
; CHECK-DAG: %[[DIRY_LI:[^ ,]+]] = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 1, i32 undef)
13+
; CHECK-DAG: %[[DIRZ_LI:[^ ,]+]] = call float @dx.op.loadInput.f32(i32 4, i32 2, i32 0, i8 2, i32 undef)
14+
; CHECK-DAG: %[[TMAX:[^ ,]+]] = call float @dx.op.loadInput.f32(i32 4, i32 3, i32 0, i8 0, i32 undef)
15+
; CHECK-DAG: %[[ORIG_VX:[^ ,]+]] = insertelement <3 x float> undef, float %[[ORIGX_LI]], i64 0
16+
; CHECK-DAG: %[[ORIG_VXY:[^ ,]+]] = insertelement <3 x float> %[[ORIG_VX]], float %[[ORIGY_LI]], i64 1
17+
; CHECK-DAG: %[[ORIG_VXYZ:[^ ,]+]] = insertelement <3 x float> %[[ORIG_VXY]], float %[[ORIGZ_LI]], i64 2
18+
; CHECK-DAG: %[[DIR_VX:[^ ,]+]] = insertelement <3 x float> undef, float %[[DIRX_LI]], i64 0
19+
; CHECK-DAG: %[[DIR_VXY:[^ ,]+]] = insertelement <3 x float> %[[DIR_VX]], float %[[DIRY_LI]], i64 1
20+
; CHECK-DAG: %[[DIR_VXYZ:[^ ,]+]] = insertelement <3 x float> %[[DIR_VXY]], float %[[DIRZ_LI]], i64 2
21+
22+
; Capture RayQuery and RTAS
23+
; CHECK-DAG: %[[RQ:[^ ,]+]] = call i32 @dx.op.allocateRayQuery(i32 178, i32 513)
24+
; CHECK-DAG: %[[RTAS:[^ ,]+]] = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %{{[^ ,]+}}, %dx.types.ResourceProperties { i32 16, i32 0 })
25+
26+
; Extract RayDesc vector fields
27+
; CHECK-DAG: %[[ORIGX:[^ ,]+]] = extractelement <3 x float> %[[ORIG_VXYZ]], i64 0
28+
; CHECK-DAG: %[[ORIGY:[^ ,]+]] = extractelement <3 x float> %[[ORIG_VXYZ]], i64 1
29+
; CHECK-DAG: %[[ORIGZ:[^ ,]+]] = extractelement <3 x float> %[[ORIG_VXYZ]], i64 2
30+
; CHECK-DAG: %[[DIRX:[^ ,]+]] = extractelement <3 x float> %[[DIR_VXYZ]], i64 0
31+
; CHECK-DAG: %[[DIRY:[^ ,]+]] = extractelement <3 x float> %[[DIR_VXYZ]], i64 1
32+
; CHECK-DAG: %[[DIRZ:[^ ,]+]] = extractelement <3 x float> %[[DIR_VXYZ]], i64 2
33+
34+
; Call TraceRayInline
35+
; CHECK: call void @dx.op.rayQuery_TraceRayInline(i32 179, i32 %[[RQ]], %dx.types.Handle %[[RTAS]], i32 1, i32 2, float %[[ORIGX]], float %[[ORIGY]], float %[[ORIGZ]], float %[[TMIN]], float %[[DIRX]], float %[[DIRY]], float %[[DIRZ]], float %[[TMAX]])
36+
37+
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"
38+
target triple = "dxil-ms-dx"
39+
40+
%struct.RaytracingAccelerationStructure = type { i32 }
41+
%dx.types.Handle = type { i8* }
42+
%dx.types.ResourceProperties = type { i32, i32 }
43+
%struct.RayDesc = type { <3 x float>, float, <3 x float>, float }
44+
%"class.RayQuery<513, 0>" = type { i32 }
45+
46+
@"\01?RTAS@@3URaytracingAccelerationStructure@@A" = external global %struct.RaytracingAccelerationStructure, align 4
47+
48+
; Function Attrs: nounwind readnone
49+
declare %dx.types.Handle @"dx.hl.createhandle..%dx.types.Handle (i32, %struct.RaytracingAccelerationStructure)"(i32, %struct.RaytracingAccelerationStructure) #0
50+
51+
; Function Attrs: nounwind readnone
52+
declare %dx.types.Handle @"dx.hl.annotatehandle..%dx.types.Handle (i32, %dx.types.Handle, %dx.types.ResourceProperties, %struct.RaytracingAccelerationStructure)"(i32, %dx.types.Handle, %dx.types.ResourceProperties, %struct.RaytracingAccelerationStructure) #0
53+
54+
; Function Attrs: nounwind
55+
declare i32 @"dx.hl.op..i32 (i32, i32, i32)"(i32, i32, i32) #1
56+
57+
; Function Attrs: nounwind
58+
define void @main(float* noalias, <3 x float>, float, <3 x float>, float) #1 {
59+
entry:
60+
%rayQuery1 = call i32 @"dx.hl.op..i32 (i32, i32, i32)"(i32 4, i32 513, i32 0), !dbg !41 ; line:15 col:71
61+
%5 = load %struct.RaytracingAccelerationStructure, %struct.RaytracingAccelerationStructure* @"\01?RTAS@@3URaytracingAccelerationStructure@@A", !dbg !45 ; line:17 col:3
62+
%6 = call %dx.types.Handle @"dx.hl.createhandle..%dx.types.Handle (i32, %struct.RaytracingAccelerationStructure)"(i32 0, %struct.RaytracingAccelerationStructure %5), !dbg !45 ; line:17 col:3
63+
%7 = call %dx.types.Handle @"dx.hl.annotatehandle..%dx.types.Handle (i32, %dx.types.Handle, %dx.types.ResourceProperties, %struct.RaytracingAccelerationStructure)"(i32 14, %dx.types.Handle %6, %dx.types.ResourceProperties { i32 16, i32 0 }, %struct.RaytracingAccelerationStructure zeroinitializer), !dbg !45 ; line:17 col:3
64+
call void @"dx.hl.op..void (i32, i32, %dx.types.Handle, i32, i32, <3 x float>, float, <3 x float>, float)"(i32 325, i32 %rayQuery1, %dx.types.Handle %7, i32 1, i32 2, <3 x float> %1, float %2, <3 x float> %3, float %4), !dbg !45 ; line:17 col:3
65+
store float 0.000000e+00, float* %0, !dbg !46 ; line:18 col:3
66+
ret void, !dbg !46 ; line:18 col:3
67+
}
68+
69+
; Function Attrs: nounwind
70+
declare void @"dx.hl.op..void (i32, i32, %dx.types.Handle, i32, i32, <3 x float>, float, <3 x float>, float)"(i32, i32, %dx.types.Handle, i32, i32, <3 x float>, float, <3 x float>, float) #1
71+
72+
attributes #0 = { nounwind readnone }
73+
attributes #1 = { nounwind }
74+
75+
!llvm.module.flags = !{!0}
76+
!pauseresume = !{!1}
77+
!llvm.ident = !{!2}
78+
!dx.version = !{!3}
79+
!dx.valver = !{!4}
80+
!dx.shaderModel = !{!5}
81+
!dx.typeAnnotations = !{!6, !18}
82+
!dx.entryPoints = !{!33}
83+
!dx.fnprops = !{!38}
84+
!dx.options = !{!39, !40}
85+
86+
!0 = !{i32 2, !"Debug Info Version", i32 3}
87+
!1 = !{!"hlsl-hlemit", !"hlsl-hlensure"}
88+
!2 = !{!"dxc(private) 1.8.0.14861 (main, 33bc44a3d)"}
89+
!3 = !{i32 1, i32 5}
90+
!4 = !{i32 1, i32 9}
91+
!5 = !{!"vs", i32 6, i32 5}
92+
!6 = !{i32 0, %struct.RayDesc undef, !7, %"class.RayQuery<513, 0>" undef, !12}
93+
!7 = !{i32 32, !8, !9, !10, !11}
94+
!8 = !{i32 6, !"Origin", i32 3, i32 0, i32 7, i32 9}
95+
!9 = !{i32 6, !"TMin", i32 3, i32 12, i32 7, i32 9}
96+
!10 = !{i32 6, !"Direction", i32 3, i32 16, i32 7, i32 9}
97+
!11 = !{i32 6, !"TMax", i32 3, i32 28, i32 7, i32 9}
98+
!12 = !{i32 4, !13, !14}
99+
!13 = !{i32 6, !"h", i32 3, i32 0, i32 7, i32 5}
100+
!14 = !{i32 0, !15}
101+
!15 = !{!16, !17}
102+
!16 = !{i32 1, i64 513}
103+
!17 = !{i32 1, i64 0}
104+
!18 = !{i32 1, void (float*, <3 x float>, float, <3 x float>, float)* @main, !19}
105+
!19 = !{!20, !22, !25, !27, !29, !31}
106+
!20 = !{i32 0, !21, !21}
107+
!21 = !{}
108+
!22 = !{i32 1, !23, !24}
109+
!23 = !{i32 4, !"OUT", i32 7, i32 9}
110+
!24 = !{i32 0}
111+
!25 = !{i32 0, !26, !24}
112+
!26 = !{i32 4, !"RAYDESC", i32 7, i32 9}
113+
!27 = !{i32 0, !26, !28}
114+
!28 = !{i32 1}
115+
!29 = !{i32 0, !26, !30}
116+
!30 = !{i32 2}
117+
!31 = !{i32 0, !26, !32}
118+
!32 = !{i32 3}
119+
!33 = !{void (float*, <3 x float>, float, <3 x float>, float)* @main, !"main", null, !34, null}
120+
!34 = !{!35, null, null, null}
121+
!35 = !{!36}
122+
!36 = !{i32 0, %struct.RaytracingAccelerationStructure* @"\01?RTAS@@3URaytracingAccelerationStructure@@A", !"RTAS", i32 -1, i32 -1, i32 1, i32 16, i32 0, !37}
123+
!37 = !{i32 0, i32 4}
124+
!38 = !{void (float*, <3 x float>, float, <3 x float>, float)* @main, i32 1}
125+
!39 = !{i32 64}
126+
!40 = !{i32 -1}
127+
!41 = !DILocation(line: 15, column: 71, scope: !42)
128+
!42 = !DISubprogram(name: "main", scope: !43, file: !43, line: 14, type: !44, isLocal: false, isDefinition: true, scopeLine: 14, flags: DIFlagPrototyped, isOptimized: false, function: void (float*, <3 x float>, float, <3 x float>, float)* @main)
129+
!43 = !DIFile(filename: "tools/clang/test/CodeGenDXIL/hlsl/objects/RayQuery/tracerayinline.hlsl", directory: "")
130+
!44 = !DISubroutineType(types: !21)
131+
!45 = !DILocation(line: 17, column: 3, scope: !42)
132+
!46 = !DILocation(line: 18, column: 3, scope: !42)

0 commit comments

Comments
 (0)