[Mesa-dev] [PATCH] lp_build_lod_selector: Disable brilinear folding on explicit lod.

Olivier Galibert galibert at pobox.com
Mon Jun 25 12:05:52 PDT 2012


On Mon, Jun 25, 2012 at 11:40:08AM -0700, Jose Fonseca wrote:
> My thoughts too.
> 
> Brilinear filtering provides a significant boost, and I don't see why skip the optimization for explicit lod over implicit lods.

Warning: code misread :-)

Explicit lod does not need brilinear filtering because explicit lod is
post log2.  Brilinear is only about a faster log2, nothing else.
Explicit lod only needs the integer/fractional part separation.

The whole code is:
   if (mip_filter == PIPE_TEX_MIPFILTER_LINEAR) {
      if (!explicit_lod && !(gallivm_debug & GALLIVM_DEBUG_NO_BRILINEAR)) {
         lp_build_brilinear_lod(float_bld, lod, BRILINEAR_FACTOR,
                                out_lod_ipart, out_lod_fpart);
      }
      else {
         lp_build_ifloor_fract(float_bld, lod, out_lod_ipart, out_lod_fpart);
      }

      lp_build_name(*out_lod_fpart, "lod_fpart");
   }
   else {
      *out_lod_ipart = lp_build_iround(float_bld, lod);
   }

and you're not going to tell me that lp_build_brilinear_lod is faster
than lp_build_ifloor_fract (especially since it includes it ;-)

  OG.



More information about the mesa-dev mailing list