shader_recompiler: change ir.SetScalarReg() -> SetDst() (#777)

Fixes an out-of-bounds crash on Amplitude and Rock Band 4 startup.
This commit is contained in:
Sebastian Kassai 2024-09-04 16:30:43 +02:00 committed by GitHub
parent 2709b45877
commit 0a5c36482e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -171,9 +171,9 @@ void Translator::V_READFIRSTLANE_B32(const GcnInst& inst) {
const IR::U32 value{GetSrc(inst.src[0])};
if (info.stage != Stage::Compute) {
ir.SetScalarReg(dst, value);
SetDst(inst.dst[0], value);
} else {
ir.SetScalarReg(dst, ir.ReadFirstLane(value));
SetDst(inst.dst[0], ir.ReadFirstLane(value));
}
}