r600g: Implement GL_ARB_texture_gather
[mesa.git] / src / mesa / state_tracker / st_atom_sampler.c
index 3929251f83ae53b8015c5230d5321d981dd8cfa4..17b536bf504425db4c383f8ba45e75c3f84f3250 100644 (file)
@@ -160,11 +160,8 @@ convert_sampler(struct st_context *st,
 
    sampler->lod_bias = ctx->Texture.Unit[texUnit].LodBias + msamp->LodBias;
 
-   sampler->min_lod = CLAMP(msamp->MinLod,
-                            0.0f,
-                            (GLfloat) texobj->MaxLevel - texobj->BaseLevel);
-   sampler->max_lod = MIN2((GLfloat) texobj->MaxLevel - texobj->BaseLevel,
-                           msamp->MaxLod);
+   sampler->min_lod = MAX2(msamp->MinLod, 0.0f);
+   sampler->max_lod = msamp->MaxLod;
    if (sampler->max_lod < sampler->min_lod) {
       /* The GL spec doesn't seem to specify what to do in this case.
        * Swap the values.