diff options
author | Dave Airlie <[email protected]> | 2014-06-14 03:04:22 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-06-19 00:17:09 +0200 |
commit | c530282bbc5e235bee11f3d253d1bda20f5b98ba (patch) | |
tree | fcac1b5aa8e2f0d5cbfce2b035182bb7be0c1900 /src/mesa/state_tracker | |
parent | 6818e117ce4d9e557cf2d072de81087d76d81b57 (diff) |
st/mesa: handle array textures in st_texture_image_copy
Marek: also handle cube arrays
Signed-off-by: Marek Olšák <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_texture.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 */ |