shader_recompiler: fix for pattern detection in `TryDisableAnisoLod0`

Also fix for forgotten log message params.
This commit is contained in:
psucien 2024-08-26 23:49:36 +02:00
parent 3e94b533b6
commit af4356bfe1
2 changed files with 7 additions and 4 deletions

View File

@ -291,8 +291,10 @@ s32 PS4_SYSV_ABI sceKernelBatchMap2(OrbisKernelBatchMapEntry* entries, int numEn
}
case MemoryOpTypes::ORBIS_KERNEL_MAP_OP_TYPE_PROTECT: {
// By now, ignore protection and log it instead
LOG_WARNING(Kernel_Vmm, "entry = {}, operation = {}, len = {:#x}, type = {} "
"is UNSUPPORTED and skipped");
LOG_WARNING(Kernel_Vmm,
"entry = {}, operation = {}, len = {:#x}, type = {} "
"is UNSUPPORTED and skipped",
i, entries[i].operation, entries[i].length, (u8)entries[i].type);
break;
}
default: {

View File

@ -293,10 +293,11 @@ std::pair<const IR::Inst*, bool> TryDisableAnisoLod0(const IR::Inst* inst) {
return not_found;
}
// The bits range is for lods
// The bits range is for lods (note that constants are changed after constant propagation pass)
const auto* prod0_arg0 = prod0->Arg(0).InstRecursive();
if (prod0_arg0->GetOpcode() != IR::Opcode::BitFieldUExtract ||
prod0_arg0->Arg(1).InstRecursive()->Arg(0).U32() != 0x0008000cu) {
!(prod0_arg0->Arg(1).IsIdentity() && prod0_arg0->Arg(1).U32() == 12) ||
!(prod0_arg0->Arg(2).IsIdentity() && prod0_arg0->Arg(2).U32() == 8)) {
return not_found;
}