[Mesa-dev] swizzling in llvmpipe [was: other stuff]
Luca Barbieri
luca at luca-barbieri.com
Wed Sep 1 11:54:32 PDT 2010
> It still sounds that you're referring to sampling from a texture and not
> rendering/blending to it. Of course the are related (we only want one
> swizzled layout at most), but the current swizzled layout was chosen to
> make blending easy; and not to make texture sampling easy.
>
> No SoA swizzled layout makes texture sampling easier or more efficient.
Yes, I incorrectly assumed that sampling were performed using the
swizzled SoA layout too, which is indeed not the case and probably
would be a bad idea.
Perhaps always keeping the texture in a linear layout and converting
before/after processing tiles could be an option? It seems the current
code can do this, but only does in some cases (not totally sure).
That would even allow to keep the tiles in a SoA floating point layout
without any significant RAM usage disadvantage.
This may perhaps be faster than the current scheme, since you don't
have to do format conversions during rendering (but you get a larger
cache footprint, and need to clamp anyway for correctness before and
after blending).
More information about the mesa-dev
mailing list