From: Dave Airlie Date: Sat, 14 Jun 2014 01:04:22 +0000 (+0200) Subject: st/mesa: handle array textures in st_texture_image_copy X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c530282bbc5e235bee11f3d253d1bda20f5b98ba;p=mesa.git st/mesa: handle array textures in st_texture_image_copy Marek: also handle cube arrays Signed-off-by: Marek Olšák Reviewed-by: Roland Scheidegger --- diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index 92035e8016e..c1488214220 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 */