[Piglit] [PATCH 2/2] depthstencil-render-miplevels: Fix stencil drawing for width %4 != 0.

Eric Anholt eric at anholt.net
Wed Oct 9 22:33:10 CEST 2013


It didn't affect test results, since we don't probe this data and it's
only in manual mode, but it did cause buffer overflow.
---
 tests/texturing/depthstencil-render-miplevels.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/texturing/depthstencil-render-miplevels.cpp b/tests/texturing/depthstencil-render-miplevels.cpp
index 813ca6f..f1ba658 100644
--- a/tests/texturing/depthstencil-render-miplevels.cpp
+++ b/tests/texturing/depthstencil-render-miplevels.cpp
@@ -339,6 +339,9 @@ piglit_init(int argc, char **argv)
 		print_usage_and_exit(argv[0]);
 	}
 
+	glPixelStorei(GL_PACK_ALIGNMENT, 1);
+	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+
 	/* argv[1]: texture size */
 	{
 		char *endptr = NULL;
-- 
1.8.4.rc3



More information about the Piglit mailing list