nouveau: use pre-calculated stride for resource_get_handle

Fixes FDO#55294.

NOTE: This is a candidate for the 9.0 branch.
(cherry picked from commit 93eba26935)
This commit is contained in:
Marcin Slusarz 2012-10-02 01:52:23 +02:00
parent 8f772b34b0
commit 77b1d2e09c
2 changed files with 2 additions and 4 deletions

View file

@ -56,8 +56,7 @@ nv30_miptree_get_handle(struct pipe_screen *pscreen,
if (!mt || !mt->base.bo)
return FALSE;
stride = util_format_get_stride(mt->base.base.format,
mt->base.base.width0);
stride = mt->level[0].pitch;
return nouveau_screen_bo_get_handle(pscreen, mt->base.bo, stride, handle);
}

View file

@ -133,8 +133,7 @@ nv50_miptree_get_handle(struct pipe_screen *pscreen,
if (!mt || !mt->base.bo)
return FALSE;
stride = util_format_get_stride(mt->base.base.format,
mt->base.base.width0);
stride = mt->level[0].pitch;
return nouveau_screen_bo_get_handle(pscreen,
mt->base.bo,