[Piglit] [PATCH] glean/tstencil2: adjust test to do what it says

sroland at vmware.com sroland at vmware.com
Thu Aug 15 07:40:29 PDT 2013


From: Roland Scheidegger <sroland at vmware.com>

Comment is indicating it will decr stencil to 6 by stencil fail
But test was configured to incr stencil by sfail, in reality it worked
because it actually passed stencil and hence would use the zpass decr.
Change it to match comment, and change the other values a bit as well
(to make sure errors are caught when some implementation applies both
sfail and zfail (or zpass) ops, an error undetected so far in llvmpipe...)
---
 tests/glean/tstencil2.cpp |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/glean/tstencil2.cpp b/tests/glean/tstencil2.cpp
index a7ff1d3..d7eb633 100644
--- a/tests/glean/tstencil2.cpp
+++ b/tests/glean/tstencil2.cpp
@@ -706,10 +706,10 @@ Stencil2Test::test_stencil(int method)
 
 	// incr front to 4 (by z pass), decr back to 6 (by stencil fail)
 	pass = set_stencil_state(method,
-				 GL_DECR, GL_INCR,  // stencil fail
+				 GL_DECR, GL_DECR,  // stencil fail
 				 GL_KEEP, GL_KEEP,  // z fail
-				 GL_INCR, GL_DECR,  // z pass
-				 GL_EQUAL, GL_NOTEQUAL,  // stencil func
+				 GL_INCR, GL_REPLACE,  // z pass
+				 GL_EQUAL, GL_EQUAL,  // stencil func
 				 3, ~0);  // ref, mask
 	if (pass)
 		pass = render_test(4, 6);
-- 
1.7.9.5


More information about the Piglit mailing list