summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-06-02 16:25:03 -0700
committerPaul Berry <[email protected]>2013-06-04 09:14:44 -0700
commit2fd785d12602103a1c05fd52903bdb4ffefadaad (patch)
tree8527db4c16f5ebfa7aef58d839ff0461fcf1fcc2 /src/mesa/drivers
parent32d1f423bccb1ad7199f072d4ac09ed88b693b1f (diff)
intel: Don't try to blorp or blit CopyTexSubImage(1D_ARRAY).
Blorp and the hardware blitter can't be used to implement CopyTexSubImage when the image type is 1D_ARRAY, because of a coordinate system mismatch (the Y coordinate in the source image is supposed to be matched up to the Z coordinate in the destination texture). The hardware blitter path (intel_copy_texsubimage) contained a perf debug warning for this case, but it failed to actually fall back. The blorp path didn't even check. Fixes piglit test "copyteximage 1D_ARRAY". Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp_blit.cpp6
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_copy.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
index c70dc22330a..a6b2bbf1a65 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
@@ -347,6 +347,12 @@ brw_blorp_copytexsubimage(struct intel_context *intel,
return false;
}
+ /* We can't use blorp to copy to a 1D array texture, since it can only
+ * write to one layer of the texture at a time.
+ */
+ if (dst_mt->target == GL_TEXTURE_1D_ARRAY)
+ return false;
+
/* Source clipping shouldn't be necessary, since copytexsubimage (in
* src/mesa/main/teximage.c) calls _mesa_clip_copytexsubimage() which
* takes care of it.
diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index 363cbbd182d..d8e65baad5b 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -83,6 +83,7 @@ intel_copy_texsubimage(struct intel_context *intel,
if (intelImage->base.Base.TexObject->Target == GL_TEXTURE_1D_ARRAY ||
intelImage->base.Base.TexObject->Target == GL_TEXTURE_2D_ARRAY) {
perf_debug("no support for array textures\n");
+ return false;
}
/* glCopyTexImage (and the glBlitFramebuffer() path that reuses this)