summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-06-04 10:35:26 -0700
committerEric Anholt <eric@anholt.net>2013-06-17 15:43:23 -0700
commiteb2021507556633cd6ba64cda26653e3c43e80df (patch)
treed22d78a8e4f907b145ec5cdd44e3d45b1009a38a /src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
parent746b57ef0e5625ec4081fdf856e99b29f71e4cf3 (diff)
downloadexternal_mesa3d-eb2021507556633cd6ba64cda26653e3c43e80df.zip
external_mesa3d-eb2021507556633cd6ba64cda26653e3c43e80df.tar.gz
external_mesa3d-eb2021507556633cd6ba64cda26653e3c43e80df.tar.bz2
intel: Allow blorp CopyTexSubImage to nonzero destination slices.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_blorp_blit.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp_blit.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
index 7b063ff..8694128 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
@@ -330,6 +330,7 @@ bool
brw_blorp_copytexsubimage(struct intel_context *intel,
struct gl_renderbuffer *src_rb,
struct gl_texture_image *dst_image,
+ int slice,
int srcX0, int srcY0,
int dstX0, int dstY0,
int width, int height)
@@ -354,12 +355,6 @@ 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.
@@ -388,7 +383,7 @@ brw_blorp_copytexsubimage(struct intel_context *intel,
brw_blorp_blit_miptrees(intel,
src_mt, src_irb->mt_level, src_irb->mt_layer,
- dst_mt, dst_image->Level, dst_image->Face,
+ dst_mt, dst_image->Level, dst_image->Face + slice,
srcX0, srcY0, srcX1, srcY1,
dstX0, dstY0, dstX1, dstY1,
false, mirror_y);
@@ -411,7 +406,8 @@ brw_blorp_copytexsubimage(struct intel_context *intel,
if (src_mt != dst_mt) {
brw_blorp_blit_miptrees(intel,
src_mt, src_irb->mt_level, src_irb->mt_layer,
- dst_mt, dst_image->Level, dst_image->Face,
+ dst_mt, dst_image->Level,
+ dst_image->Face + slice,
srcX0, srcY0, srcX1, srcY1,
dstX0, dstY0, dstX1, dstY1,
false, mirror_y);