[Mesa-dev] [PATCH v2 1/2] i965/miptree: Set the aux_usage to NONE when emulating ETC
Nanley Chery
nanleychery at gmail.com
Wed May 2 00:49:33 UTC 2018
Found when prototyping an alternative compressed texture upload
algorithm. I asserted that the aux_usage was NONE and was initially
surprised to find that it was triggered.
This change shouldn't affect driver behavior now, but it should prevent
unexpected behavior if we make aux-related changes or assertions later.
v2: Fix commit title (Kenneth Graunke)
---
src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
index b9a564552df..1b46b41a64c 100644
--- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
@@ -209,11 +209,11 @@ intel_miptree_supports_ccs(struct brw_context *brw,
if (devinfo->gen < 8 && (mip_mapped || arrayed))
return false;
- /* There's no point in using an MCS buffer if the surface isn't in a
- * renderable format.
- */
- if (!brw->mesa_format_supports_render[mt->format])
+ /* There's no need for an MCS buffer if the surface isn't renderable. */
+ if (!brw->mesa_format_supports_render[mt->format] ||
+ (mt->etc_format != MESA_FORMAT_NONE)) {
return false;
+ }
return true;
}
--
2.16.2
More information about the mesa-dev
mailing list