st/nine: CubeTexture: fix GetLevelDesc
authorAxel Davy <axel.davy@ens.fr>
Tue, 2 Dec 2014 21:44:37 +0000 (22:44 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 22 Jan 2015 22:16:18 +0000 (22:16 +0000)
This->surfaces contains the surfaces associated to the levels
and faces. This->surfaces[6*Level] is what we want here,
since it gives us a face descriptor for the level 'Level'.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Xavier Bouchoux <xavierb@gmail.com>
Cc: "10.4" <mesa-stable@lists.freedesktop.org>
src/gallium/state_trackers/nine/cubetexture9.c

index 9f5d8e24d4a33b1cce4c294297de71be3bdaebb3..2c607c067999763f96abc9bf9316b59e58dc9c49 100644 (file)
@@ -146,7 +146,7 @@ NineCubeTexture9_GetLevelDesc( struct NineCubeTexture9 *This,
     user_assert(Level == 0 || !(This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP),
                 D3DERR_INVALIDCALL);
 
-    *pDesc = This->surfaces[Level]->desc;
+    *pDesc = This->surfaces[Level * 6]->desc;
 
     return D3D_OK;
 }