[Piglit] [PATCH 1/2] Set non-mipmap filter for CopyImage textures in namespace pollution test

Kenneth Graunke kenneth at whitecape.org
Fri Mar 24 21:44:28 UTC 2017


glCopyImageSubData() requires mipmap completeness if the texture
object's min filter indicates that mipmapping is involved.

This test doesn't care about mipmapping, so set the min filter to
GL_NEAREST to bypass this.

Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16224
---
 tests/general/object-namespace-pollution.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/general/object-namespace-pollution.c b/tests/general/object-namespace-pollution.c
index 1c7501443..6ac6aee7b 100644
--- a/tests/general/object-namespace-pollution.c
+++ b/tests/general/object-namespace-pollution.c
@@ -1132,10 +1132,12 @@ do_CopyImageSubData(void)
 	glBindTexture(GL_TEXTURE_2D, tex[0]);
 	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 16, 16, 0,
 		     GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 
 	glBindTexture(GL_TEXTURE_2D, tex[1]);
 	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 16, 16, 0,
 		     GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
 
 	glBindTexture(GL_TEXTURE_2D, 0);
 
-- 
2.12.1



More information about the Piglit mailing list