[Mesa-dev] [PATCH 08/53] st/nine: NineBaseTexture9: fix setting of last_layer
Axel Davy
axel.davy at ens.fr
Wed Jan 7 08:36:18 PST 2015
Use same similar settings as u_sampler_view_default_template
Reviewed-by: David Heidelberg <david at ixit.cz>
Signed-off-by: Axel Davy <axel.davy at ens.fr>
Cc: "10.4" <mesa-stable at lists.freedesktop.org>
---
src/gallium/state_trackers/nine/basetexture9.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/state_trackers/nine/basetexture9.c b/src/gallium/state_trackers/nine/basetexture9.c
index 12da1e0..af4778b 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];
--
2.1.3
More information about the mesa-dev
mailing list