From 2057ba2232651d193db483e32d6b7e61ca156c80 Mon Sep 17 00:00:00 2001 From: Dmytro Chystiakov Date: Thu, 11 Jan 2018 14:15:39 -0800 Subject: [PATCH] FIX artifacts in Android apps Telegram and KineMaster Change intel_miptree_create_for_dri_image to set mt_create_flags |= MIPTREE_CREATE_NO_AUX for planar images with nplanes == 1 in order to fix artifacts in Telegram and KineMaster android apps. Change-Id: I4bae34631acc8d27a8def416798d334c003a0c41 --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index ae596c7202..5908cb4c67 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -1025,6 +1025,9 @@ intel_miptree_create_for_dri_image(struct brw_context *brw, if (mod_info && mod_info->aux_usage != ISL_AUX_USAGE_NONE) mt_create_flags |= MIPTREE_CREATE_NO_AUX; + if (image->planar_format && image->planar_format->nplanes == 1) + mt_create_flags |= MIPTREE_CREATE_NO_AUX; + /* Disable creation of the texture's aux buffers because the driver exposes * no EGL API to manage them. That is, there is no API for resolving the aux * buffer's content to the main buffer nor for invalidating the aux buffer's -- 2.13.5