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

; FUNC-LABEL: {{^}}@div:
; GCN: main
; GCN: v_interp_mov
; GCN: v_interp_mov
; GCN-NEXT: v_rcp_f32
; GCN-NEXT: v_mul_f32
; GCN-NEXT: epilog

#shader fs div
#version 400
flat in vec2 v;
void main() {
    gl_FragColor.x = v.x / v.y;
}


; FUNC-LABEL: {{^}}@rcp:
; GCN: main
; GCN: v_interp_mov
; GCN-NEXT: v_rcp_f32
; GCN-NEXT: epilog

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