[Piglit] [PATCH] glean: remove line drawing code from fbo test

Brian Paul brianp at vmware.com
Fri Jul 28 20:18:53 UTC 2017


The glean fbo test exercises rendering to 1D, 2D, 3D and cube images
attached to FBOs.  For the 1D texture case, the rendering is done with
a line, rather than a polygon.  Since the 1D image is one pixel high,
the slightest mis-rasterization of the line will cause it to be clipped
and the test to fail.

Just fall through to the polygon drawing code to avoid that issue.
Less code too.
---
 tests/glean/tfbo.cpp | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/tests/glean/tfbo.cpp b/tests/glean/tfbo.cpp
index 3662d5d..1768956 100644
--- a/tests/glean/tfbo.cpp
+++ b/tests/glean/tfbo.cpp
@@ -605,13 +605,6 @@ FBOTest::testRender2SingleTexture(void)
                                         glDepthFunc(GL_ALWAYS);
                                         switch (textureModes[mode]) {
                                         case GL_TEXTURE_1D:
-                                                glBegin(GL_LINES);
-                                                glVertex3f(TEXSIZE / 4, 0.5, 0.3);
-						/* + 0.25 pixels because the last line pixel
-						 * isn't drawn according to the GL spec */
-                                                glVertex3f(TEXSIZE * 5 / 8 + 0.25, 0.5, 0.3);
-                                                glEnd();
-                                                break;
                                         case GL_TEXTURE_2D:
                                         case GL_TEXTURE_3D:
                                         case GL_TEXTURE_CUBE_MAP:
@@ -637,13 +630,6 @@ FBOTest::testRender2SingleTexture(void)
                                                     GL_KEEP, GL_REPLACE);
                                         switch (textureModes[mode]) {
                                         case GL_TEXTURE_1D:
-                                                glBegin(GL_LINES);
-                                                glVertex3f(TEXSIZE / 2, 0.5, 0.3);
-						/* + 0.25 pixels because the last line pixel
-						 * isn't drawn according to the GL spec */
-                                                glVertex3f(TEXSIZE * 7 / 8 + 0.25, 0.5, 0.3);
-                                                glEnd();
-                                                break;
                                         case GL_TEXTURE_2D:
                                         case GL_TEXTURE_3D:
                                         case GL_TEXTURE_CUBE_MAP:
@@ -670,13 +656,6 @@ FBOTest::testRender2SingleTexture(void)
 
                                 switch (textureModes[mode]) {
                                 case GL_TEXTURE_1D:
-                                        glBegin(GL_LINES);
-                                        glVertex3f(0, 0.5, 0.2);
-					/* + 0.25 pixels because the last line pixel
-					 * isn't drawn according to the GL spec */
-                                        glVertex3f(TEXSIZE + 0.25, 0.5, 0.2);
-                                        glEnd();
-                                        break;
                                 case GL_TEXTURE_2D:
                                 case GL_TEXTURE_3D:
                                 case GL_TEXTURE_CUBE_MAP:
-- 
1.9.1



More information about the Piglit mailing list