All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gallium/nouveau: use pre-calculated stride for resource_get_handle
@ 2012-10-04 11:29 Marcin Slusarz
       [not found] ` <20121004112911.GA4979-OI9uyE9O0yo@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Slusarz @ 2012-10-04 11:29 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gallium/nouveau: use pre-calculated stride for resource_get_handle
       [not found] ` <20121004112911.GA4979-OI9uyE9O0yo@public.gmane.org>
@ 2012-10-04 14:58   ` Marcin Slusarz
  0 siblings, 0 replies; 2+ messages in thread
From: Marcin Slusarz @ 2012-10-04 14:58 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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,
> -- 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-04 14:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-04 11:29 [PATCH] gallium/nouveau: use pre-calculated stride for resource_get_handle Marcin Slusarz
     [not found] ` <20121004112911.GA4979-OI9uyE9O0yo@public.gmane.org>
2012-10-04 14:58   ` Marcin Slusarz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.