diff options
author | Ilia Mirkin <[email protected]> | 2014-08-20 02:12:10 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2014-09-12 00:55:26 -0400 |
commit | d82bd7eb060cf2fbb7282da38f28f6e7ea705e12 (patch) | |
tree | f6c7be6a7695db33e4ed6e95bae9ce56a1abaf0e /src/mesa/state_tracker/st_texture.c | |
parent | c113095acdcfedb4ad82da67bc7981056efe9e44 (diff) |
mesa/st: add ARB_texture_view support
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_texture.c')
-rw-r--r-- | src/mesa/state_tracker/st_texture.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index af9b7675f10..c84aa4566b2 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -260,6 +260,12 @@ st_texture_image_map(struct st_context *st, struct st_texture_image *stImage, else level = stImage->base.Level; + if (stObj->base.Immutable) { + level += stObj->base.MinLevel; + z += stObj->base.MinLayer; + d = MIN2(d, stObj->base.NumLayers); + } + z += stImage->base.Face; map = pipe_transfer_map_3d(st->pipe, stImage->pt, level, usage, @@ -289,8 +295,13 @@ st_texture_image_unmap(struct st_context *st, struct st_texture_image *stImage, unsigned slice) { struct pipe_context *pipe = st->pipe; - struct pipe_transfer **transfer = - &stImage->transfer[slice + stImage->base.Face].transfer; + struct st_texture_object *stObj = + st_texture_object(stImage->base.TexObject); + struct pipe_transfer **transfer; + + if (stObj->base.Immutable) + slice += stObj->base.MinLayer; + transfer = &stImage->transfer[slice + stImage->base.Face].transfer; DBG("%s\n", __FUNCTION__); |