[Mesa-dev] [PATCH] i965: Don't try to resolve CCS with MESA_FORMAT_NONE.
Kenneth Graunke
kenneth at whitecape.org
Sun Jun 4 19:26:04 UTC 2017
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().
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);
--
2.13.0
More information about the mesa-dev
mailing list