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

Progress Dialog: Fix race on PPU compilation status #14526

Merged
merged 1 commit into from Aug 22, 2023

Conversation

elad335
Copy link
Contributor

@elad335 elad335 commented Aug 21, 2023

If more than one PPU thread was loading PPU PRX/OVL, there could have been a race that would make the "Compiling PPU Modules" message never disappear because one thread was storing the string the other thread stored. (g_progr never gets null again)

@@ -4523,10 +4523,13 @@ bool ppu_initialize(const ppu_module& info, bool check_only)
// Check object file
if (jit_compiler::check(cache_path + obj_name))
{
if (!jit && !check_only)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a bug, g_progr_ptotal is incremented if check_only is false. It does not care about null jit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this change is wrong.
It's incremented later again if it needs to be compiled a couple of lines below.

So you're incrementing the uncached ones twice now.

@elad335 elad335 force-pushed the bless branch 6 times, most recently from 84f6d14 to 32e0a24 Compare August 21, 2023 17:28
rpcs3/Emu/system_progress.hpp Outdated Show resolved Hide resolved
rpcs3/Emu/system_progress.hpp Outdated Show resolved Hide resolved
rpcs3/Emu/system_progress.hpp Show resolved Hide resolved
@elad335 elad335 force-pushed the bless branch 3 times, most recently from 0e32ddf to 8b86fad Compare August 21, 2023 18:49
@Megamouse
Copy link
Contributor

lgtm. But I haven't tested anything.

@Megamouse
Copy link
Contributor

Sadly it's broken AF xD

@elad335 elad335 force-pushed the bless branch 4 times, most recently from 5b42e96 to 3540b45 Compare August 22, 2023 02:08
@elad335 elad335 merged commit a001e6e into RPCS3:master Aug 22, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants