mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
nak: Remove hfma2 src 1 modifiers
This fixes a compilation issue in Marvel Rivals where the legalization
logic and the encoding logic don't line up, which results in an
assertion failure on this instruction:
r17 = hfma2 r17.xx -r18.xx 0x3c003c00
The fix here is a little overly restrictive because it turns out we
actually do have modifiers for all 3 sources. Those modifiers will
be added in later commits.
Fixes: 567cae69c3 ("nak: Add 16-bits float operations")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34750>
This commit is contained in:
parent
d48b3a232c
commit
1ff7135691
1 changed files with 4 additions and 2 deletions
|
|
@ -1113,14 +1113,16 @@ impl SM70Op for OpHFma2 {
|
|||
b.copy_alu_src_if_not_reg(src1, gpr, SrcType::F16v2);
|
||||
b.copy_alu_src_if_both_not_reg(src1, src2, gpr, SrcType::F16v2);
|
||||
|
||||
// HFMA2 doesn't have fabs or fneg on SRC2.
|
||||
if !src1.src_mod.is_none() {
|
||||
b.copy_alu_src_and_lower_fmod(src1, gpr, SrcType::F16v2);
|
||||
}
|
||||
if !src2.src_mod.is_none() {
|
||||
b.copy_alu_src_and_lower_fmod(src2, gpr, SrcType::F16v2);
|
||||
}
|
||||
}
|
||||
|
||||
fn encode(&self, e: &mut SM70Encoder<'_>) {
|
||||
// HFMA2 doesn't have fneg and fabs on SRC2.
|
||||
assert!(self.srcs[1].src_mod.is_none());
|
||||
assert!(self.srcs[2].src_mod.is_none());
|
||||
|
||||
e.encode_fp16_alu(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue