[Piglit] [PATCH 4/6] ext_packed_depth_stencil: Require ARB_depth_texture to test texture formats

Ian Romanick idr at freedesktop.org
Mon Oct 10 22:51:36 UTC 2016


From: Ian Romanick <ian.d.romanick at intel.com>

Several drivers in Mesa support EXT_packed_depth_stencil but not
ARB_depth_texture (i830, radeon, r200, and nouveau vieux).  These
drivers all fail this test because it tries to (incorrectly) create a
GL_DEPTH_STENCIL_EXT/GL_UNSIGNED_INT_24_8_EXT texture.

Fixes ext_packed_depth_stencil-errors on i865G, NV20, and R200.  R100
and NV10 have not been tested, but both should also be fixed by this
change.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 tests/spec/ext_packed_depth_stencil/errors.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/tests/spec/ext_packed_depth_stencil/errors.c b/tests/spec/ext_packed_depth_stencil/errors.c
index 89de8c4..74d40cc 100644
--- a/tests/spec/ext_packed_depth_stencil/errors.c
+++ b/tests/spec/ext_packed_depth_stencil/errors.c
@@ -95,7 +95,18 @@ piglit_init(int argc, char **argv)
 
 	pass = test_drawpixels() && pass;
 	pass = test_readpixels() && pass;
-	pass = test_texture() && pass;
+
+	/* The EXT_packed_depth_stencil spec says:
+	 *
+	 *    If ARB_depth_texture or SGIX_depth_texture is supported,
+	 *    GL_DEPTH_STENCIL_EXT/GL_UNSIGNED_INT_24_8_EXT data can also be
+	 *    used for textures;
+	 *
+	 * So, if ARB_depth_texture is not supported, don't try the texture
+	 * tests.
+	 */
+	if (piglit_is_extension_supported("GL_ARB_depth_texture"))
+		pass = test_texture() && pass;
 
 	piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
 }
-- 
2.5.5



More information about the Piglit mailing list