aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/glsl_tests/minmax.f32.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/radeonsi/glsl_tests/minmax.f32.glsl')
-rw-r--r--src/gallium/drivers/radeonsi/glsl_tests/minmax.f32.glsl30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/glsl_tests/minmax.f32.glsl b/src/gallium/drivers/radeonsi/glsl_tests/minmax.f32.glsl
new file mode 100644
index 00000000000..12b7a33c134
--- /dev/null
+++ b/src/gallium/drivers/radeonsi/glsl_tests/minmax.f32.glsl
@@ -0,0 +1,30 @@
+; RUN: ./amdgcn_glslc %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s
+
+; FUNC-LABEL: {{^}}@min_f32:
+; GCN: main
+; GCN: v_interp_mov
+; GCN: v_interp_mov
+; GCN-NEXT: v_min_f32
+; GCN-NEXT: epilog
+
+#shader fs min_f32
+#version 400
+flat in vec2 v;
+void main() {
+ gl_FragColor.x = min(v.x, v.y);
+}
+
+
+; FUNC-LABEL: {{^}}@max_f32:
+; GCN: main
+; GCN: v_interp_mov
+; GCN: v_interp_mov
+; GCN-NEXT: v_max_f32
+; GCN-NEXT: epilog
+
+#shader fs max_f32
+#version 400
+flat in vec2 v;
+void main() {
+ gl_FragColor.x = max(v.x, v.y);
+}