aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/glsl_tests/bitfield_extract.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/radeonsi/glsl_tests/bitfield_extract.glsl')
-rw-r--r--src/gallium/drivers/radeonsi/glsl_tests/bitfield_extract.glsl34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/glsl_tests/bitfield_extract.glsl b/src/gallium/drivers/radeonsi/glsl_tests/bitfield_extract.glsl
new file mode 100644
index 00000000000..08c61af1f25
--- /dev/null
+++ b/src/gallium/drivers/radeonsi/glsl_tests/bitfield_extract.glsl
@@ -0,0 +1,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));
+}