diff options
author | Axel Davy <[email protected]> | 2014-12-02 22:18:30 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-01-22 22:16:18 +0000 |
commit | 18c7e702262425759cafddf7cc6d58543d97d7b3 (patch) | |
tree | 516b4aba96dd61791b1cf5a6d0c2bd1b38f807bf /src/gallium/state_trackers/nine/basetexture9.c | |
parent | 05e20e10451461a1fde3634da1eec3c1ec1b17a2 (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]>
Diffstat (limited to 'src/gallium/state_trackers/nine/basetexture9.c')
-rw-r--r-- | src/gallium/state_trackers/nine/basetexture9.c | 4 |
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]; |