[Piglit] [PATCH 2/2] Set nearest filter for CopyImage textures in api errors test.
Kenneth Graunke
kenneth at whitecape.org
Fri Mar 24 21:44:29 UTC 2017
Integer textures are not complete if their min/mag filters indicate
LINEAR texel filtering or miplevel selection. You have to use NEAREST
or NEAREST_MIPMAP_NEAREST.
Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16224
---
tests/spec/arb_copy_image/api_errors.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/spec/arb_copy_image/api_errors.c b/tests/spec/arb_copy_image/api_errors.c
index a34810432..e032368ab 100644
--- a/tests/spec/arb_copy_image/api_errors.c
+++ b/tests/spec/arb_copy_image/api_errors.c
@@ -236,6 +236,9 @@ test_compressed_alignment_errors()
GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, 128, 128);
glBindTexture(GL_TEXTURE_2D, tex[1]);
glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA16UI, 32, 32);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
+ GL_NEAREST_MIPMAP_NEAREST);
/* Check for alignment constaints */
/* bad width = 21 */
@@ -264,6 +267,9 @@ test_compressed_alignment_errors()
*/
glBindTexture(GL_TEXTURE_2D, tex[2]);
glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGB16UI, 32, 32);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
+ GL_NEAREST_MIPMAP_NEAREST);
glCopyImageSubData(tex[0], GL_TEXTURE_2D, 0, 0, 0, 0,
tex[2], GL_TEXTURE_2D, 0, 0, 0, 0, 20, 20, 1);
pass &= piglit_check_gl_error(GL_INVALID_OPERATION);
--
2.12.1
More information about the Piglit
mailing list