diff options
author | Brian <[email protected]> | 2008-02-16 13:55:47 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2008-02-16 13:55:47 -0700 |
commit | 0c6bbd41bd6dc1041eaca7c907d3768d107c1afa (patch) | |
tree | 54bf7e870c110af05940ff3e58720d75d2ae4098 /src/gallium/drivers/softpipe | |
parent | 3b2a291888d8e62787de03f8529806fb562bd186 (diff) |
gallium: add missing mip level clamp
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_tex_sample.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c index a15bd43166d..c54e9d385c2 100644 --- a/src/gallium/drivers/softpipe/sp_tex_sample.c +++ b/src/gallium/drivers/softpipe/sp_tex_sample.c @@ -474,7 +474,8 @@ choose_mipmap_levels(struct tgsi_sampler *sampler, { if (sampler->state->min_mip_filter == PIPE_TEX_MIPFILTER_NONE) { /* no mipmap selection needed */ - *level0 = *level1 = (int) sampler->state->min_lod; + *level0 = *level1 = CLAMP((int) sampler->state->min_lod, + 0, (int) sampler->texture->last_level); if (sampler->state->min_img_filter != sampler->state->mag_img_filter) { /* non-mipmapped texture, but still need to determine if doing |