mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
nak: Use Src::Zero for load_const(0)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
parent
b41b4bd7f5
commit
1730600943
1 changed files with 5 additions and 1 deletions
|
|
@ -335,7 +335,11 @@ impl<'a> ShaderFromNir<'a> {
|
|||
for c in 0..load_const.def.num_components {
|
||||
assert!(load_const.def.bit_size == 32);
|
||||
let imm_u32 = unsafe { load_const.values()[c as usize].u32_ };
|
||||
srcs.push(Src::new_imm_u32(imm_u32));
|
||||
srcs.push(if imm_u32 == 0 {
|
||||
Src::Zero
|
||||
} else {
|
||||
Src::new_imm_u32(imm_u32)
|
||||
});
|
||||
}
|
||||
self.instrs.push(Instr::new_vec(dst, &srcs));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue