<p dir="ltr"><br>
On Jan 30, 2015 12:04 AM, "Iago Toral Quiroga" <<a href="mailto:itoral@igalia.com">itoral@igalia.com</a>> wrote:<br>
><br>
> For GL_TEXTURE_1D_ARRAY targets we store the depth of the array<br>
> in the Height field and leave Depth=1 in the underlying texture</p>
<p dir="ltr">*sigh* That's one of those design choices with a long history that everyone now regrets.  We really should fix it properly but it's a lot of work.</p>
<p dir="ltr">> object. When we call intel_miptree_copy_teximage in the process<br>
> of re-creating a miptree (possibily because the number of miplevels<br>
> has changed) we didn't account for this, so we where only copying<br>
> texture images for the first slice.<br>
> ---<br>
>  src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 7 ++++++-<br>
>  1 file changed, 6 insertions(+), 1 deletion(-)<br>
><br>
> Fixes the problems for GL_TEXTURE_1D_ARRAYS described here:<br>
> <a href="http://lists.freedesktop.org/archives/mesa-dev/2015-January/075264.html">http://lists.freedesktop.org/archives/mesa-dev/2015-January/075264.html</a><br>
><br>
> The GPU hang mentioned there was a different problem and seems to<br>
> be fixed since:<br>
> b52959c60 i965/tiled_memcpy: Add tiled-to-linear paths</p>
<p dir="ltr">No, that just made us stop using the glitter for some test somewhere.  This patch fixes the bug.</p>
<p dir="ltr">> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c<br>
> index 26e137d..11f1876 100644<br>
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c<br>
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c<br>
> @@ -1249,7 +1249,12 @@ intel_miptree_copy_teximage(struct brw_context *brw,<br>
>        intel_texture_object(intelImage->base.Base.TexObject);<br>
>     int level = intelImage->base.Base.Level;<br>
>     int face = intelImage->base.Base.Face;<br>
> -   GLuint depth = intelImage->base.Base.Depth;<br>
> +<br>
> +   GLuint depth;<br>
> +   if (intel_obj->base.Target == GL_TEXTURE_1D_ARRAY)<br>
> +      depth = intelImage->base.Base.Height;<br>
> +   else<br>
> +      depth = intelImage->base.Base.Depth;</p>
<p dir="ltr">Looks correct to me.<br>
Reviewed-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>></p>
<p dir="ltr">>     if (!invalidate) {<br>
>        for (int slice = 0; slice < depth; slice++) {<br>
> --<br>
> 2.1.0<br>
><br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>