Skip to content

Commit e816bc4

Browse files
authored
Use GetSrc in VALU insts instead of assuming vector reg (was vcc_lo) (shadps4-emu#2845)
* Use GetSrc in v_add_i32 instead of assuming vector reg (was vcc_lo) * some other cases
1 parent 632ed99 commit e816bc4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/shader_recompiler/frontend/translate/vector_alu.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,13 +513,13 @@ void Translator::V_LSHLREV_B32(const GcnInst& inst) {
513513

514514
void Translator::V_AND_B32(const GcnInst& inst) {
515515
const IR::U32 src0{GetSrc(inst.src[0])};
516-
const IR::U32 src1{ir.GetVectorReg(IR::VectorReg(inst.src[1].code))};
516+
const IR::U32 src1{GetSrc(inst.src[1])};
517517
SetDst(inst.dst[0], ir.BitwiseAnd(src0, src1));
518518
}
519519

520520
void Translator::V_OR_B32(bool is_xor, const GcnInst& inst) {
521521
const IR::U32 src0{GetSrc(inst.src[0])};
522-
const IR::U32 src1{ir.GetVectorReg(IR::VectorReg(inst.src[1].code))};
522+
const IR::U32 src1{GetSrc(inst.src[1])};
523523
SetDst(inst.dst[0], is_xor ? ir.BitwiseXor(src0, src1) : IR::U32(ir.BitwiseOr(src0, src1)));
524524
}
525525

@@ -579,7 +579,7 @@ void Translator::V_MBCNT_U32_B32(bool is_low, const GcnInst& inst) {
579579
void Translator::V_ADD_I32(const GcnInst& inst) {
580580
// Signed or unsigned components
581581
const IR::U32 src0{GetSrc(inst.src[0])};
582-
const IR::U32 src1{ir.GetVectorReg(IR::VectorReg(inst.src[1].code))};
582+
const IR::U32 src1{GetSrc(inst.src[1])};
583583
const IR::U32 result{ir.IAdd(src0, src1)};
584584
SetDst(inst.dst[0], result);
585585

0 commit comments

Comments
 (0)