diff options
author | Haixia Shi <[email protected]> | 2016-08-02 17:03:32 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2016-08-03 08:28:52 -0700 |
commit | 4c4bfed6709c7c35de4b2268ca2e73ed75c30f50 (patch) | |
tree | 9236f4b866405424381bcd239ff988a4b5bd8ffc | |
parent | 6fb6201f7184f53a8830a2902c9c3327b0acb24c (diff) |
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 <[email protected]>
Cc: Jason Ekstrand <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Change-Id: I461ad5b204626d5a1c45611fc6b63735dcf29f63
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index a988221a005..8e7c44c96a9 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -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; |