summaryrefslogtreecommitdiff
path: root/tests/general
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2014-07-14 11:32:28 -0600
committerBrian Paul <brianp@vmware.com>2014-07-16 07:25:56 -0600
commitc561be4719196cf6e351bb929b07039234d36f7b (patch)
treeca1a4bd24df099af821f0795b73db3ca7e7fa805 /tests/general
parent9d64a8fc0cf4f4adb54c38ab7088914c9bed01b1 (diff)
polygon-offset: limit line width to 12 pixels
12 is somewhat arbitrary, but it avoids total failure if the max line width is something large (like 255 in llvmpipe).
Diffstat (limited to 'tests/general')
-rw-r--r--tests/general/polygon-offset.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/general/polygon-offset.c b/tests/general/polygon-offset.c
index 95d4b0dde..288517122 100644
--- a/tests/general/polygon-offset.c
+++ b/tests/general/polygon-offset.c
@@ -92,6 +92,9 @@ piglit_display(void)
glGetIntegerv(GL_ALIASED_POINT_SIZE_RANGE, point_size_range);
if (line_width > point_size_range[1])
line_width = point_size_range[1];
+
+ line_width = MIN2(line_width, 12);
+
glLineWidth(line_width);
glPointSize(line_width);
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);