X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Futil%2Fu_sampler.c;h=bb26099b7e15febdb349ac1223abe3d62b3b5c90;hb=2a456dc123e8263de8e4666890a34f403faa9a39;hp=e77f562ea222a2cec01a2f38636d14acad873b3d;hpb=0203136e69bfa711edd69a4f69c4539cd877b5cb;p=mesa.git diff --git a/src/gallium/auxiliary/util/u_sampler.c b/src/gallium/auxiliary/util/u_sampler.c index e77f562ea22..bb26099b7e1 100644 --- a/src/gallium/auxiliary/util/u_sampler.c +++ b/src/gallium/auxiliary/util/u_sampler.c @@ -40,8 +40,11 @@ default_template(struct pipe_sampler_view *view, */ view->format = format; - view->first_level = 0; - view->last_level = texture->last_level; + view->u.tex.first_level = 0; + view->u.tex.last_level = texture->last_level; + view->u.tex.first_layer = 0; + view->u.tex.last_layer = texture->target == PIPE_TEXTURE_3D ? + texture->depth0 - 1 : texture->array_size - 1; view->swizzle_r = PIPE_SWIZZLE_RED; view->swizzle_g = PIPE_SWIZZLE_GREEN; view->swizzle_b = PIPE_SWIZZLE_BLUE;