[Mesa-dev] [PATCH] radeonsi: don't expose 8xMSAA on slowest APUs

Roland Scheidegger sroland at vmware.com
Thu Jan 4 01:46:14 UTC 2018


Deos AMD degrade these chips to d3d10.1 on windows?
Just asking because d3d11 requires 8x msaa ;-).

(But I won't say what I think about this patch...)

Roland

Am 04.01.2018 um 01:54 schrieb Marek Olšák:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> i.e. Kabini, Mullins, Stoney.
> 
> This was requested internally.
> ---
>  src/gallium/drivers/radeonsi/si_state.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
> index f88bf29..d52fccd 100644
> --- a/src/gallium/drivers/radeonsi/si_state.c
> +++ b/src/gallium/drivers/radeonsi/si_state.c
> @@ -2136,41 +2136,46 @@ static bool si_is_zs_format_supported(enum pipe_format format)
>  {
>  	return si_translate_dbformat(format) != V_028040_Z_INVALID;
>  }
>  
>  static boolean si_is_format_supported(struct pipe_screen *screen,
>  				      enum pipe_format format,
>  				      enum pipe_texture_target target,
>  				      unsigned sample_count,
>  				      unsigned usage)
>  {
> +	struct si_screen *sscreen = (struct si_screen*)screen;
>  	unsigned retval = 0;
>  
>  	if (target >= PIPE_MAX_TEXTURE_TYPES) {
>  		R600_ERR("r600: unsupported texture type %d\n", target);
>  		return false;
>  	}
>  
>  	if (!util_format_is_supported(format, usage))
>  		return false;
>  
>  	if (sample_count > 1) {
>  		if (!screen->get_param(screen, PIPE_CAP_TEXTURE_MULTISAMPLE))
>  			return false;
>  
>  		if (usage & PIPE_BIND_SHADER_IMAGE)
>  			return false;
>  
>  		switch (sample_count) {
>  		case 2:
>  		case 4:
> +			break;
>  		case 8:
> +			/* Don't expose 8x MSAA on slowest chips. */
> +			if (sscreen->info.num_render_backends == 1)
> +				return false;
>  			break;
>  		case 16:
>  			if (format == PIPE_FORMAT_NONE)
>  				return true;
>  			else
>  				return false;
>  		default:
>  			return false;
>  		}
>  	}
> 



More information about the mesa-dev mailing list