Mesa (master): st/mesa: handle array textures in st_texture_image_copy
Marek Olšák
mareko at kemper.freedesktop.org
Wed Jun 18 23:24:41 UTC 2014
Module: Mesa
Branch: master
Commit: c530282bbc5e235bee11f3d253d1bda20f5b98ba
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c530282bbc5e235bee11f3d253d1bda20f5b98ba
Author: Dave Airlie <airlied at redhat.com>
Date: Sat Jun 14 03:04:22 2014 +0200
st/mesa: handle array textures in st_texture_image_copy
Marek: also handle cube arrays
Signed-off-by: Marek Olšák <marek.olsak at amd.com>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
---
src/mesa/state_tracker/st_texture.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index 92035e8..c148821 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -394,6 +394,14 @@ st_texture_image_copy(struct pipe_context *pipe,
src_box.width = width;
src_box.height = height;
src_box.depth = 1;
+
+ if (src->target == PIPE_TEXTURE_1D_ARRAY ||
+ src->target == PIPE_TEXTURE_2D_ARRAY ||
+ src->target == PIPE_TEXTURE_CUBE_ARRAY) {
+ face = 0;
+ depth = src->array_size;
+ }
+
/* Loop over 3D image slices */
/* could (and probably should) use "true" 3d box here -
but drivers can't quite handle it yet */
More information about the mesa-commit
mailing list