nak: Use undef for unset FSOut components
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27742>
This commit is contained in:
@@ -652,6 +652,12 @@ pub trait SSABuilder: Builder {
|
||||
}
|
||||
}
|
||||
|
||||
fn undef(&mut self) -> SSARef {
|
||||
let dst = self.alloc_ssa(RegFile::GPR, 1);
|
||||
self.push_op(OpUndef { dst: dst.into() });
|
||||
dst
|
||||
}
|
||||
|
||||
fn copy(&mut self, src: Src) -> SSARef {
|
||||
let dst = if src.is_predicate() {
|
||||
self.alloc_ssa(RegFile::Pred, 1)
|
||||
|
@@ -2249,7 +2249,7 @@ impl<'a> ShaderFromNir<'a> {
|
||||
for c in 0..4 {
|
||||
let reg = self.fs_out_regs[i * 4 + c];
|
||||
if reg.is_none() {
|
||||
srcs.push(0.into());
|
||||
srcs.push(b.undef().into());
|
||||
} else {
|
||||
srcs.push(reg.into());
|
||||
}
|
||||
@@ -2262,7 +2262,7 @@ impl<'a> ShaderFromNir<'a> {
|
||||
if info.writes_sample_mask {
|
||||
srcs.push(self.fs_out_regs[mask_idx].into());
|
||||
} else {
|
||||
srcs.push(0.into());
|
||||
srcs.push(b.undef().into());
|
||||
}
|
||||
if info.writes_depth {
|
||||
// Saturate depth writes.
|
||||
|
Reference in New Issue
Block a user