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

; FUNC-LABEL: {{^}}@bfi_i32:
; GCN: main
; GCN: v_interp_mov
; GCN: v_interp_mov
; GCN: v_interp_mov
; GCN: v_interp_mov
; GCN-NEXT: v_bfm_b32
; GCN-NEXT: v_lshlrev_b32
; GCN-NEXT: v_bfi_b32
; GCN-NEXT: epilog

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


; FUNC-LABEL: {{^}}@bfi_u32:
; GCN: main
; GCN: v_interp_mov
; GCN: v_interp_mov
; GCN: v_interp_mov
; GCN: v_interp_mov
; GCN-NEXT: v_bfm_b32
; GCN-NEXT: v_lshlrev_b32
; GCN-NEXT: v_bfi_b32
; GCN-NEXT: epilog

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