nir: Don't optimize to 64 bit fsub if the driver doesn't support it
Fixes: a4840e15ab
r600: Use nir-to-tgsi instead of TGSI when the NIR debug opt is disabled.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16130>
This commit is contained in:
@@ -2556,7 +2556,11 @@ late_optimizations = [
|
||||
(('~fadd@32', ('fmulz', a, b), c), ('ffmaz', a, b, c), 'options->fuse_ffma32'),
|
||||
|
||||
# Subtractions get lowered during optimization, so we need to recombine them
|
||||
(('fadd', a, ('fneg', 'b')), ('fsub', 'a', 'b'), 'options->has_fsub'),
|
||||
(('fadd@8', a, ('fneg', 'b')), ('fsub', 'a', 'b'), 'options->has_fsub'),
|
||||
(('fadd@16', a, ('fneg', 'b')), ('fsub', 'a', 'b'), 'options->has_fsub'),
|
||||
(('fadd@32', a, ('fneg', 'b')), ('fsub', 'a', 'b'), 'options->has_fsub'),
|
||||
(('fadd@64', a, ('fneg', 'b')), ('fsub', 'a', 'b'), 'options->has_fsub && !(options->lower_doubles_options & nir_lower_dsub)'),
|
||||
|
||||
(('fneg', a), ('fmul', a, -1.0), 'options->lower_fneg'),
|
||||
(('iadd', a, ('ineg', 'b')), ('isub', 'a', 'b'), 'options->has_isub || options->lower_ineg'),
|
||||
(('ineg', a), ('isub', 0, a), 'options->lower_ineg'),
|
||||
|
Reference in New Issue
Block a user