From: Yuanhan Liu Date: Tue, 27 Mar 2012 07:41:52 +0000 (+0800) Subject: intel: fix un-blanced map_refcount issue X-Git-Tag: 062012170305~1009 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9cb777eb71dde895ca0ad3454a9b44252e9b402e;p=profile%2Fivi%2Fmesa.git intel: fix un-blanced map_refcount issue This is a regression introduced by commit cdcfd5, which forget to increase the map_refcount for successfully-mapped region. Thus caused a wrong non-blanced map_refcount. This would fix the regression found in the two following webglc testcase on Pineview platform: texture-npot.html gl-max-texture-dimensions.html Cc: Anuj Phogat Signed-off-by: Yuanhan Liu Reviewed-by: Anuj Phogat --- diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c index d2b737b..abea2bd 100644 --- a/src/mesa/drivers/dri/intel/intel_regions.c +++ b/src/mesa/drivers/dri/intel/intel_regions.c @@ -133,10 +133,10 @@ intel_region_map(struct intel_context *intel, struct intel_region *region, drm_intel_bo_map(region->bo, true); region->map = region->bo->virtual; - if (region->map) { - intel->num_mapped_regions++; - region->map_refcount++; - } + } + if (region->map) { + intel->num_mapped_regions++; + region->map_refcount++; } return region->map;