nir/range_analysis: Handle vectors better in ssa_def_bits_used
If a query is made of a vector ssa_def (possibly from an intermediate
result), return all_bits. If a constant source is a vector, swizzle
the correct component.
Unit tests were added for the constant vector cases. I don't see a
great way to make unit tests for the other cases.
v2: Add a FINIHSME comment about u16vec2 hardware.
Fixes: 96303a59ea
("nir: Add some range analysis for used bits")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9123>
This commit is contained in:
@@ -485,4 +485,17 @@ if with_tests
|
||||
),
|
||||
suite : ['compiler', 'nir'],
|
||||
)
|
||||
|
||||
test(
|
||||
'ssa_def_bits_used',
|
||||
executable(
|
||||
'ssa_def_bits_used',
|
||||
files('tests/ssa_def_bits_used_tests.cpp'),
|
||||
c_args : [c_msvc_compat_args, no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
|
||||
dependencies : [dep_thread, idep_gtest, idep_nir, idep_mesautil],
|
||||
),
|
||||
suite : ['compiler', 'nir'],
|
||||
)
|
||||
endif
|
||||
|
Reference in New Issue
Block a user