mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 20:20:18 +01:00
nak: Fix wrong encoding for F2FP cbuf and immediate forms
F2FP.PACK_AB always uses src0 and src1, only F2FP.MERGE_C uses src1 and
src2.
This fixes "f32tof16" instruction test regression on vk3d.
Fixes: e19871bd6a ("nak: Use F2FP for nir_op_pack_half_2x16_split on SM86+")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30804>
This commit is contained in:
parent
14de650d58
commit
694e68f359
1 changed files with 7 additions and 17 deletions
|
|
@ -1931,23 +1931,13 @@ impl SM70Op for OpF2FP {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn encode(&self, e: &mut SM70Encoder<'_>) {
|
fn encode(&self, e: &mut SM70Encoder<'_>) {
|
||||||
if src_is_zero_or_gpr(&self.srcs[1]) {
|
e.encode_alu(
|
||||||
e.encode_alu(
|
0x03e,
|
||||||
0x03e,
|
Some(&self.dst),
|
||||||
Some(&self.dst),
|
Some(&self.srcs[0]),
|
||||||
Some(&self.srcs[0]),
|
Some(&self.srcs[1]),
|
||||||
Some(&self.srcs[1]),
|
Some(&Src::new_zero()),
|
||||||
Some(&Src::new_zero()),
|
);
|
||||||
)
|
|
||||||
} else {
|
|
||||||
e.encode_alu(
|
|
||||||
0x03e,
|
|
||||||
Some(&self.dst),
|
|
||||||
None,
|
|
||||||
Some(&self.srcs[1]),
|
|
||||||
Some(&self.srcs[0]),
|
|
||||||
)
|
|
||||||
};
|
|
||||||
|
|
||||||
// .MERGE_C behavior
|
// .MERGE_C behavior
|
||||||
// Use src1 and src2, src0 is unused
|
// Use src1 and src2, src0 is unused
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue