Skip to content

nir: Lower fquantize2f16

Alyssa Rosenzweig requested to merge alyssa/mesa:nir/lower-fquantize into main

What does this MR do and why?

nir: Lower fquantize2f16

Passes dEQP-VK.spirv_assembly.opquantize.

Unlike the DXIL lowering, this should correctly handle NaNs. (I belive Dozen has a bug here that is masked by running constant folding early and poor CTS coverage.) It is also faster than the DXIL lowering for hardware that supports f2f16 conversions natively. It is not as good as a backend implementation that could flush-to-zero in hardware... but for a debug instruction it should be more than good enough.

Signed-off-by: Alyssa Rosenzweig alyssa@rosenzweig.io

Edited by Yonggang Luo

Merge request reports