<p dir="ltr">Is the else correct? What if you have, e.g., a cube view of a 2d array, starting at later 2? Don't you want to add the min layer in no matter what?</p>
<div class="gmail_quote">On May 20, 2016 9:36 PM, "Kenneth Graunke" <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Fixes Piglit's arb_copy_image-texview test with the Meta path disabled<br>
(so we hit the blitter/CPU fallback paths).<br>
<br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
src/mesa/drivers/dri/i965/intel_copy_image.c | 4 ++++<br>
1 file changed, 4 insertions(+)<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 ccb82b6..0e72672 100644<br>
--- a/src/mesa/drivers/dri/i965/intel_copy_image.c<br>
+++ b/src/mesa/drivers/dri/i965/intel_copy_image.c<br>
@@ -250,6 +250,8 @@ intel_copy_image_sub_data(struct gl_context *ctx,<br>
/* Cube maps actually have different images per face */<br>
if (src_image->TexObject->Target == GL_TEXTURE_CUBE_MAP)<br>
src_z = src_image->Face;<br>
+ else<br>
+ src_z += src_image->TexObject->MinLayer;<br>
} else {<br>
src_level = 0;<br>
}<br>
@@ -260,6 +262,8 @@ intel_copy_image_sub_data(struct gl_context *ctx,<br>
/* Cube maps actually have different images per face */<br>
if (dst_image->TexObject->Target == GL_TEXTURE_CUBE_MAP)<br>
dst_z = dst_image->Face;<br>
+ else<br>
+ dst_z += dst_image->TexObject->MinLayer;<br>
} else {<br>
dst_level = 0;<br>
}<br>
<font color="#888888">--<br>
2.8.2<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="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></blockquote></div>