Skip to content

lima: use hardware y coord flipping

Erico Nunes requested to merge enunes/mesa:lima-flip-y into main

Handling y coord flipping with the wpos_ytransform pass adds some additional instructions that can have a performance hit on the Mali-4xx, so skip this and use the hardware funcitonality for y flipping. This overall reduces shader size and improves performance in programs that uses gl_FragCoord. It also removes the requirement of a lowering pass to double-negate fddx and fddy and may fix some corner case bugs with those operations. It also allows us to simplify the fddx and fddy ppir lowering pass.

This does not affect any tests but a reasonable performance increase can be seen in some glmark2 benchmarks such as "conditionals" and "loop" which use gl_FragCoord.

This implementation needs some plumbing in gallium to pass the flip_y information to the backend, I couldn't find another available parameter to use to control enabling it or not.

Edited by Erico Nunes

Merge request reports