--- format-consistency-get1.c	2014-07-08 09:55:31.000000000 +0700
+++ format-consistency-get.c	2014-07-08 10:46:12.000000000 +0700
@@ -62,24 +62,24 @@
 	bool pass = true;
 
 	/* reference pixel data -- up to 16 bytes */
-	char ref[] = {0x0f, 0x1e, 0x2d, 0x3c, 0x4b, 0x5a, 0x69, 0x78,
+	char ref[] = {0x8f, 0x9e, 0x2d, 0x3c, 0x4b, 0x5a, 0x69, 0x78,
 		      0x87, 0x96, 0xa5, 0xb4, 0xc3, 0xd2, 0xe1, 0xf0};
 
 	printf("Testing %d bits class:\n", bits);
 
-	glGenTextures(1, &tex);
-	glBindTexture(GL_TEXTURE_2D, tex);
-	glTexStorage2D(GL_TEXTURE_2D, 1, fmt->internalformat,
-		       1, 1);
-
-	glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 1, 1,
-			fmt->pixelformat, fmt->pixeltype,
-			ref);
-
 	for (; fmt->internalformat; fmt++) {
 		GLuint view;
 		char data[16];
 		int i;
+		
+		glGenTextures(1, &tex);
+		glBindTexture(GL_TEXTURE_2D, tex);
+		glTexStorage2D(GL_TEXTURE_2D, 1, fmt->internalformat,
+		       1, 1);
+
+		glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 1, 1,
+			fmt->pixelformat, fmt->pixeltype,
+			ref);
 
 		glGenTextures(1, &view);
 		glTextureView(view, GL_TEXTURE_2D, tex,
@@ -113,9 +113,9 @@
 		}
 
 		glDeleteTextures(1, &view);
+		glDeleteTextures(1, &tex);
 	}
 
-	glDeleteTextures(1, &tex);
 	return pass;
 }
 
