summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_sampler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/util/u_sampler.c')
-rw-r--r--src/gallium/auxiliary/util/u_sampler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_sampler.c b/src/gallium/auxiliary/util/u_sampler.c
index 08cf1fcf223..4d8f861ce49 100644
--- a/src/gallium/auxiliary/util/u_sampler.c
+++ b/src/gallium/auxiliary/util/u_sampler.c
@@ -41,7 +41,7 @@ default_template(struct pipe_sampler_view *view,
view->format = format;
view->first_level = 0;
- view->num_levels = texture->last_level + 1;
+ view->last_level = texture->last_level;
view->swizzle_r = PIPE_SWIZZLE_RED;
view->swizzle_g = PIPE_SWIZZLE_GREEN;
view->swizzle_b = PIPE_SWIZZLE_BLUE;