[Piglit] [PATCH 2/2] Don't use default texture object
Anuj Phogat
anuj.phogat at gmail.com
Fri Apr 10 10:41:32 PDT 2015
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
tests/texturing/getteximage-targets.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/texturing/getteximage-targets.c b/tests/texturing/getteximage-targets.c
index 0e1c3f1..c3781d6 100644
--- a/tests/texturing/getteximage-targets.c
+++ b/tests/texturing/getteximage-targets.c
@@ -104,9 +104,12 @@ getTexImage(bool doPBO, GLenum target, GLubyte data[][IMAGE_SIZE],
int num_layers=1, num_faces=1, layer_size;
GLubyte data2[18][IMAGE_SIZE];
GLubyte *dataGet;
- GLuint packPBO;
+ GLuint tex, packPBO;
bool pass = true;
+ glGenTextures(1, &tex);
+ glBindTexture(target, tex);
+
switch (target) {
case GL_TEXTURE_1D:
glTexImage1D(GL_TEXTURE_1D, 0, internalformat, IMAGE_WIDTH, 0,
@@ -218,6 +221,8 @@ getTexImage(bool doPBO, GLenum target, GLubyte data[][IMAGE_SIZE],
glUnmapBuffer(GL_PIXEL_PACK_BUFFER);
glDeleteBuffers(1, &packPBO);
}
+
+ glDeleteTextures(1, &tex);
return pass;
}
--
1.9.3
More information about the Piglit
mailing list