[Piglit] [PATCH] Add a test for FDO bug #99154
Niels Ole Salscheider
niels_ole at salscheider-online.de
Mon Dec 19 22:57:01 UTC 2016
builtin_builder::binop creates variables named x and y. Because of
a bug these variables had mode ir_var_auto instead of
ir_var_temporary. In this case, the variable names can collide when
the function is inlined later on.
Linking will fail in this test if this is the case.
Signed-off-by: Niels Ole Salscheider <niels_ole at salscheider-online.de>
---
.../shaders/glsl-fs-multiple-builtins.shader_test | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 tests/shaders/glsl-fs-multiple-builtins.shader_test
diff --git a/tests/shaders/glsl-fs-multiple-builtins.shader_test b/tests/shaders/glsl-fs-multiple-builtins.shader_test
new file mode 100644
index 000000000..8dbf650f3
--- /dev/null
+++ b/tests/shaders/glsl-fs-multiple-builtins.shader_test
@@ -0,0 +1,22 @@
+[require]
+GLSL >= 1.10
+
+[fragment shader]
+/* Test for FDO bug 99154. builtin_builder::binop creates variables
+ * named x and y. Because of a bug these variables had mode ir_var_auto
+ * instead of ir_var_temporary. In this case, the variable names can
+ * collide when the function is inlined later on.
+ * Linking will fail in this test if this is the case.
+ */
+uniform float t;
+uniform vec3 v1;
+uniform vec3 v2;
+float tc = clamp(t, 1.0, 2.0);
+float d = dot(v1, v2);
+
+void main() {
+}
+
+[test]
+link success
+
--
2.11.0
More information about the Piglit
mailing list