diff options
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]; |