From 92321611787207f8f2c02a226c1370f85cb99573 Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Tue, 2 Dec 2014 22:44:37 +0100 Subject: [PATCH] st/nine: CubeTexture: fix GetLevelDesc 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 Reviewed-by: David Heidelberg Signed-off-by: Axel Davy Signed-off-by: Xavier Bouchoux Cc: "10.4" --- src/gallium/state_trackers/nine/cubetexture9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/cubetexture9.c b/src/gallium/state_trackers/nine/cubetexture9.c index 9f5d8e24d4a..2c607c06799 100644 --- a/src/gallium/state_trackers/nine/cubetexture9.c +++ b/src/gallium/state_trackers/nine/cubetexture9.c @@ -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; } -- 2.30.2