st/mesa: optimize DEPTH_STENCIL copies using fragment shader
[mesa.git] / src / mesa / swrast / s_texfilter.c
index 7f1354785a4d9e783b0935ebe2f2ba8e8ca99c8d..28bd57be8a10d11ce73ddd8ef1714103bfe4ecee 100644 (file)
@@ -1961,7 +1961,7 @@ sample_lambda_2d_aniso(struct gl_context *ctx,
       /* note: we need to have Pmin=sqrt(Pmin2) here, but we can avoid
        * this since 0.5*log(x) = log(sqrt(x))
        */
-      lod = 0.5f * util_fast_log2(Pmin2);
+      lod = 0.5f * log2f(Pmin2);
 
       if (adjustLOD) {
          /* from swrast/s_texcombine.c _swrast_texture_span */
@@ -3712,7 +3712,8 @@ _swrast_choose_texture_sample_func( struct gl_context *ctx,
                                    const struct gl_texture_object *t,
                                     const struct gl_sampler_object *sampler)
 {
-   if (!t || !_mesa_is_texture_complete(t, sampler)) {
+   if (!t || !_mesa_is_texture_complete(t, sampler,
+                                        ctx->Const.ForceIntegerTexNearest)) {
       return null_sample_func;
    }
    else {