diff options
author | Brian <[email protected]> | 2007-09-28 13:49:50 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-09-28 15:39:39 -0600 |
commit | f14ece2d2c9add5ebf21171746f34ce60ff0df3b (patch) | |
tree | 432c296d54f9c7296300ceafc7e12d3dfc4ac23c /src/mesa/pipe/softpipe | |
parent | f971bdc051a4e965e036f575ca0c93b64a817761 (diff) |
Use texture->first_level, not 0, when not mipmapping.
Fixes crash when GL_BASE_LEVEL!=0.
Also, remove old assertion.
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_tex_sample.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/pipe/softpipe/sp_tex_sample.c b/src/mesa/pipe/softpipe/sp_tex_sample.c index 40d0cf40ae4..0c990294f28 100644 --- a/src/mesa/pipe/softpipe/sp_tex_sample.c +++ b/src/mesa/pipe/softpipe/sp_tex_sample.c @@ -479,10 +479,8 @@ choose_mipmap_levels(struct tgsi_sampler *sampler, { if (sampler->state->min_mip_filter == PIPE_TEX_MIPFILTER_NONE) { /* no mipmap selection needed */ - assert(sampler->state->min_img_filter == - sampler->state->mag_img_filter); *imgFilter = sampler->state->mag_img_filter; - *level0 = *level1 = 0; + *level0 = *level1 = sampler->texture->first_level; } else { float lambda; @@ -497,7 +495,7 @@ choose_mipmap_levels(struct tgsi_sampler *sampler, if (lambda < 0.0) { /* XXX threshold depends on the filter */ /* magnifying */ *imgFilter = sampler->state->mag_img_filter; - *level0 = *level1 = 0; + *level0 = *level1 = sampler->texture->first_level; } else { /* minifying */ |