[Mesa-dev] [PATCH v2] i965: use mt->offset in intel_miptree_map_movntdqa().
Kenneth Graunke
kenneth at whitecape.org
Wed Aug 3 03:09:32 UTC 2016
On Tuesday, August 2, 2016 5:03:32 PM PDT Haixia Shi wrote:
> 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 at chromium.org>
> Cc: Jason Ekstrand <jason.ekstrand at intel.com>
> Cc: kenneth.w.graunke at intel.com
> Cc: Chad Versace <chad at kiwitree.net>
>
> Change-Id: I461ad5b204626d5a1c45611fc6b63735dcf29f63
> ---
> src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index a988221..8e7c44c 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;
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160802/bda01707/attachment.sig>
More information about the mesa-dev
mailing list