aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/glsl_tests/sqrt.glsl
blob: c6ddc546d7d99fc2c0d3992d9a03cb68787066e8 (plain)
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
; RUN: ./amdgcn_glslc %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s

; FUNC-LABEL: {{^}}@sqrt:
; GCN: main
; GCN: v_interp_mov
; GCN-NEXT: v_sqrt_f32
; GCN-NEXT: epilog

#shader fs sqrt
#version 400
flat in float f;
void main() {
    gl_FragColor.x = sqrt(f);
}


; FUNC-LABEL: {{^}}@inv_sqrt:
; GCN: main
; GCN: v_interp_mov
; GCN-NEXT: v_rsq_f32
; GCN-NEXT: epilog

#shader fs inv_sqrt
#version 400
flat in float f;
void main() {
    gl_FragColor.x = 1 / sqrt(f);
}


; FUNC-LABEL: {{^}}@rsq:
; GCN: main
; GCN: v_interp_mov
; GCN-NEXT: v_rsq_f32
; GCN-NEXT: epilog

#shader fs rsq
#version 400
flat in float f;
void main() {
    gl_FragColor.x = inversesqrt(f);
}


; FUNC-LABEL: {{^}}@inv_rsq:
; GCN: main
; GCN: v_interp_mov
; GCN-NEXT: v_sqrt_f32
; GCN-NEXT: epilog

#shader fs inv_rsq
#version 400
flat in float f;
void main() {
    gl_FragColor.x = 1 / inversesqrt(f);
}