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

; FUNC-LABEL: {{^}}@bfe_i32:
; GCN: main
; GCN: v_interp_mov
; GCN: v_interp_mov
; GCN: v_interp_mov
; GCN-NEXT: v_bfe_i32
; GCN-NEXT: epilog

#shader fs bfe_i32
#version 400
flat in ivec3 v;
out ivec4 o;
void main() {
    o.x = bitfieldExtract(v.x, v.y, v.z);
}


; FUNC-LABEL: {{^}}@bfe_u32:
; GCN: main
; GCN: v_interp_mov
; GCN: v_interp_mov
; GCN: v_interp_mov
; GCN-NEXT: v_bfe_u32
; GCN-NEXT: epilog

#shader fs bfe_u32
#version 400
flat in uvec3 v;
out uvec4 o;
void main() {
    o.x = bitfieldExtract(v.x, int(v.y), int(v.z));
}