nak: Always copy sources when handling vec/pack/mov ops
It's possible that the source is uniform but the destination is not. In
this case, we need to insert a copy or else we might accidentally
propagate a uniform into some place we don't expect it.
This fixes a bunch of fp64 KHR-Single-GL46.subgroups.arithmetic.* tests.
Fixes: d09d3f5246 ("nak/from_nir: Emit uniform instructions when !divergent")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34201>
This commit is contained in:
committed by
Marge Bot
parent
87af55e075
commit
1d1d79bbaa
@@ -543,8 +543,15 @@ impl<'a> ShaderFromNir<'a> {
|
||||
let mut comps = Vec::new();
|
||||
match src_bit_size {
|
||||
1 | 32 | 64 => {
|
||||
for (ssa, _) in srcs {
|
||||
comps.push(ssa);
|
||||
for (ssa, byte) in srcs {
|
||||
assert!(byte == 0);
|
||||
// Always insert a copy regardless of whether or not
|
||||
// we need to permute bytes. It's possible that the
|
||||
// source is uniform but the destination is not and
|
||||
// we'll need a copy in that case. If the copy
|
||||
// isn't needed, copy-prop should clean it up for
|
||||
// us.
|
||||
comps.push(b.copy(ssa.into())[0]);
|
||||
}
|
||||
}
|
||||
8 => {
|
||||
|
||||
Reference in New Issue
Block a user