<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 3, 2014 at 11:58 AM, Matt Turner <span dir="ltr"><<a href="mailto:mattst88@gmail.com" target="_blank">mattst88@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Sep 2, 2014 at 3:49 PM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>

> Signed-off-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>><br>
> ---<br>
>  src/mesa/drivers/dri/i965/intel_copy_image.c | 31 +++++++++++++++++++---------<br>
>  1 file changed, 21 insertions(+), 10 deletions(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/intel_copy_image.c b/src/mesa/drivers/dri/i965/intel_copy_image.c<br>
> index 8bda2dd..f7db56d 100644<br>
> --- a/src/mesa/drivers/dri/i965/intel_copy_image.c<br>
> +++ b/src/mesa/drivers/dri/i965/intel_copy_image.c<br>
> @@ -40,6 +40,7 @@ copy_image_with_blitter(struct brw_context *brw,<br>
>                          int src_width, int src_height)<br>
>  {<br>
>     GLuint bw, bh;<br>
> +   uint32_t src_image_x, src_image_y, dst_image_x, dst_image_y;<br>
>     int cpp;<br>
><br>
>     /* The blitter doesn't understand multisampling at all. */<br>
> @@ -70,6 +71,9 @@ copy_image_with_blitter(struct brw_context *brw,<br>
>        return false;<br>
>     }<br>
><br>
> +   intel_miptree_get_image_offset(src_mt, src_level, src_z,<br>
> +                                  &src_image_x, &src_image_y);<br>
> +<br>
>     if (_mesa_is_format_compressed(src_mt->format)) {<br>
>        _mesa_get_format_block_size(src_mt->format, &bw, &bh);<br>
><br>
> @@ -83,10 +87,21 @@ copy_image_with_blitter(struct brw_context *brw,<br>
>        src_width /= (int)bw;<br>
>        src_height /= (int)bh;<br>
><br>
> +      /* Inside of the miptree, the x offsets are storred in pixels while<br>
<br>
</div></div>"stored" (the line above and below)<br>
<div><div class="h5"><br>
> +       * the y offsets are storred in blocks.  We need to scale just the x<br>
> +       * offset.<br>
> +       */<br>
> +      src_image_x /= bw;<br>
> +<br>
>        cpp = _mesa_get_format_bytes(src_mt->format);<br>
>     } else {<br>
>        cpp = src_mt->cpp;<br>
>     }<br>
> +   src_x += src_image_x;<br>
> +   src_y += src_image_y;<br>
> +<br>
> +   intel_miptree_get_image_offset(dst_mt, dst_level, dst_z,<br>
> +                                  &dst_image_x, &dst_image_y);<br>
><br>
>     if (_mesa_is_format_compressed(dst_mt->format)) {<br>
>        _mesa_get_format_block_size(dst_mt->format, &bw, &bh);<br>
> @@ -96,17 +111,13 @@ copy_image_with_blitter(struct brw_context *brw,<br>
><br>
>        dst_x /= (int)bw;<br>
>        dst_y /= (int)bh;<br>
> -   }<br>
><br>
> -   uint32_t src_image_x, src_image_y;<br>
> -   intel_miptree_get_image_offset(src_mt, src_level, src_z,<br>
> -                                  &src_image_x, &src_image_y);<br>
> -   src_x += src_image_x;<br>
> -   src_y += src_image_y;<br>
> -<br>
> -   uint32_t dst_image_x, dst_image_y;<br>
> -   intel_miptree_get_image_offset(dst_mt, dst_level, dst_z,<br>
> -                                  &dst_image_x, &dst_image_y);<br>
> +      /* Inside of the miptree, the x offsets are storred in pixels while<br>
> +       * the y offsets are storred in blocks.  We need to scale just the x<br>
<br>
</div></div>"stored" (the line above and below)<br>
<br>
All of these patches look like legitimate bug fixes. There needs to be<br>
a Bugzilla: ... tag for bug 82804 (and presumably 83036 as well?) and<br>
some Cc: mesa-stable tags.<br></blockquote><div><br></div><div>Yeah, doesn't fix 83036.  There are some subtests there that fail but that's not because of problems in CopyImageSubData but because of precision loss in GetTexImage.  I haven't gotten around to fixing GetTexImage yet; one of these days...<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
With those typos fixed and the appropriate tags added, the series is<br>
<br>
Reviewed-by: Matt Turner <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>><br>
</blockquote></div><br></div><div class="gmail_extra">Pushed, thanks.<br></div><div class="gmail_extra">--Jason<br></div></div>