Some older Intel GPUs (at least Gen7.5) are not handling the requested depth buffer behavior correctly. For certain block models with overlays where the base texture is opaque, this causes Z-fighting even when the vertex positions and camera transforms are identical.
Since this only affects cases where terrain geometry is overlapping with different materials, it is not necessary to completely disable the optimization on this hardware. We can instead scan the entire block model and find the lowest common denominator between each quad, allowing for downgrading to happen when the entire block model has alpha-tested or opaque geometry only.
For the time being, it would be too much work to scan the entire block model. My patch set just disables the material downgrading functionality completely on Intel Gen8 (and older) GPUs.
Some older Intel GPUs (at least Gen7.5) are not handling the requested depth buffer behavior correctly. For certain block models with overlays where the base texture is opaque, this causes Z-fighting even when the vertex positions and camera transforms are identical.
Since this only affects cases where terrain geometry is overlapping with different materials, it is not necessary to completely disable the optimization on this hardware. We can instead scan the entire block model and find the lowest common denominator between each quad, allowing for downgrading to happen when the entire block model has alpha-tested or opaque geometry only.