[Mesa-dev] [PATCH] r600g: Lower the minimum stride from 512 to 256 bytes to fix bug #31578.

Alex Deucher alexdeucher at gmail.com
Mon Nov 15 13:46:45 PST 2010


On Mon, Nov 15, 2010 at 4:41 PM, Tilman Sauerbeck <tilman at code-monkey.de> wrote:
> piglit/fbo-readpixels still passes for me.
>
> Signed-off-by: Tilman Sauerbeck <tilman at code-monkey.de>
> ---
>
> Please review. And someone please tell me where those 512 and 256 bytes
> are coming from :)

The alignment depends on the type of tiling in use (linear, 1d, 2d).
See this drm patch for more info:
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h=fba4312e223f1187efc8c083daed70e57fa9c9d3
The info needed can be queried via the tiling info ioctl.

Alex

>
>  src/gallium/drivers/r600/r600_texture.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
> index e719f7f..d79f45c 100644
> --- a/src/gallium/drivers/r600/r600_texture.c
> +++ b/src/gallium/drivers/r600/r600_texture.c
> @@ -171,7 +171,7 @@ static unsigned r600_texture_get_stride(struct pipe_screen *screen,
>                stride = align(stride, 512);
>
>         if (ptex->bind & PIPE_BIND_RENDER_TARGET)
> -               stride = align(stride, 512);
> +               stride = align(stride, 256);
>
>        return stride;
>  }
> --
> 1.7.3.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>


More information about the mesa-dev mailing list