[Mesa-dev] [PATCH v15 15/16] i965: Remove scanout restriction from lossless compression

Daniel Stone daniels at collabora.com
Tue Jun 6 17:20:23 UTC 2017


From: Ben Widawsky <ben at bwidawsk.net>

v2: Try to keep the assert as recommended by Topi. This requires
modifying the num_samples check to be <= 1 because internally created
buffers set num_samples = 0.

v3: Buffers are proactively marked as scanout, often, and so checking
is_scanout in whether or not the buffer supports non-msrt fast clears
will return false. To avoid this, only check buffers which are destined
to use ccs (is a scanout buffer, and has an "mcs" buffer). Chad found
this issue.

v4: Use a better assertion based off of change in last patch. (Topi)

v5: Remove the assert entirely

Cc: Topi Pohjolainen <topi.pohjolainen at intel.com>
Cc: Chad Versace <chadversary at chromium.org>
Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
Acked-by: Daniel Stone <daniels at collabora.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
Signed-off-by: Daniel Stone <daniels at collabora.com>
---
 src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index fe8aedcd10..c635f95ab9 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -699,8 +699,7 @@ intel_miptree_create(struct brw_context *brw,
       const bool lossless_compression_disabled = INTEL_DEBUG & DEBUG_NO_RBC;
       const bool is_lossless_compressed =
          unlikely(!lossless_compression_disabled) &&
-         brw->gen >= 9 && !mt->is_scanout &&
-         intel_miptree_supports_lossless_compressed(brw, mt);
+         brw->gen >= 9 && intel_miptree_supports_lossless_compressed(brw, mt);
 
       if (is_lossless_compressed) {
          assert(!(mt->aux_disable & INTEL_AUX_DISABLE_CCS));
-- 
2.13.0



More information about the mesa-dev mailing list