• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: ./amdgcn_glslc %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s
2
3; FUNC-LABEL: {{^}}@sqrt:
4; GCN: main
5; GCN: v_interp_mov
6; GCN-NEXT: v_sqrt_f32
7; GCN-NEXT: epilog
8
9#shader fs sqrt
10#version 400
11flat in float f;
12void main() {
13    gl_FragColor.x = sqrt(f);
14}
15
16
17; FUNC-LABEL: {{^}}@inv_sqrt:
18; GCN: main
19; GCN: v_interp_mov
20; GCN-NEXT: v_rsq_f32
21; GCN-NEXT: epilog
22
23#shader fs inv_sqrt
24#version 400
25flat in float f;
26void main() {
27    gl_FragColor.x = 1 / sqrt(f);
28}
29
30
31; FUNC-LABEL: {{^}}@rsq:
32; GCN: main
33; GCN: v_interp_mov
34; GCN-NEXT: v_rsq_f32
35; GCN-NEXT: epilog
36
37#shader fs rsq
38#version 400
39flat in float f;
40void main() {
41    gl_FragColor.x = inversesqrt(f);
42}
43
44
45; FUNC-LABEL: {{^}}@inv_rsq:
46; GCN: main
47; GCN: v_interp_mov
48; GCN-NEXT: v_sqrt_f32
49; GCN-NEXT: epilog
50
51#shader fs inv_rsq
52#version 400
53flat in float f;
54void main() {
55    gl_FragColor.x = 1 / inversesqrt(f);
56}
57