mesa: force height of 1D textures to be 1 in texture views
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 20 Aug 2014 06:42:30 +0000 (02:42 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Mon, 1 Sep 2014 22:38:02 +0000 (18:38 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/main/textureview.c

index b3521e2190e30ab1002b0c115a396962fe790e14..6e86a9a44039d58bc1378767ed178f60389a40ad 100644 (file)
@@ -536,6 +536,9 @@ _mesa_TextureView(GLuint texture, GLenum target, GLuint origtexture,
    /* Adjust width, height, depth to be appropriate for new target */
    switch (target) {
    case GL_TEXTURE_1D:
+      height = 1;
+      break;
+
    case GL_TEXTURE_3D:
       break;