nir: Get rid of nir_dest_bit_size()
We could add a nir_def_bit_size() helper but we use ->bit_size about 3x
as often as nir_dest_bit_size() today so that's a major Coccinelle
refactor anyway and this doesn't make it much worse. Most of this
commit was generated byt the following semantic patch:
@@
expression D;
@@
<...
-nir_dest_bit_size(D)
+D.ssa.bit_size
...
Some manual fixup was needed, especially in cpp files where Coccinelle
tends to give up the moment it sees any interesting C++.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24674>
This commit is contained in:
committed by
Marge Bot
parent
0dd76b1abb
commit
80a1836d8b
@@ -271,7 +271,7 @@ create_plane_tex_instr_implicit(struct ycbcr_state *state,
|
||||
tex->is_array = old_tex->is_array;
|
||||
|
||||
nir_def_init(&tex->instr, &tex->dest.ssa, old_tex->dest.ssa.num_components,
|
||||
nir_dest_bit_size(old_tex->dest));
|
||||
old_tex->dest.ssa.bit_size);
|
||||
nir_builder_instr_insert(b, &tex->instr);
|
||||
|
||||
return &tex->dest.ssa;
|
||||
|
||||
Reference in New Issue
Block a user