st/nine: NineBaseTexture9: fix setting of last_layer
Use same similar settings as u_sampler_view_default_template Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: David Heidelberg <david@ixit.cz> Signed-off-by: Axel Davy <axel.davy@ens.fr> Cc: "10.4" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user