OSDN Git Service

Implement GL_MAX_PROGRAM_TEXEL_OFFSET and GL_MAX_TEXTURE_LOD_BIAS
[android-x86/external-swiftshader.git] / src / Renderer / Sampler.cpp
index 24734da..60f5e35 100644 (file)
@@ -72,7 +72,7 @@ namespace sw
 
                texture.baseLevel = 0;
                texture.maxLevel = 1000;
-               texture.maxLod = MIPMAP_LEVELS - 2;     // Trilinear accesses lod+1
+               texture.maxLod = MAX_TEXTURE_LOD;
                texture.minLod = 0;
        }
 
@@ -344,12 +344,12 @@ namespace sw
 
        void Sampler::setMinLod(float minLod)
        {
-               texture.minLod = clamp(minLod, 0.0f, (float)(MIPMAP_LEVELS - 2));
+               texture.minLod = clamp(minLod, 0.0f, (float)(MAX_TEXTURE_LOD));
        }
 
        void Sampler::setMaxLod(float maxLod)
        {
-               texture.maxLod = clamp(maxLod, 0.0f, (float)(MIPMAP_LEVELS - 2));
+               texture.maxLod = clamp(maxLod, 0.0f, (float)(MAX_TEXTURE_LOD));
        }
 
        void Sampler::setFilterQuality(FilterType maximumFilterQuality)