summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorAbdiel Janulgue <[email protected]>2013-01-25 15:37:00 +0200
committerChad Versace <[email protected]>2013-02-01 11:58:12 -0800
commit8e2454c562ce9e6d06ba5e39c8e03097d3590c0e (patch)
tree49f2f8daae960ba72b95fb0e7779308485925e7e /src/mesa/drivers
parent11f5c82e8383fff00edd943209100cc1c9a1424b (diff)
intel: Account for mt->offset in intel_miptree_map
We need to take account the offset from original bo when using glTexSubImage() and other functions that manipulate the subregion of an exported texture. Offsets are appended to mapped region address and when blitting from a source region. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Chad Versace <[email protected]> Signed-off-by: Abdiel Janulgue <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index 31abdad7207..3c4749f309b 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -1120,7 +1120,7 @@ intel_miptree_map_gtt(struct intel_context *intel,
assert(y % bh == 0);
y /= bh;
- base = intel_region_map(intel, mt->region, map->mode);
+ base = intel_region_map(intel, mt->region, map->mode) + mt->offset;
if (base == NULL)
map->ptr = NULL;
@@ -1180,7 +1180,7 @@ intel_miptree_map_blit(struct intel_context *intel,
if (!intelEmitCopyBlit(intel,
mt->region->cpp,
mt->region->pitch, mt->region->bo,
- 0, mt->region->tiling,
+ mt->offset, mt->region->tiling,
map->stride, map->bo,
0, I915_TILING_NONE,
x, y,