Mesa (master): intel: Always downsample in intel_miptree_map_multisample

Chad Versace chadversary at kemper.freedesktop.org
Thu Aug 9 22:21:23 UTC 2012


Module: Mesa
Branch: master
Commit: 6cb9e99a757bd5a9d908ed6c5515a9ae5fb041ba
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6cb9e99a757bd5a9d908ed6c5515a9ae5fb041ba

Author: Chad Versace <chad.versace at linux.intel.com>
Date:   Thu Aug  9 13:55:07 2012 -0700

intel: Always downsample in intel_miptree_map_multisample

Always downsample before mapping, even if the map mode contains
GL_MAP_INVALIDATE_RANGE_BIT. If we neglect to downsample when only
a subrect is mapped then the upsample in intel_miptree_unmap_multisample
may write garbage to the region outside the subrect.

(Eric gave my patch e88cfbb a conditional reviewed-by with the condition
that it always downsample before mapping. I forgot to make that change
before pushing the patch.)

Signed-off-by: Chad Versace <chad.versace at linux.intel.com>

---

 src/mesa/drivers/dri/intel/intel_mipmap_tree.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index e002c74..24cd9e9 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -1626,9 +1626,6 @@ intel_miptree_map_multisample(struct intel_context *intel,
       mt->need_downsample = true;
    }
 
-   if (mode & GL_MAP_INVALIDATE_RANGE_BIT)
-      mt->need_downsample = false;
-
    intel_miptree_downsample(intel, mt);
    intel_miptree_map_singlesample(intel, mt->singlesample_mt,
                                   level, slice,




More information about the mesa-commit mailing list