i965: use mt->offset in intel_miptree_map_movntdqa()

We need to include mt->offset in the calculation of src pointer because its
value may be non-zero, for example in a cubemap texture.

Signed-off-by: Haixia Shi <hshi@chromium.org>
Cc: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Chad Versace <chad@kiwitree.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Change-Id: I461ad5b204626d5a1c45611fc6b63735dcf29f63
This commit is contained in:
Haixia Shi 2016-08-02 17:03:32 -07:00 committed by Chad Versace
parent 6fb6201f71
commit 4c4bfed670
1 changed files with 3 additions and 0 deletions

View File

@ -2462,6 +2462,9 @@ intel_miptree_map_movntdqa(struct brw_context *brw,
void *src = intel_miptree_map_raw(brw, mt);
if (!src)
return;
src += mt->offset;
src += image_y * mt->pitch;
src += image_x * mt->cpp;