[Piglit] [PATCH] polygon-offset: limit line width to 12 pixels
Brian Paul
brianp at vmware.com
Mon Jul 14 10:33:42 PDT 2014
12 is somewhat arbitrary, but it avoids total failure if the max
line width is something large (like 255 in llvmpipe).
---
tests/general/polygon-offset.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/general/polygon-offset.c b/tests/general/polygon-offset.c
index da3a069..1d0b4dc 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);
--
1.7.10.4
More information about the Piglit
mailing list