[Mesa-dev] [Bug 109816] glGenerateMipmap makes deepest level far from average texel value for NPOT textures

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Mar 2 20:22:42 UTC 2019


https://bugs.freedesktop.org/show_bug.cgi?id=109816

--- Comment #1 from Roland Scheidegger <sroland at vmware.com> ---
This sounds like an interesting issue (although I'm pretty sure it doesn't
qualify as a bug).
GL states that
"The contents of the derived images are computed by repeated, filtered
reduction of the levelbase image. No particular filter algorithm is required,
though a box filter is recommended as the default filter."

I believe this is generally how all drivers in mesa implement this (they don't
all use the same helpers for it, but I think all end up in a blit with bilinear
filter essentially).

But you are quite right that the results won't be all that great for npot
textures - not even all src texels will be actually considered in the filter
(e.g. from a 3x3 to a 1x1 mipmap, only 4 of the 9 texels will actually be
used).

So presumably a different (more complex, maybe bicubic or even more advanced
one) filter used for generating npot mipmaps, at least for mips which round the
size down from the next higher up level, could give better results.

I have no idea though what kind of filter nvidia uses (and I would not be
surprised if other non-mesa blob drivers also simply use bilinear filtering).

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190302/3e6d676c/attachment.html>


More information about the mesa-dev mailing list