- /* Set BaseMipLevel, MaxLOD, MinLOD:
- *
- * XXX: I don't think that using firstLevel, lastLevel works,
- * because we always setup the surface state as if firstLevel ==
- * level zero. Probably have to subtract firstLevel from each of
- * these:
- */
- sampler->ss0.base_level = U_FIXED(0, 1);
+ int baselevel = texObj->BaseLevel - intel_image->mt->first_level;
+ sampler->ss0.base_level = U_FIXED(baselevel, 1);