Skip to content

intel: Many changes to loop flow control and discard instructions (some radeonsi changes too)

Ian Romanick requested to merge idr/mesa:review/issue-4213 into main

Lots of flow control changes for Intel compilers.

  • Enable the glsl_correct_derivatives_after_discard option.

  • Using existing NIR lowering passes and making changes to the compiler backend, treat discard as terminate. Previously it was treated a blending of terminate and demote to get both correct derivatives and correct termination of loops.

  • Replace uses of discard_if or terminate_if condition with the constant false.

  • Don't merge a predicated BREAK with a WHILE if the loop also has a CONT instruction. Without the previous commits, this change hurts some shaders on i965 but not on Iris due to PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED being false. Making it true, even with the rest of this series, is not good.

Edited by Ian Romanick

Merge request reports