st/mesa: fix assertion failure in GetTexImage for cubemaps
authorMarek Olšák <maraeo@gmail.com>
Fri, 17 Sep 2010 00:43:38 +0000 (02:43 +0200)
committerMarek Olšák <maraeo@gmail.com>
Mon, 20 Sep 2010 16:14:23 +0000 (18:14 +0200)
Can be reproduced with mesa/demos/src/tests/blitfb.

NOTE: This is a candidate for the 7.9 branch.

src/mesa/state_tracker/st_cb_texture.c

index 124cd32e13e014d98d60923730371ae3b3a94834..cd5001475c919bfd4e4011bee61fa58c448c3c0f 100644 (file)
@@ -240,6 +240,12 @@ get_texture_dims(GLenum target)
       return 1;
    case GL_TEXTURE_2D:
    case GL_TEXTURE_CUBE_MAP_ARB:
+   case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
+   case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
+   case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
+   case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
+   case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
+   case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
    case GL_TEXTURE_RECTANGLE_NV:
    case GL_TEXTURE_2D_ARRAY_EXT:
       return 2;