diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_sampler.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nv50/nv50_tex.c | 2 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_state.h | 2 |
3 files changed, 3 insertions, 3 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; diff --git a/src/gallium/drivers/nv50/nv50_tex.c b/src/gallium/drivers/nv50/nv50_tex.c index c5029bad2d8..7ed73eac50f 100644 --- a/src/gallium/drivers/nv50/nv50_tex.c +++ b/src/gallium/drivers/nv50/nv50_tex.c @@ -152,7 +152,7 @@ nv50_tex_construct(struct nv50_sampler_view *view) tic[6] = 0x03000000; - tic[7] = (view->pipe.num_levels - view->pipe.first_level - 1) << 4; + tic[7] = (view->pipe.last_level - view->pipe.first_level) << 4; tic[7] |= view->pipe.first_level; return TRUE; diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 3c7c0a5261c..11072407d93 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -309,7 +309,7 @@ struct pipe_sampler_view struct pipe_texture *texture; /**< texture into which this is a view */ struct pipe_context *context; /**< context this view belongs to */ unsigned first_level:8; /**< first mipmap level */ - unsigned num_levels:8; /**< number of mipamp levels */ + unsigned last_level:8; /**< last mipmap level */ unsigned swizzle_r:3; /**< PIPE_SWIZZLE_x for red component */ unsigned swizzle_g:3; /**< PIPE_SWIZZLE_x for green component */ unsigned swizzle_b:3; /**< PIPE_SWIZZLE_x for blue component */ |