[Piglit] [PATCH v2] sample-depth: use tri-strip and rgba visual

Ilia Mirkin imirkin at alum.mit.edu
Tue Jul 7 21:08:05 PDT 2015


This fixes it on nvc0 (and I'm guessing nv50). It appears that NVIDIA
hw tessellates in an unexpected fashion. We also only check 3 components
since we only have an RGB visual (and the alpha isn't that interesting).

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
 tests/spec/arb_texture_multisample/sample-depth.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/spec/arb_texture_multisample/sample-depth.c b/tests/spec/arb_texture_multisample/sample-depth.c
index 6334833..d6f5313 100644
--- a/tests/spec/arb_texture_multisample/sample-depth.c
+++ b/tests/spec/arb_texture_multisample/sample-depth.c
@@ -43,7 +43,7 @@ PIGLIT_GL_TEST_CONFIG_END
 
 GLuint prog, fbo;
 
-float green[] = {0,1,0,0};
+float green[] = {0,1,0};
 
 enum piglit_result
 piglit_display(void)
@@ -61,11 +61,11 @@ piglit_display(void)
 
 	glEnable(GL_DEPTH_TEST);
 
-	glBegin(GL_QUADS);
+	glBegin(GL_TRIANGLE_STRIP);
 		glVertex3f(-1.0f, -1.0f,  1.0f);
 		glVertex3f( 1.0f, -1.0f, -1.0f);
-		glVertex3f( 1.0f,  1.0f,  1.0f);
 		glVertex3f(-1.0f,  1.0f, -1.0f);
+		glVertex3f( 1.0f,  1.0f,  1.0f);
 	glEnd();
 
 	glDisable(GL_DEPTH_TEST);
@@ -81,7 +81,7 @@ piglit_display(void)
 
 	piglit_draw_rect(-1, -1, 2, 2);
 
-	pass = piglit_probe_rect_rgba(0, 0, TEX_WIDTH, TEX_HEIGHT, green) && pass;
+	pass = piglit_probe_rect_rgb(0, 0, TEX_WIDTH, TEX_HEIGHT, green) && pass;
 
 	piglit_present_results();
 
-- 
2.3.6



More information about the Piglit mailing list