Skip to content

nir: add nir_[fui]gt_imm and nir_[fui]le_imm helpers

Erik Faye-Lund requested to merge kusma/mesa:nir-gen_cmp_imm_helpers-next into main

These are similar to the nir_{cmp}_imm variants we already have, except they negate the condition (apart from equality) and flip the arguments. reason we need this, is that we don't have all comparison directions that would be required to always pass the immediate in the second argument.

This allows us to create any comparison with an immediate without having to manually create the immediate value.

This is a follow-up to !23393 (merged), and was suggested by @jenatali.

Edited by Erik Faye-Lund

Merge request reports