[Mesa-dev] [PATCH] i965: Disable fast clears for MSRTs on SKL

Ben Widawsky ben at bwidawsk.net
Fri Nov 13 14:38:16 PST 2015


On Fri, Nov 13, 2015 at 10:23:20PM +0100, Neil Roberts wrote:
> There are currently a bunch of formats that behave strangely when
> sampling the cleared color from the MCS buffer on SKL. They seem to
> mostly be formats that don't have an alpha component, although it's
> not all of them, and we haven't yet found anything in the specs which
> would explain this. For now to be on the safe side this patch just
> disables fast clears for MSRTs on SKL altogether. The assumption is
> that clears are probably more likely to be used in single-sampled
> applications anyway so we can at least get them working and we can
> enable MSRTs later once we understand the problem better.
> ---
> 
> If we go with this patch we could remove the explicit check for the
> half-float intensity and luminance formats as well.
> 
>  src/mesa/drivers/dri/i965/brw_meta_fast_clear.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
> index dc085ba..85576a8 100644
> --- a/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
> +++ b/src/mesa/drivers/dri/i965/brw_meta_fast_clear.c
> @@ -524,6 +524,13 @@ brw_meta_fast_clear(struct brw_context *brw, struct gl_framebuffer *fb,
>        if (brw->gen < 7)
>           clear_type = REP_CLEAR;
>  
> +      /* Certain formats have unresolved issues with sampling from the MCS
> +       * buffer on Gen9. This disables fast clears altogether for MSRTs until
> +       * we can figure out what's going on.
> +       */
> +      if (brw->gen >= 9 && irb->mt->num_samples > 1)
> +         clear_type = REP_CLEAR;
> +
>        if (irb->mt->fast_clear_state == INTEL_FAST_CLEAR_STATE_NO_MCS)
>           clear_type = REP_CLEAR;
>  

(Perhaps "Disable fast clears..." is a misleading title because it
doesn't really disable them. A note that this patch should have no functional
effect other than perhaps receiving fewer perf_debug messages on SKL+ could be
helpful to being looking into backports).

Reviewed-by: Ben Widawsky <benjamin.widawsky at intel.com>


More information about the mesa-dev mailing list