Marcin Slusarz
2012-Oct-04 11:29 UTC
[Nouveau] [PATCH] gallium/nouveau: use pre-calculated stride for resource_get_handle
Fixes FDO#55294. --- src/gallium/drivers/nv30/nv30_miptree.c | 3 +-- src/gallium/drivers/nv50/nv50_miptree.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/nv30/nv30_miptree.c b/src/gallium/drivers/nv30/nv30_miptree.c index 5a9a63b..9700fa8 100644 --- a/src/gallium/drivers/nv30/nv30_miptree.c +++ b/src/gallium/drivers/nv30/nv30_miptree.c @@ -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); } diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c index 7b8dfb8..70e8c77 100644 --- a/src/gallium/drivers/nv50/nv50_miptree.c +++ b/src/gallium/drivers/nv50/nv50_miptree.c @@ -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, -- 1.7.12
Marcin Slusarz
2012-Oct-04 14:58 UTC
[Nouveau] [PATCH] gallium/nouveau: use pre-calculated stride for resource_get_handle
On Thu, Oct 04, 2012 at 01:29:11PM +0200, Marcin Slusarz wrote:> Fixes FDO#55294. > ---BTW, I'd like to also apply it to 9.0 branch.> src/gallium/drivers/nv30/nv30_miptree.c | 3 +-- > src/gallium/drivers/nv50/nv50_miptree.c | 3 +-- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/src/gallium/drivers/nv30/nv30_miptree.c b/src/gallium/drivers/nv30/nv30_miptree.c > index 5a9a63b..9700fa8 100644 > --- a/src/gallium/drivers/nv30/nv30_miptree.c > +++ b/src/gallium/drivers/nv30/nv30_miptree.c > @@ -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); > } > diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c > index 7b8dfb8..70e8c77 100644 > --- a/src/gallium/drivers/nv50/nv50_miptree.c > +++ b/src/gallium/drivers/nv50/nv50_miptree.c > @@ -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, > --
Seemingly Similar Threads
- [PATCH] nv04-nv40: Rewrite and unify miptree and transfer code
- [PATCH] nv04-nv40: Rewrite and unify miptree and transfer code (v2)
- [PATCH mesa 2/3] nv30: Fix color resolving for nv3x cards
- [PATCH mesa v2 1/2] nv30: Fix color resolving for nv3x cards
- [MESA PATCH] Fix nv40_miptree_layout pitch