For lossless compression mcs is always allocated when miptree itself is created. The deferred logic in blorp is only meant for CCS_D (single sample fast clear without compression).
In intel_miptree_supports_lossless_compressed() one makes a heuristic choice not to use compression for float types. Currently the deferred hook is also applied for gen9 and blorp clears therefore effectively revert the heuristic. This also prevents blorp from wrongly falling to meta path when the deferred mcs allocation fails for x-tiled miptrees. CC: Jason Ekstrand <ja...@jlekstrand.net> CC: Ben Widawsky <b...@bwidawsk.net> Signed-off-by: Topi Pohjolainen <topi.pohjolai...@intel.com> --- src/mesa/drivers/dri/i965/brw_blorp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c b/src/mesa/drivers/dri/i965/brw_blorp.c index 52f85ff..032fd2c 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp.c +++ b/src/mesa/drivers/dri/i965/brw_blorp.c @@ -845,11 +845,14 @@ do_single_blorp_clear(struct brw_context *brw, struct gl_framebuffer *fb, return true; /* If the MCS buffer hasn't been allocated yet, we need to allocate - * it now. + * it now. For SKL (that supports lossless compression) mcs is allocated + * by the time the miptree is created. If it is omitted there, do not + * try to allocate here. */ if (!irb->mt->mcs_buf) { - assert(!intel_miptree_is_lossless_compressed(brw, irb->mt)); - if (!intel_miptree_alloc_non_msrt_mcs(brw, irb->mt, false)) { + if (brw->gen >= 9) { + can_fast_clear = false; + } else if (!intel_miptree_alloc_non_msrt_mcs(brw, irb->mt, false)) { /* MCS allocation failed--probably this will only happen in * out-of-memory conditions. But in any case, try to recover * by falling back to a non-blorp clear technique. -- 2.9.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev