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

Jose Fonseca jfonseca at vmware.com
Mon Jun 25 11:40:08 PDT 2012


My thoughts too.

Brilinear filtering provides a significant boost, and I don't see why skip the optimization for explicit lod over implicit lods.

We could make llvmpipe brilinear filtering conditional -- only do it when the mipmap levels are proper minifications (as opposed to totally different colors), so that behaviour on weird usage (and tests) is unaltered.

We could also have an environment variable LP_CORRECTNESS_OVER_PERFORMANCE...

Jose

----- Original Message -----
> Does this fix the test because lp_build_brilinear_lod produces bogus
> values in this case or just because the test is strict about such
> filtering optimizations? In the latter case I'm not sure I really see
> much point.
> I'm surprised it can actually pass in either case since we drop all
> but
> the first lod per quad values on the floor anyway so I think you will
> get neither the right filtering weights between mipmaps nor even the
> right mip levels (if the integer part of the lod isn't the same) for
> anything but the first texel per quad.
> 
> Roland
> 
> On 06/25/2012 05:50 PM, Olivier Galibert wrote:
> > Brilinear folding must only be used if the log2 was computed with
> > brilinear too.  Fixes fs-textureLod-miplevels.
> >
> > Signed-off-by: Olivier Galibert <galibert at pobox.com>
> > ---
> >   src/gallium/auxiliary/gallivm/lp_bld_sample.c |    2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
> > b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
> > index d966788..9deda61 100644
> > --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
> > +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
> > @@ -513,7 +513,7 @@ lp_build_lod_selector(struct
> > lp_build_sample_context *bld,
> >      }
> >
> >      if (mip_filter == PIPE_TEX_MIPFILTER_LINEAR) {
> > -      if (!(gallivm_debug & GALLIVM_DEBUG_NO_BRILINEAR)) {
> > +      if (!explicit_lod && !(gallivm_debug &
> > GALLIVM_DEBUG_NO_BRILINEAR)) {
> >            lp_build_brilinear_lod(float_bld, lod, BRILINEAR_FACTOR,
> >                                   out_lod_ipart, out_lod_fpart);
> >         }
> >
> 
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list