intel: Many changes to loop flow control and discard instructions (some radeonsi changes too)
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
asterminate
. Previously it was treated a blending ofterminate
anddemote
to get both correct derivatives and correct termination of loops. -
Replace uses of
discard_if
orterminate_if
condition with the constantfalse
. -
Don't merge a predicated
BREAK
with aWHILE
if the loop also has aCONT
instruction. Without the previous commits, this change hurts some shaders on i965 but not on Iris due toPIPE_SHADER_CAP_TGSI_CONT_SUPPORTED
being false. Making it true, even with the rest of this series, is not good.☹