[Mesa-dev] [PATCH 07/19] intel: Execute HiZ resolve ops in intel_region_map

Chad Versace chad at chad-versace.us
Fri Sep 23 17:37:37 PDT 2011


Signed-off-by: Chad Versace <chad at chad-versace.us>
---
 src/mesa/drivers/dri/intel/intel_regions.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c
index 0a5c2c1..304de8b 100644
--- a/src/mesa/drivers/dri/intel/intel_regions.c
+++ b/src/mesa/drivers/dri/intel/intel_regions.c
@@ -116,6 +116,22 @@ intel_region_map(struct intel_context *intel, struct intel_region *region,
 
    _DBG("%s %p\n", __FUNCTION__, region);
    if (!region->map_refcount++) {
+      /* Handle HiZ resolve ops. */
+      struct intel_hiz_control *hiz = &region->hiz;
+      if (hiz->region != NULL) {
+	 if (hiz->need_resolve == INTEL_HIZ_NEED_DEPTH_RESOLVE) {
+	    intel->vtbl.resolve_depthbuffer(intel, region);
+	 } else if (hiz->need_resolve == INTEL_HIZ_NEED_HIZ_RESOLVE) {
+	    intel->vtbl.resolve_hizbuffer(intel, region);
+	 }
+
+	 assert(!hiz->need_resolve);
+
+	 if (hiz->region && (mode & GL_MAP_WRITE_BIT)) {
+	    hiz->need_resolve = INTEL_HIZ_NEED_HIZ_RESOLVE;
+	 }
+      }
+
       if (region->tiling != I915_TILING_NONE)
 	 drm_intel_gem_bo_map_gtt(region->buffer);
       else
-- 
1.7.6.2



More information about the mesa-dev mailing list