mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
nir/opt_algebraic: alternative 8bit pack_[us]norm_4x8 lowering
Foz-DB Navi21: Totals from 42 (0.05% of 79395) affected shaders: Instrs: 2709529 -> 2705848 (-0.14%) CodeSize: 14720732 -> 14711384 (-0.06%); split: -0.06%, +0.00% VGPRs: 4096 -> 4104 (+0.20%) Latency: 17907612 -> 17904468 (-0.02%); split: -0.02%, +0.00% InvThroughput: 4723551 -> 4722649 (-0.02%); split: -0.02%, +0.00% Copies: 223516 -> 219819 (-1.65%) Branches: 109578 -> 109594 (+0.01%); split: -0.00%, +0.02% VALU: 1730848 -> 1727151 (-0.21%) Tested-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28882>
This commit is contained in:
parent
f66883a875
commit
75b1fa9263
1 changed files with 12 additions and 2 deletions
|
|
@ -2240,7 +2240,12 @@ optimizations.extend([
|
|||
(('pack_unorm_4x8', 'v'),
|
||||
('pack_uvec4_to_uint',
|
||||
('f2u32', ('fround_even', ('fmul', ('fsat', 'v'), 255.0)))),
|
||||
'options->lower_pack_unorm_4x8'),
|
||||
'options->lower_pack_unorm_4x8 && !options->has_pack_32_4x8'),
|
||||
|
||||
(('pack_unorm_4x8', 'v'),
|
||||
('pack_32_4x8',
|
||||
('f2u8', ('fround_even', ('fmul', ('fsat', 'v'), 255.0)))),
|
||||
'options->lower_pack_unorm_4x8 && options->has_pack_32_4x8'),
|
||||
|
||||
(('pack_snorm_2x16', 'v'),
|
||||
('pack_uvec2_to_uint',
|
||||
|
|
@ -2250,7 +2255,12 @@ optimizations.extend([
|
|||
(('pack_snorm_4x8', 'v'),
|
||||
('pack_uvec4_to_uint',
|
||||
('f2i32', ('fround_even', ('fmul', ('fmin', 1.0, ('fmax', -1.0, 'v')), 127.0)))),
|
||||
'options->lower_pack_snorm_4x8'),
|
||||
'options->lower_pack_snorm_4x8 && !options->has_pack_32_4x8'),
|
||||
|
||||
(('pack_snorm_4x8', 'v'),
|
||||
('pack_32_4x8',
|
||||
('f2i8', ('fround_even', ('fmul', ('fmin', 1.0, ('fmax', -1.0, 'v')), 127.0)))),
|
||||
'options->lower_pack_snorm_4x8 && options->has_pack_32_4x8'),
|
||||
|
||||
(('unpack_unorm_2x16', 'v'),
|
||||
('fdiv', ('u2f32', ('vec2', ('extract_u16', 'v', 0),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue