summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/glsl_tests/fma.glsl
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-07-31 00:50:14 +0200
committerMarek Olšák <[email protected]>2016-08-06 16:11:43 +0200
commit11b1d064a30d6208499cb2b550bedfecb6af0b2a (patch)
tree81f1e497f123f62829fba19a161dfe8e1015031a /src/gallium/drivers/radeonsi/glsl_tests/fma.glsl
parent35942ee8a8fe9b4c7c746590840fb87b02fcf00e (diff)
radeonsi: add GLSL lit tests
They can only be run manually as described in HOW_TO_RUN. It should help catch suboptimal code generation. Some of the tests already fail. v2: rename the tests to *.glsl, fix lit.cfg to find FileCheck Reviewed-by: Nicolai Hähnle <[email protected]> (v1)
Diffstat (limited to 'src/gallium/drivers/radeonsi/glsl_tests/fma.glsl')
-rw-r--r--src/gallium/drivers/radeonsi/glsl_tests/fma.glsl16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/glsl_tests/fma.glsl b/src/gallium/drivers/radeonsi/glsl_tests/fma.glsl
new file mode 100644
index 00000000000..727716fac4b
--- /dev/null
+++ b/src/gallium/drivers/radeonsi/glsl_tests/fma.glsl
@@ -0,0 +1,16 @@
+; RUN: ./amdgcn_glslc %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s
+
+; FUNC-LABEL: {{^}}@fma:
+; GCN: main
+; GCN: v_interp_mov
+; GCN: v_interp_mov
+; GCN: v_interp_mov
+; GCN-NEXT: v_mac_f32
+; GCN-NEXT: epilog
+
+#shader fs fma
+#version 400
+flat in vec3 v;
+void main() {
+ gl_FragColor.x = fma(v.x, v.y, v.z);
+}