i965: Account for MinLayer in CopyImageSubData's blitter/CPU paths.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 20 May 2016 02:20:12 +0000 (19:20 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 25 May 2016 21:17:29 +0000 (14:17 -0700)
Fixes Piglit's arb_copy_image-texview test with the Meta path disabled
(so we hit the blitter/CPU fallback paths).

v2: Add MinLayer even for cube maps (suggested by Ilia).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
src/mesa/drivers/dri/i965/intel_copy_image.c

index ccb82b64d5f360684e3196982bcfaecf181b98e1..834c1a7b569a49b37efde85046b569a0659a579f 100644 (file)
@@ -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;
+
+      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;
+
+      dst_z += dst_image->TexObject->MinLayer;
    } else {
       dst_level = 0;
    }