Skip to content

lima: enable z16 format

Erico Nunes requested to merge enunes/mesa:lima-format-z16 into main

Other than listing the format as supported, an extra detail is to unset one bit in the render state depth_test when a z16 texture needs to be reloaded before rendering, following the mali blob behavior. Otherwise, the z16 reload doesn't work.

No regressions with deqp and piglit.

The impact of the z16 texture can be tested with glmark2. The 'shadow' scene at 1920x1080 jumps from 55 to 77 fps with lima on my system when a z16 texture is used instead of the z24s8 one. This test requires a tweak in glmark2 to use the GL_UNSIGNED_SHORT type while allocating the depth texture, since glmark2 asks for type GL_UNSIGNED_INT which causes mesa to choose z24s8 by default (not the ARM mali driver, which seems to choose z16 anyway even with GL_UNSIGNED_INT).

Merge request reports