Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DiscIO: Fix broken workaround for MSVC ARM64 ICE #9949

Merged
merged 1 commit into from Jul 25, 2021

Conversation

JosJuice
Copy link
Member

@JosJuice JosJuice commented Jul 24, 2021

The workaround added in PR #9855 caused a regression where Dolphin incorrectly replaced runs of one byte with runs of another byte when writing WIA and RVZ files. ReuseID::operator< was always returning false unless the ReuseIDs being compared had different partition keys, which caused std::map<ReuseID, GroupEntry> to treat all ReuseIDs with the same partition key as equal.

@JosJuice JosJuice marked this pull request as draft July 24, 2021 09:59
@JosJuice JosJuice marked this pull request as ready for review July 24, 2021 10:06
@JosJuice JosJuice changed the title DiscIO: Fix broken workaround for MSVC ARM64 ICE DiscIO: Revert broken workaround for MSVC ARM64 ICE Jul 24, 2021
@shuffle2
Copy link
Contributor

how about this? :D (no ICE here, but ofc would be great to check the logic)

#define COMPARE_TIED_INNER(op, f, next) (f != other.f) ? (f op other.f) : next

#define COMPARE_TIED(op) \
  COMPARE_TIED_INNER(op, partition_key, \
    COMPARE_TIED_INNER(op, data_size, \
      COMPARE_TIED_INNER(op, encrypted, \
        COMPARE_TIED_INNER(op, value, true))))

The workaround added in 30f9f31 caused a regression where Dolphin
incorrectly replaced runs of one byte with runs of another byte
when writing WIA and RVZ files. ReuseID::operator< was always
returning false unless the ReuseIDs being compared had different
partition keys, which caused std::map<ReuseID, GroupEntry>
to treat all ReuseIDs with the same partition key as equal.
@JosJuice JosJuice changed the title DiscIO: Revert broken workaround for MSVC ARM64 ICE DiscIO: Fix broken workaround for MSVC ARM64 ICE Jul 24, 2021
@JosJuice
Copy link
Member Author

While it's not exactly pretty, it's the only solution so far that both works correctly (after fixing the bug in it) and doesn't trigger the ICE. Implemented.

@dolphin-emu-bot
Copy link
Contributor

FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:

automated-fifoci-reporter

@Tilka Tilka merged commit 55a465c into dolphin-emu:master Jul 25, 2021
11 checks passed
@JosJuice JosJuice deleted the wia-ice-3 branch July 25, 2021 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants