forked from GPUOpen-Drivers/llpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lgcdis.lgc
88 lines (72 loc) · 3.98 KB
/
lgcdis.lgc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
; RUN: lgc -mcpu=gfx1030 -o %t %s
; RUN: lgcdis %t | FileCheck %s
; A basic test of lgcdis, the ELF disassembler, on the ELF generated by compiling
; this pipeline.
; CHECK-LABEL: _amdgpu_gs_main:
; CHECK: exp pos0
; CHECK-LABEL: _amdgpu_ps_main:
; CHECK: v_interp_p1
; CHECK-LABEL: amdpal.pipelines:
; CHECK: .registers:
; CHECK: 0x2c0a (SPI_SHADER_PGM_RSRC1_PS):
target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7"
target triple = "amdgcn--amdpal"
%types.ResRet.f32.1 = type { float, float, float, float, i32 }
define dllexport void @lgc.shader.VS.main() !lgc.shaderstage !24 {
entry:
%TEXCOORD = call <2 x float> (...) @lgc.create.read.generic.input.v2f32(i32 1, i32 0, i32 0, i32 1, i32 16, i32 undef)
%POSITION = call <3 x float> (...) @lgc.create.read.generic.input.v3f32(i32 0, i32 0, i32 0, i32 1, i32 16, i32 undef)
%posext = shufflevector <3 x float> %POSITION, <3 x float> <float 1.0, float 1.0, float 1.0>, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
call void (...) @lgc.create.write.builtin.output(<4 x float> %posext, i32 0, i32 0, i32 undef, i32 undef)
call void (...) @lgc.create.write.generic.output(<2 x float> %TEXCOORD, i32 1, i32 0, i32 0, i32 1, i32 0, i32 undef)
ret void
}
; Function Attrs: nounwind readonly willreturn
declare <2 x float> @lgc.create.read.generic.input.v2f32(...) #0
; Function Attrs: nounwind readonly willreturn
declare <3 x float> @lgc.create.read.generic.input.v3f32(...) #0
; Function Attrs: nounwind
declare void @lgc.create.write.builtin.output(...) #1
; Function Attrs: nounwind
declare void @lgc.create.write.generic.output(...) #1
define dllexport void @lgc.shader.FS.main() !lgc.shaderstage !25 {
entry:
%TEXCOORD = call <2 x float> (...) @lgc.create.read.generic.input.v2f32(i32 1, i32 0, i32 0, i32 1, i32 16, i32 undef)
%imageptr = call <8 x i32> addrspace(4)* (...) @lgc.create.get.desc.ptr.p4v8i32(i32 1, i32 0, i32 1)
%image = load <8 x i32>, <8 x i32> addrspace(4)* %imageptr, align 32
%samplerptr = call <4 x i32> addrspace(4)* (...) @lgc.create.get.desc.ptr.p4v4i32(i32 2, i32 0, i32 2)
%sampler = load <4 x i32>, <4 x i32> addrspace(4)* %samplerptr, align 16
%sample = call <4 x float> (...) @lgc.create.image.sample.v4f32(i32 1, i32 0, <8 x i32> %image, <4 x i32> %sampler, i32 1, <2 x float> %TEXCOORD)
call void (...) @lgc.create.write.generic.output(<4 x float> %sample, i32 0, i32 0, i32 0, i32 1, i32 0, i32 undef)
ret void
}
; Function Attrs: nounwind readnone
declare <8 x i32> addrspace(4)* @lgc.create.get.desc.ptr.p4v8i32(...) #2
; Function Attrs: nounwind readnone
declare <4 x i32> addrspace(4)* @lgc.create.get.desc.ptr.p4v4i32(...) #2
; Function Attrs: nounwind readonly willreturn
declare <4 x float> @lgc.create.image.sample.v4f32(...) #0
attributes #0 = { nounwind readonly willreturn }
attributes #1 = { nounwind }
attributes #2 = { nounwind readnone }
!lgc.options = !{!2}
!lgc.options.VS = !{!3}
!lgc.options.FS = !{!4}
!lgc.user.data.nodes = !{!8, !9, !14 }
!lgc.vertex.inputs = !{!19, !20}
!lgc.color.export.formats = !{!21}
!lgc.input.assembly.state = !{!22}
!lgc.rasterizer.state = !{!23}
!2 = !{i32 -794094415, i32 0, i32 1583596299, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1}
!3 = !{i32 -225903757, i32 -647980161, i32 1491774676, i32 -114025882}
!4 = !{i32 -1843601953, i32 337452067, i32 -1234379640, i32 1173800166}
!8 = !{!"DescriptorTableVaPtr", i32 10, i32 1, i32 1}
!9 = !{!"DescriptorResource", i32 0, i32 16, i32 0, i32 1, i32 8}
!14 = !{!"DescriptorSampler", i32 -1, i32 4, i32 0, i32 2, i32 4, <4 x i32> <i32 12288, i32 117436416, i32 1750073344, i32 -2147483648>}
!19 = !{i32 0, i32 0, i32 0, i32 0, i32 13, i32 7, i32 -1}
!20 = !{i32 1, i32 0, i32 24, i32 0, i32 11, i32 7, i32 -1}
!21 = !{i32 10, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0}
!22 = !{i32 2}
!23 = !{i32 0, i32 0, i32 0, i32 1}
!24 = !{i32 1}
!25 = !{i32 6}