Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4852>
static const nir_shader_compiler_options midgard_nir_options = {
.lower_ffma = true,
- .lower_sub = true,
.lower_scmp = true,
.lower_flrp16 = true,
.lower_flrp32 = true,
(('ineg', a), ('isub', 0, a)),
+ # Likewise we want fsub lowered but not isub
+ (('fsub', a, b), ('fadd', a, ('fneg', b))),
+
# These two special-cases save space/an op than the actual csel op +
# scheduler flexibility