[Piglit] [PATCH] arb_direct_state_access: Testing glCompressedTextureSubImage1D.
Laura Ekstrand
laura at jlekstrand.net
Fri Feb 13 15:28:30 PST 2015
---
.../arb_direct_state_access/compressedtexturesubimage.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/tests/spec/arb_direct_state_access/compressedtexturesubimage.c b/tests/spec/arb_direct_state_access/compressedtexturesubimage.c
index 5372d10..473c3a3 100644
--- a/tests/spec/arb_direct_state_access/compressedtexturesubimage.c
+++ b/tests/spec/arb_direct_state_access/compressedtexturesubimage.c
@@ -192,6 +192,23 @@ upload_subtest(GLenum target, bool use_pbo)
enum piglit_result
piglit_display(void)
{
+ /* According to the EXT_texture_compression_s3tc spec:
+ * "The S3TC texture compression algorithm supports only 2D
+ * images without borders. CompressedTexImage1DARB and
+ * CompressedTexImage3DARB produce an INVALID_ENUM error if
+ * <internalformat> is an S3TC format."
+ *
+ * Array textures can use CompressedTextureSubImage3D, but
+ * CompressedTextureSubImage1D will still throw an error. This is
+ * because most compression formats use 2D compression, so 1D
+ * compressed textures don't make sense.
+ */
+ GLuint tex;
+ glCreateTextures(GL_TEXTURE_1D, 1, &tex);
+ glCompressedTextureSubImage1D(tex, 0, 0, WIDTH * HEIGHT, FORMAT,
+ IMAGE_SIZE, NULL);
+ subtest(piglit_check_gl_error(GL_INVALID_ENUM), "GL_TEXTURE_1D");
+
/* Non-PBO tests */
upload_subtest(GL_TEXTURE_2D, false);
if (piglit_is_extension_supported("GL_EXT_texture_array"))
--
2.1.0
More information about the Piglit
mailing list