[Mesa-dev] [PATCH v3 02/14] i965/miptree: Allocate HiZ up-front

Chad Versace chadversary at chromium.org
Fri Jul 14 22:22:51 UTC 2017


On Wed 12 Jul 2017, Jason Ekstrand wrote:
> HiZ, like MCS and CCS_E, can compress more than just clear colors so we
> want it turned on whenever the miptree is being used as a depth
> attachment.  It's theoretically possible for someone to create a depth
> texture, upload data with glTexSubImage2D, and texture from it without
> ever binding it as a depth target.  If this happens, we would end up
> wasting a bit of space by allocating a HiZ surface we never use.
> However, this is rather unlikely out side of test cases, so we're better
> off just allocating it up-front.
> ---

I've read of rendering techniques that use high-quality, pre-rendered
cascading shadow maps for scenes with fixed lights. And that would
trigger the glTexSubImage2D case. But, even in that case, so little
memory is wasted that I don't care.

Reviewed-by: Chad Versace <chadversary at chromium.org>


More information about the mesa-dev mailing list