added check if s# comes from constant load (e.g. EUD)

This commit is contained in:
psucien 2024-07-04 20:59:26 +02:00
parent 9633fea55a
commit 248d94eff4
1 changed files with 2 additions and 1 deletions

View File

@ -196,7 +196,8 @@ std::pair<const IR::Inst*, bool> TryDisableAnisoLod0(const IR::Inst* inst) {
// We're working on the first dword of s#
const auto* prod2 = inst->Arg(2).InstRecursive();
if (prod2->GetOpcode() != IR::Opcode::GetUserData) {
if (prod2->GetOpcode() != IR::Opcode::GetUserData &&
prod2->GetOpcode() != IR::Opcode::ReadConst) {
return not_found;
}