Skip to content

nir/lower_shader_calls: remove empty phis

It seems the call lowering is generating phi instructions with no sources. That confuses later passes like opt_cse which end up generating invalid NIR (it incorrectly assumes that 2 phi instructions are compatible because they have no sources to compare in nir_instrs_equal(), but actually the dest bit sizes don't match).

Not being quite sure how to avoid that in the call lowering, having a cleanup pass internally to turn those phis with no sources into undefs is the easy answer.

Signed-off-by: Lionel Landwerlin lionel.g.landwerlin@intel.com Fixes: 8dfb240b ("nir: Add raytracing shader call lowering pass.")

Merge request reports