[Mesa-dev] [PATCH 12/21] r600g: permit blitting between textures with STREAM and STAGING usage

Christian König deathsimple at vodafone.de
Wed Feb 29 09:24:01 PST 2012


On 29.02.2012 17:53, Marek Olšák wrote:
> Why this wasn't allowed is beyond me.
Because that resulted in allot better performance.

It doesn't make much sense to let the driver blit the content of a 
texture into a tilled version and make a single draw and then throw away 
that tilled version before the next draw.

So either leave the test there or move it into r600_texture_create, but 
don't remove it altogether.

Christian.

>
> Eventually I'd like to make every format blittable, so that the function
> can go away.
> ---
>   src/gallium/drivers/r600/r600_texture.c |    9 +--------
>   1 files changed, 1 insertions(+), 8 deletions(-)
>
> diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
> index 2b4f893..3fcfb80 100644
> --- a/src/gallium/drivers/r600/r600_texture.c
> +++ b/src/gallium/drivers/r600/r600_texture.c
> @@ -444,14 +444,7 @@ static boolean permit_hardware_blit(struct pipe_screen *screen,
>                                   PIPE_BIND_SAMPLER_VIEW))
>   		return FALSE;
>
> -	switch (res->usage) {
> -	case PIPE_USAGE_STREAM:
> -	case PIPE_USAGE_STAGING:
> -		return FALSE;
> -
> -	default:
> -		return TRUE;
> -	}
> +	return TRUE;
>   }
>
>   static boolean r600_texture_get_handle(struct pipe_screen* screen,



More information about the mesa-dev mailing list