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

Kenneth Graunke kenneth at whitecape.org
Sat May 21 01:35:45 UTC 2016


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



More information about the mesa-dev mailing list