summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-04-16 10:51:42 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-04-16 10:51:42 +0100
commite80d1e367a25af406c7f2327646c0aa699962fe8 (patch)
tree19f141f3e50a571a9a9c40c16cc5629ba9c507c9 /progs
parentb83cf05d0d986f324fe9c93525c84eb62fed4f20 (diff)
parent82e92eeab0c831683961175d155865786149a354 (diff)
Merge branch 'gallium-s3tc'
Diffstat (limited to 'progs')
-rw-r--r--progs/tests/texcompress2.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/progs/tests/texcompress2.c b/progs/tests/texcompress2.c
index cbb8f1d3a2..b95aca9fb9 100644
--- a/progs/tests/texcompress2.c
+++ b/progs/tests/texcompress2.c
@@ -51,7 +51,6 @@ TestSubTex(void)
GLboolean all = 0*GL_TRUE;
GLubyte *buffer;
GLint size, fmt;
- int i;
glGetTexLevelParameteriv(Target, 0,
GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, &size);
@@ -83,6 +82,23 @@ TestSubTex(void)
static void
+TestGetTex(void)
+{
+ GLubyte *buffer;
+
+ buffer = (GLubyte *) malloc(3 * ImgWidth * ImgHeight);
+
+ glGetTexImage(GL_TEXTURE_2D,
+ 0,
+ GL_RGB,
+ GL_UNSIGNED_BYTE,
+ buffer);
+
+ free(buffer);
+}
+
+
+static void
LoadCompressedImage(const char *file)
{
const GLenum filter = GL_LINEAR;
@@ -146,7 +162,10 @@ LoadCompressedImage(const char *file)
glTexParameteri(Target, GL_TEXTURE_MIN_FILTER, filter);
glTexParameteri(Target, GL_TEXTURE_MAG_FILTER, filter);
- TestSubTex();
+ if (0)
+ TestSubTex();
+ else
+ TestGetTex();
}