[Mesa-dev] [PATCH 2/2] radeonsi: remove useless check in si_blit_decompress_color()

Gert Wollny gw.fossdev at gmail.com
Fri Sep 22 08:50:54 UTC 2017


Am Freitag, den 22.09.2017, 09:22 +0200 schrieb Samuel Pitoiset:
> That's unnecessary to double-check that dcc_offset is not 0
> because all callers already check that.

In that case I would suggest to add an assert(rtex->dcc_offset)
to ensure this. 

Best, 
Gert 


> 
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/gallium/drivers/radeonsi/si_blit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_blit.c
> b/src/gallium/drivers/radeonsi/si_blit.c
> index 0ecfc83fe2..2c846d2914 100644
> --- a/src/gallium/drivers/radeonsi/si_blit.c
> +++ b/src/gallium/drivers/radeonsi/si_blit.c
> @@ -470,7 +470,7 @@ static void si_blit_decompress_color(struct
> pipe_context *ctx,
>  			     "Decompress Color (levels %u - %u, mask
> 0x%x)\n\n",
>  			     first_level, last_level, level_mask);
>  
> -	if (rtex->dcc_offset && need_dcc_decompress) {
> +	if (need_dcc_decompress) {
>  		custom_blend = sctx->custom_blend_dcc_decompress;
>  
>  		/* disable levels without DCC */


More information about the mesa-dev mailing list