diff options
author | Marek Olšák <[email protected]> | 2012-12-20 15:15:15 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-01-04 14:06:28 +0100 |
commit | ed86809ac9fe47c07be13ff0b998137f5f687635 (patch) | |
tree | c933882ac3943f984b54cc50dfda1a1ca0beff7e /src/mesa/state_tracker/st_texture.c | |
parent | 85cb4f299d8a0a0ebc8fe14d0ccd327375eda99e (diff) |
st/mesa: fix CopyTexSubImage fallback for 1D array textures
- We should use a 3D transfer of size Width x 1 x NumLayers.
- We should use layer_stride instead of stride.
(even though they are likely to be equal with 1D array textures)
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_texture.c')
-rw-r--r-- | src/mesa/state_tracker/st_texture.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index 5a4dcaab229..ee4d7622d27 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -232,8 +232,9 @@ st_texture_match_image(const struct pipe_resource *pt, */ GLubyte * st_texture_image_map(struct st_context *st, struct st_texture_image *stImage, - GLuint zoffset, enum pipe_transfer_usage usage, - GLuint x, GLuint y, GLuint w, GLuint h) + enum pipe_transfer_usage usage, + GLuint x, GLuint y, GLuint z, + GLuint w, GLuint h, GLuint d) { struct st_texture_object *stObj = st_texture_object(stImage->base.TexObject); @@ -249,9 +250,9 @@ st_texture_image_map(struct st_context *st, struct st_texture_image *stImage, else level = stImage->base.Level; - return pipe_transfer_map(st->pipe, stImage->pt, level, - stImage->base.Face + zoffset, - usage, x, y, w, h, &stImage->transfer); + return pipe_transfer_map_3d(st->pipe, stImage->pt, level, usage, + x, y, z + stImage->base.Face, + w, h, d, &stImage->transfer); } |