mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-18 17:00:32 +01:00
nir/opt_algebraic: Optimize d3d9 pow with fmulz.
Foz-DB Navi21: Totals from 69 (0.05% of 134913) affected shaders: CodeSize: 255684 -> 253788 (-0.74%); split: -0.74%, +0.00% Instrs: 46307 -> 46052 (-0.55%); split: -0.55%, +0.00% Latency: 533255 -> 530742 (-0.47%); split: -0.48%, +0.01% InvThroughput: 110001 -> 109156 (-0.77%) VClause: 839 -> 844 (+0.60%); split: -1.19%, +1.79% SClause: 1411 -> 1395 (-1.13%) Copies: 1828 -> 1816 (-0.66%); split: -1.09%, +0.44% PreSGPRs: 2243 -> 2232 (-0.49%) PreVGPRs: 2213 -> 2192 (-0.95%) Signed-off-by: Georg Lehmann <dadschoorse@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18145>
This commit is contained in:
parent
9c2c47884d
commit
6eb4dfca23
1 changed files with 5 additions and 0 deletions
|
|
@ -276,6 +276,11 @@ optimizations = [
|
|||
('ffmaz', a, b, c), 'options->has_fmulz && !'+signed_zero_inf_nan_preserve_32),
|
||||
(('ffma@32', a, ('bcsel', ignore_exact('feq', a, 0.0), 0.0, '#b(is_not_const_zero)'), c),
|
||||
('ffmaz', a, b, c), 'options->has_fmulz && !'+signed_zero_inf_nan_preserve_32),
|
||||
|
||||
# b == 0.0 ? 1.0 : fexp2(fmul(a, b)) -> fexp2(fmulz(a, b))
|
||||
(('bcsel', ignore_exact('feq', b, 0.0), 1.0, ('fexp2', ('fmul@32', a, b))),
|
||||
('fexp2', ('fmulz', a, b)),
|
||||
'options->has_fmulz && !'+signed_zero_inf_nan_preserve_32),
|
||||
]
|
||||
|
||||
# Shorthand for the expansion of just the dot product part of the [iu]dp4a
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue