[Piglit] [PATCH 19/24] arb_direct_state_access: Added test for glCompressedTextureSubImage1D.

Laura Ekstrand laura at jlekstrand.net
Mon Dec 15 17:24:22 PST 2014


---
 .../arb_direct_state_access/getcompressedtextureimage.c   | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tests/spec/arb_direct_state_access/getcompressedtextureimage.c b/tests/spec/arb_direct_state_access/getcompressedtextureimage.c
index abbffcf..7d6aba8 100644
--- a/tests/spec/arb_direct_state_access/getcompressedtextureimage.c
+++ b/tests/spec/arb_direct_state_access/getcompressedtextureimage.c
@@ -411,6 +411,21 @@ piglit_display(void)
 			result = PIGLIT_FAIL;
 	}
 
+	/* 1D targets can't be compressed in Mesa right now,
+	 * but here is a trivial test for the entry point. */
+	glCompressedTextureSubImage1D(250, 0, 0, 60,
+				      internalformat, 60*4*8,
+				      NULL);
+
+	if (!piglit_check_gl_error(GL_INVALID_OPERATION)) /* Bad texture */
+		subtest = PIGLIT_FAIL;
+	else
+		subtest = PIGLIT_PASS;
+	piglit_report_subtest_result(subtest, "Compressed Texture"
+				     " Sub Image 1D");
+	if (subtest == PIGLIT_FAIL)
+		result = PIGLIT_FAIL;
+
 	free(data);
 
 	return result;
-- 
2.1.0



More information about the Piglit mailing list