[Mesa-dev] [PATCH] i965: Don't try to resolve CCS with MESA_FORMAT_NONE.

Eero Tamminen eero.t.tamminen at intel.com
Mon Jun 5 09:55:56 UTC 2017


Hi,

On 04.06.2017 22:26, Kenneth Graunke wrote:
> Since commit e9f5004d5ea38a21019e0affcd63d353b98d499a, KDE's Plasma
> Shell started crashing when intel_disable_rb_aux_buffer tried to
> dereference irb->mt, and there was no miptree.  This happened during
> intel_texture_view_requires_resolve, coming from a glClear().

That's not the only thing dying because of ISL_FORMAT_UNSUPPORTED.

Most of the benchmarks are currently crashing on GEN9.

GpuTest 0.7, GLBenchmark 2.7, Lightsmark2008, Unigine Heaven & Valley, 
SynMark and several GfxBench v4 test-cases (T-Rex, driver, driver2, 
blending, fill) crash because of ISL_FORMAT_UNSUPPORTED:
-------------
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff24c35a1 in isl_format_supports_ccs_e (devinfo=0x7ce998, 
format=ISL_FORMAT_UNSUPPORTED)
     at ../../../src/intel/isl/isl_format.c:536
536	   if (!format_info[format].exists)
-------------

If latest Mesa is installed to the system instead of one running just 
the test-case it with, one gets for some of those BadWindow errors 
instead, and Ubuntu compiz also crashes.


	- Eero

> Apparently intel_tex->_Format is MESA_FORMAT_NONE.  We used to translate
> MESA_FORMAT_NONE to 0, which happens to be ISL_FORMAT_R32G32B32A32_FLOAT,
> which happens to support CCS_E, so we assumed no resolves were needed.
>
> That patch began translating MESA_FORMAT_NONE as ISL_FORMAT_UNSUPPORTED,
> which claims not to support CCS_E, so we thought we needed resolves,
> even though the buffer was in a bad state.
>
> For now, detect intel_tex->_Format == MESA_FORMAT_NONE and bail, like
> we used to.  This is an ugly band-aid fix, but that's okay, given that
> Jason has patches on the mailing list to rewrite the resolve code.
>
> This makes KDE usable again.
> ---
>  src/mesa/drivers/dri/i965/brw_context.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
> index 9878cae9d4b..d8219cb57e0 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.c
> +++ b/src/mesa/drivers/dri/i965/brw_context.c
> @@ -205,6 +205,9 @@ intel_texture_view_requires_resolve(struct brw_context *brw,
>         !intel_miptree_is_lossless_compressed(brw, intel_tex->mt))
>       return false;
>
> +   if (intel_tex->_Format == MESA_FORMAT_NONE)
> +      return false;
> +
>     const enum isl_format isl_format =
>        brw_isl_format_for_mesa_format(intel_tex->_Format);
>
>



More information about the mesa-dev mailing list