summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2014-12-02 22:18:30 +0100
committerEmil Velikov <[email protected]>2015-01-22 23:41:08 +0000
commitc159b4095c800486827d75125c0a74daafc7e583 (patch)
tree43767916386447a0361386de8efb927154e94248 /src/gallium/state_trackers
parentb80b5b35a3798ef804262475379160591e4f7d57 (diff)
st/nine: NineBaseTexture9: fix setting of last_layer
Use same similar settings as u_sampler_view_default_template Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: David Heidelberg <[email protected]> Signed-off-by: Axel Davy <[email protected]> Cc: "10.4" <[email protected]> (cherry picked from commit 18c7e702262425759cafddf7cc6d58543d97d7b3)
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/nine/basetexture9.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/nine/basetexture9.c b/src/gallium/state_trackers/nine/basetexture9.c
index 12da1e07616..af4778b35c1 100644
--- a/src/gallium/state_trackers/nine/basetexture9.c
+++ b/src/gallium/state_trackers/nine/basetexture9.c
@@ -480,8 +480,8 @@ NineBaseTexture9_UpdateSamplerView( struct NineBaseTexture9 *This,
templ.format = sRGB ? util_format_srgb(resource->format) : resource->format;
templ.u.tex.first_layer = 0;
- templ.u.tex.last_layer = (resource->target == PIPE_TEXTURE_CUBE) ?
- 5 : (This->base.info.depth0 - 1);
+ templ.u.tex.last_layer = resource->target == PIPE_TEXTURE_3D ?
+ resource->depth0 - 1 : resource->array_size - 1;
templ.u.tex.first_level = 0;
templ.u.tex.last_level = resource->last_level;
templ.swizzle_r = swizzle[0];