summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorYuanhan Liu <[email protected]>2012-03-27 15:41:52 +0800
committerYuanhan Liu <[email protected]>2012-03-28 09:51:38 +0800
commit9cb777eb71dde895ca0ad3454a9b44252e9b402e (patch)
treed71f66b532194688696d424dc1dc8a2a5a439b69 /src/mesa/drivers
parent7a6324dbfe8d354b9b5f3181af0ce6bebbb374cc (diff)
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 <[email protected]> Signed-off-by: Yuanhan Liu <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_regions.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri/intel/intel_regions.c
index d2b737b86c5..abea2bd0f71 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;