[Mesa-dev] [PATCH 1/2] st/xorg: set the SCANOUT flag for all pixmaps

Michel Dänzer michel at daenzer.net
Mon Aug 12 07:35:57 PDT 2013


On Sam, 2013-08-10 at 00:23 +0200, Marek Olšák wrote:
> Any pixmap can potentially end up as a scanout buffer, right?
> 
> This fixes a whole-screen corruption with radeonsi, which needs a different
> texture layout for scanout textures.
> ---
>  src/gallium/state_trackers/xorg/xorg_exa.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
> index 3e764f8..0302a8b 100644
> --- a/src/gallium/state_trackers/xorg/xorg_exa.c
> +++ b/src/gallium/state_trackers/xorg/xorg_exa.c
> @@ -875,7 +875,7 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
>  	template.depth0 = 1;
>  	template.array_size = 1;
>  	template.last_level = 0;
> -	template.bind = PIPE_BIND_RENDER_TARGET | priv->flags;
> +	template.bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SCANOUT | priv->flags;
>  	priv->tex_flags = priv->flags;
>  	texture = exa->scrn->resource_create(exa->scrn, &template);
>  

As st/xorg doesn't support page flipping, I think this should only be
really necessary for the screen pixmap (pPixmap ==
pScreen->GetScreenPixmap(pScreen)).


-- 
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer



More information about the mesa-dev mailing list