From 0a5c36482e8ad82fca2427bb359d33b030a07a06 Mon Sep 17 00:00:00 2001 From: Sebastian Kassai <8061077+xezrunner@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:30:43 +0200 Subject: [PATCH] shader_recompiler: change ir.SetScalarReg() -> SetDst() (#777) Fixes an out-of-bounds crash on Amplitude and Rock Band 4 startup. --- src/shader_recompiler/frontend/translate/data_share.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shader_recompiler/frontend/translate/data_share.cpp b/src/shader_recompiler/frontend/translate/data_share.cpp index 7c23c7284..c0f0fa274 100644 --- a/src/shader_recompiler/frontend/translate/data_share.cpp +++ b/src/shader_recompiler/frontend/translate/data_share.cpp @@ -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)); } }