[Piglit] [PATCH 1/2] util: don't minify height for 1D textures in piglit_depth_texture()
Brian Paul
brianp at vmware.com
Fri Aug 1 09:25:02 PDT 2014
This was never hit since no callers create 1D mipmapped depth textures.
But fix it anyway.
---
tests/util/piglit-util-gl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/util/piglit-util-gl.c b/tests/util/piglit-util-gl.c
index bbea519..caeb564 100644
--- a/tests/util/piglit-util-gl.c
+++ b/tests/util/piglit-util-gl.c
@@ -2369,7 +2369,9 @@ piglit_depth_texture(GLenum target, GLenum internalformat, int w, int h, int d,
if (w > 1)
w >>= 1;
- if (h > 1)
+ if (target != GL_TEXTURE_1D &&
+ target != GL_TEXTURE_1D_ARRAY &&
+ h > 1)
h >>= 1;
}
free(data);
--
1.7.10.4
More information about the Piglit
mailing list