3 files changed, 97 insertions(+)
create mode 100644 tests/bugs/polygon-line-aa.c
diff --git a/tests/all.py b/tests/all.py
index 3830013..d59df6a 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -714,6 +714,7 @@ add_plain_test(gl11, 'fdo10370')
add_plain_test(gl11, 'fdo23489')
add_plain_test(gl11, 'fdo23670-depth_test')
add_plain_test(gl11, 'fdo23670-drawpix_stencil')
+add_concurrent_test(gl11, 'polygon-line-aa')
add_plain_test(gl11, 'r300-readcache')
add_plain_test(gl11, 'tri-tex-crash')
add_plain_test(gl11, 'vbo-buffer-unmap')
diff --git a/tests/bugs/CMakeLists.gl.txt b/tests/bugs/CMakeLists.gl.txt
index e24ec6b..8e112ae 100644
--- a/tests/bugs/CMakeLists.gl.txt
+++ b/tests/bugs/CMakeLists.gl.txt
@@ -30,5 +30,6 @@ piglit_add_executable (fdo28551 fdo28551.c)
piglit_add_executable (fdo31934 fdo31934.c)
piglit_add_executable (tri-tex-crash tri-tex-crash.c)
piglit_add_executable (vbo-buffer-unmap vbo-buffer-unmap.c)
+piglit_add_executable (polygon-line-aa polygon-line-aa.c)
# vim: ft=cmake:
diff --git a/tests/bugs/polygon-line-aa.c b/tests/bugs/polygon-line-aa.c
new file mode 100644
index 0000000..ed45963
--- /dev/null
+++ b/tests/bugs/polygon-line-aa.c
@@ -0,0 +1,95 @@
+/* Copyright © 2014 Igalia S.L.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+/**
+ * \file polygon-line-aa.c
+ * Test case for a special case of line antialiasing
+ *
https://urldefense.proofpoint.com/v1/url?u=https://bugs.freedesktop.org/show_bug.cgi?id%3D78679&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=lGQMzzTgII0I7jefp2FHq7WtZ%2BTLs8wadB%2BiIj9xpBY%3D%0A&m=roRaK%2BFkdlgSESjSCDC89XoeO%2FT29BWy6iHc6py2sIA%3D%0A&s=c3ed1b581616086c6f43f32cdd353e37060cd3a1a4d8ecdcaba30cd7be7304de
+ *
+ * This test renders a polygon using GL_LINE mode (with antialised lines)
+ * for one face of the polygon, and GL_FILL for the other face. For gen < 6
+ * intel hardware this setup requires special handling that if not done
+ * correctly produces incorrect rendering of the GL_FILL face. This caused
+ * regressions in the past.
+ *
+ * Author: Iago Toral <[email protected]>
+ */
+
+#include "piglit-util-gl-common.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+
+ config.supports_gl_compat_version = 10;
+ config.window_width = 100;
+ config.window_height = 100;