mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
nak: Fix pre-volta iadd3 panic during compilation
Commit431a9508a0added an optimization that inserts a NIR iadd3 instruction, this is not supported in GPUs before volta, thus when translating NIR into NAK IR the builder would panic. This commits adds a simple check that disables the optimizations on pre-volta GPUs. Fixes:431a9508a0("nak: copy late_algebraic iadd3 rules without the constant restriction") Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36588>
This commit is contained in:
parent
fc8a734849
commit
6383050826
1 changed files with 4 additions and 2 deletions
|
|
@ -40,8 +40,10 @@ algebraic_lowering = [
|
|||
(('umax', 'a', 'b'), ('bcsel', ('ult', a, b), b, a), volta),
|
||||
(('iadd', 'a@64', ('ineg', 'b@64')), ('isub', a, b)),
|
||||
|
||||
(('iadd', ('iadd(is_used_once)', 'a(is_not_const)', '#b'), 'c(is_not_const)'), ('iadd3', a, b, c)),
|
||||
(('iadd', ('iadd(is_used_once)', 'a(is_not_const)', 'b(is_not_const)'), '#c'), ('iadd3', a, b, c)),
|
||||
(('iadd', ('iadd(is_used_once)', 'a(is_not_const)', '#b'), 'c(is_not_const)'),
|
||||
('iadd3', a, b, c), 'options->has_iadd3'),
|
||||
(('iadd', ('iadd(is_used_once)', 'a(is_not_const)', 'b(is_not_const)'), '#c'),
|
||||
('iadd3', a, b, c), 'options->has_iadd3'),
|
||||
|
||||
(('iadd(is_used_by_non_ldc_nv)', 'a@32', ('ishl', 'b@32', '#s@32')),
|
||||
('lea_nv', a, b, s), 'nak->sm >= 70'),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue