<div dir="ltr">There needs to be some corresponding Piglit test to guarantee that skip pixels is really a problem here.  Otherwise, I'm flying blind trying to fix it.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 20, 2015 at 5:04 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This is mostly correct and it's a good solution.  The only problem is that it doesn't handle the skipRows packing property properly.  This property tells the driver the stride (in rows) between image planes in the data.  Most of the places where depth is used below, we should be using the stride (in rows) between images.  Look at the _mesa_get_image_stride familiy of functions to see exactly how to handle this.  <br><div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Feb 20, 2015 at 4:30 PM, Laura Ekstrand <span dir="ltr"><<a href="mailto:laura@jlekstrand.net" target="_blank">laura@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Changes PBO uploads and downloads to use a tall (height * depth) 2D texture<br>
for blitting.  This fixes the bug where 2D_ARRAY, 3D, and CUBE_MAP_ARRAY<br>
textures are not properly uploaded and downloaded.<br>
---<br>
 src/mesa/drivers/common/meta_tex_subimage.c | 6 +++---<br>
 1 file changed, 3 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c<br>
index f4f7716..ee3295b 100644<br>
--- a/src/mesa/drivers/common/meta_tex_subimage.c<br>
+++ b/src/mesa/drivers/common/meta_tex_subimage.c<br>
@@ -110,7 +110,7 @@ create_texture_for_pbo(struct gl_context *ctx, bool create_pbo,<br>
    internal_format = _mesa_get_format_base_format(pbo_format);<br>
<br>
    tex_image = _mesa_get_tex_image(ctx, tex_obj, tex_obj->Target, 0);<br>
-   _mesa_init_teximage_fields(ctx, tex_image, width, height, depth,<br>
+   _mesa_init_teximage_fields(ctx, tex_image, width, height * depth, 1,<br>
                               0, internal_format, pbo_format);<br></blockquote></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
<br>
    read_only = pbo_target == GL_PIXEL_UNPACK_BUFFER;<br>
@@ -227,7 +227,7 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,<br>
       _mesa_update_state(ctx);<br>
<br>
       _mesa_meta_BlitFramebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer,<br>
-                                 0, 0, width, height,<br>
+                                 0, z * height, width, (z + 1) * height,<br>
                                  xoffset, yoffset,<br>
                                  xoffset + width, yoffset + height,<br>
                                  GL_COLOR_BUFFER_BIT, GL_NEAREST);<br>
@@ -349,7 +349,7 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims,<br>
       _mesa_meta_BlitFramebuffer(ctx, ctx->ReadBuffer, ctx->DrawBuffer,<br>
                                  xoffset, yoffset,<br>
                                  xoffset + width, yoffset + height,<br>
-                                 0, 0, width, height,<br>
+                                 0, z * height, width, (z + 1) * height,<br>
                                  GL_COLOR_BUFFER_BIT, GL_NEAREST);<br>
    }<br>
</div></div><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><br>
--<br>
2.1.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></font></span></blockquote></div><br></div></div></div>
</blockquote></div><br></div>