[Mesa-dev] [PATCH 1/7] i965: Account for MinLayer in CopyImageSubData's blitter/CPU paths.

Ilia Mirkin imirkin at alum.mit.edu
Sat May 21 03:57:32 UTC 2016


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?
On May 20, 2016 9:36 PM, "Kenneth Graunke" <kenneth at whitecape.org> wrote:

Fixes Piglit's arb_copy_image-texview test with the Meta path disabled
(so we hit the blitter/CPU fallback paths).

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/intel_copy_image.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/intel_copy_image.c
b/src/mesa/drivers/dri/i965/intel_copy_image.c
index ccb82b6..0e72672 100644
--- a/src/mesa/drivers/dri/i965/intel_copy_image.c
+++ b/src/mesa/drivers/dri/i965/intel_copy_image.c
@@ -250,6 +250,8 @@ intel_copy_image_sub_data(struct gl_context *ctx,
       /* Cube maps actually have different images per face */
       if (src_image->TexObject->Target == GL_TEXTURE_CUBE_MAP)
          src_z = src_image->Face;
+      else
+         src_z += src_image->TexObject->MinLayer;
    } else {
       src_level = 0;
    }
@@ -260,6 +262,8 @@ intel_copy_image_sub_data(struct gl_context *ctx,
       /* Cube maps actually have different images per face */
       if (dst_image->TexObject->Target == GL_TEXTURE_CUBE_MAP)
          dst_z = dst_image->Face;
+      else
+         dst_z += dst_image->TexObject->MinLayer;
    } else {
       dst_level = 0;
    }
--
2.8.2

_______________________________________________
mesa-dev mailing list
mesa-dev at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160520/92d18f12/attachment.html>


More information about the mesa-dev mailing list