summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2014-03-15 08:49:35 +1300
committerChris Forbes <[email protected]>2014-04-10 18:27:41 +1200
commitea477817d773b24dbb29b392e3d4bc53f9dd3e90 (patch)
tree0ef9e6e53de61db12dd50825aa35cf8b07870ed9 /src/mesa/drivers
parent01d6a2ad1635c7db1633fdf695950818731a7648 (diff)
i965: Account for view parameters in blit CTSI path
Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/intel_tex_copy.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_tex_copy.c b/src/mesa/drivers/dri/i965/intel_tex_copy.c
index ca0b5b976c6..c2b6c350c1b 100644
--- a/src/mesa/drivers/dri/i965/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/i965/intel_tex_copy.c
@@ -74,12 +74,17 @@ intel_copy_texsubimage(struct brw_context *brw,
return false;
}
+ /* account for view parameters and face index */
+ int dst_level = intelImage->base.Base.Level +
+ intelImage->base.Base.TexObject->MinLevel;
+ int dst_slice = slice + intelImage->base.Base.Face +
+ intelImage->base.Base.TexObject->MinLayer;
+
/* blit from src buffer to texture */
if (!intel_miptree_blit(brw,
irb->mt, irb->mt_level, irb->mt_layer,
x, y, irb->Base.Base.Name == 0,
- intelImage->mt, intelImage->base.Base.Level,
- intelImage->base.Base.Face + slice,
+ intelImage->mt, dst_level, dst_slice,
dstx, dsty, false,
width, height, GL_COPY)) {
return false;