[Mesa-dev] [PATCH 2/2] gallivm: add comment for bogus min/mag filter selection with nearest mip filter

Roland Scheidegger sroland at vmware.com
Wed Aug 21 10:04:41 PDT 2013


Am 21.08.2013 18:30, schrieb Jose Fonseca:
> Series looks good.
> 
> You might want to promote XXX to FIXME. Fixing wouldn't be hard --
> just need to pass some additional parameters to this function, so
> that we can check that MIN/MAG filter are same.
Ok I'll make it FIXME. I thought it would cause test failures but then
realized it did not (not for Mixed\1D case), hence not sure it's
actually worth fixing.
There's several things we could do there, but either the code will be
non-optimal or the logic gets even more complicated there.
We don't actually need the lod_ipart after calculating mip levels, so we
could pass float lod instead - but we may not have one when calculated
from rho (as is the case in that optimized case I put the comment). We
could also do the min/mag decision right there and pass that result
instead, I think though for the multiple-quad case it might generate
non-optimal code.
In fact if we have PIPE_TEX_MIPFILTER_NONE (in which case we'll only end
up there if min != mag) we could make things simpler, because we don't
need the lod_ipart at all, we ONLY need the comparison result for
min/mag (which can be trivially calculated from rho instead, no need to
calculate ilod).
So I couldn't quite decide what's best and figured it can wait, just put
a comment there so I don't forget :-).

Roland


More information about the mesa-dev mailing list