I honestly have no idea why, but the original test calls TexSubImage
with a width and height of *half* the texture size.  Yet it allocates
enough temporary pixel data for a full texture.  This makes no sense,
and clearly one or the other should change.

Without understanding why the existing test does what it does, I chose
to not change it and simply cut the memory allocation.  Cutting memory
usage also may reduce the likelihood of GL_OUT_OF_MEMORY errors.

Signed-off-by: Kenneth Graunke <[email protected]>
---
 tests/texturing/max-texture-size.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/texturing/max-texture-size.c 
b/tests/texturing/max-texture-size.c
index e0e1684..60ebc15 100644
--- a/tests/texturing/max-texture-size.c
+++ b/tests/texturing/max-texture-size.c
@@ -265,7 +265,7 @@ test_non_proxy_texture_size(GLenum target, GLenum 
internalformat)
               piglit_get_gl_enum_name(internalformat),
               maxSide);
        /* Allocate and initialize texture data array */
-       pixels = initTexData(target, maxSide);
+       pixels = initTexData(target, maxSide/2);
 
        if (pixels == NULL) {
                printf("Error allocating texture data array for target %s, size 
%d\n",
-- 
1.8.5.2

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to