[Mesa-dev] [PATCH 17/18] radeonsi: early exist in si_clear if there's nothing to do

Michel Dänzer michel at daenzer.net
Fri Jul 31 03:06:55 PDT 2015


On 28.07.2015 19:05, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> ---
>  src/gallium/drivers/radeonsi/si_blit.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c
> index c3591a7..c892623 100644
> --- a/src/gallium/drivers/radeonsi/si_blit.c
> +++ b/src/gallium/drivers/radeonsi/si_blit.c
> @@ -342,6 +342,8 @@ static void si_clear(struct pipe_context *ctx, unsigned buffers,
>  	if (buffers & PIPE_CLEAR_COLOR) {
>  		evergreen_do_fast_color_clear(&sctx->b, fb, &sctx->framebuffer.atom,
>  					      &buffers, color);
> +		if (!buffers)
> +			return; /* all buffers have been fast cleared */
>  	}
>  
>  	if (buffers & PIPE_CLEAR_COLOR) {
> 

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>


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


More information about the mesa-dev mailing list