mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 11:26:56 +02:00
shader: preserve wave-wide vector-store completion before publication
This commit is contained in:
@@ -181,8 +181,12 @@ void Translator::EmitControlNop() {
|
||||
ir.Emit(IR::ValueOpcode::ControlNop);
|
||||
}
|
||||
|
||||
void Translator::EmitWaitcnt() {
|
||||
ir.Emit(IR::ValueOpcode::Waitcnt);
|
||||
void Translator::S_WAITCNT_VSCNT(const Decoder::Instruction& inst) {
|
||||
const auto count = inst.src1.value & 63u;
|
||||
if (inst.src0.kind != Decoder::OperandKind::Null || (count != 0u && count != 63u)) {
|
||||
EXIT("unsupported partial or register-based S_WAITCNT_VSCNT at 0x%08x", inst.pc);
|
||||
}
|
||||
if (count == 0u) ir.Emit(IR::ValueOpcode::StoreCompletion);
|
||||
}
|
||||
|
||||
void Translator::S_BARRIER() {
|
||||
|
||||
@@ -18,7 +18,8 @@ void Translator::EmitScalar(const Decoder::Instruction& inst) {
|
||||
case O::S_CSELECT_B64: ScalarSelect64(inst, inst.src1); return;
|
||||
case O::S_CMOV_B64: ScalarSelect64(inst, inst.dst); return;
|
||||
case O::S_SETREG_B32: EmitControlNop(); return;
|
||||
case O::S_WAITCNT: EmitWaitcnt(); return;
|
||||
case O::S_WAITCNT_VSCNT: S_WAITCNT_VSCNT(inst); return;
|
||||
case O::S_WAITCNT: return;
|
||||
|
||||
case O::S_AND_SAVEEXEC_B32:
|
||||
S_SAVEEXEC(inst, IR::ValueOpcode::LogicalAnd, false, false, false);
|
||||
@@ -224,7 +225,7 @@ void Translator::EmitScalar(const Decoder::Instruction& inst) {
|
||||
case O::S_SLEEP:
|
||||
case O::S_SETPRIO:
|
||||
case O::S_TRAP: EmitControlNop(); return;
|
||||
case O::S_WAITCNT_DEPCTR: EmitWaitcnt(); return;
|
||||
case O::S_WAITCNT_DEPCTR: return;
|
||||
case O::S_BARRIER: S_BARRIER(); return;
|
||||
case O::S_SENDMSG: S_SENDMSG(inst); return;
|
||||
case O::S_TTRACEDATA: S_TTRACEDATA(); return;
|
||||
|
||||
@@ -229,7 +229,7 @@ private:
|
||||
void ScalarMinMax32(const Decoder::Instruction& inst, IR::ValueOpcode value_opcode,
|
||||
IR::ValueOpcode compare_opcode);
|
||||
void EmitControlNop();
|
||||
void EmitWaitcnt();
|
||||
void S_WAITCNT_VSCNT(const Decoder::Instruction& inst);
|
||||
void S_BARRIER();
|
||||
void S_SENDMSG(const Decoder::Instruction& inst);
|
||||
void S_TTRACEDATA();
|
||||
|
||||
Reference in New Issue
Block a user