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 <[email protected]> --- .../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 _______________________________________________ Piglit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/piglit
