Project

General

Profile

Actions

Emulator Issues #11245

closed

Stuttering *every single time* I open a door in Metroid Prime 3 (Prime Trilogy)

Added by danileon95 almost 6 years ago. Updated almost 6 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Game Name?

Metroid Prime 3 (Metroid Prime Trilogy)

Game ID? (right click the game in the game list, properties, info tab)

R3MP01

MD5 Hash? (right click the game in the game list, properties, info tab, MD5 Hash: Compute)

735c0d0c16177e3294f5e0faf7a69571

What's the problem? Describe what went wrong.

Prime 3 will stutter EVERY SINGLE TIME it has to load a new room, on all backends and on all shader configurations (even Skip Drawing!) on a very powerful PC, even if I'm opening the same door over and over again (thus not generating any new shaders).

What steps will reproduce the problem?

Play Prime 3, open doors.

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

Yes, 5.0-8244

Is the issue present in the latest stable version?

No! The game will stutter as usual as shaders are generated, but once they are, the game is smooth. It doesn't have this weird behaviour of sttutering every time I open a door.

If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds and anyone who is building Dolphin on their own can use git bisect.)

I bisected and the result was 5.0-5748 but the changelog seems totally unrelated. Maybe I screwed up? I can try again if you want.

If your issue is a graphical issue, please attach screenshots and record a three frame fifolog of the issue if possible. Screenshots showing what it is supposed to look like from either console or older builds of Dolphin will help too. For more information on how to use the fifoplayer, please check here: https://wiki.dolphin-emu.org/index.php?title=FifoPlayer

--

What are your PC specifications? (CPU, GPU, Operating System, more)

i7 6700k 4.2 GHz
16 GB RAM DDR4 2400 MHz
Nvidia GTX 1070
Windows 10 64 bit
Latest Nvidia drivers (398.11)

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

Video of 5.0-8244, with the stutters. Ubershaders are DISABLED, but this happens on all shader configurations and all backends: https://youtu.be/FUQSo_JZ7tM
Video of 5.0 stable, with no stutters beyond the shader generation ones (which already happened before recording) https://youtu.be/nIvDXASvVXs

I will attach my save data of the game so that you can quickly test that same door if you want. It's for the PAL version. But really, this happens on any door.


Files

private.zip (173 KB) private.zip Save data danileon95, 06/26/2018 12:56 AM
Actions #1

Updated by JMC4789 almost 6 years ago

Try enabling fast-disc-speed, and possibly bisecting again.

Actions #2

Updated by danileon95 almost 6 years ago

Extra info: If I disable the frame limit I can consistently run the game at 200%+ speed, so there's not a lack of power. The stutters will still occur even with the frame limiter disabled, though Dolphin will not report that the game is going below 100%. Instead it will go from like 210% to something like 190%.

If I have the frame limiter on, then it does show a drop to 90% or so. But again, when the frame limiter is disabled, it's way beyond fullspeed all of the time yet it still stutters.

Actions #3

Updated by danileon95 almost 6 years ago

@JMC4789 on it!

Actions #4

Updated by Techjar almost 6 years ago

Just chiming in to say that fast disc speed has no effect on this.

Actions #5

Updated by JMC4789 almost 6 years ago

The game itself is lagging most likely... we'd need to check and see if this happens on console.

Actions #6

Updated by Techjar almost 6 years ago

I'm fairly certain it does not happen on console, but if you really want I can bust out my copy of Trilogy to be sure.

Actions #7

Updated by danileon95 almost 6 years ago

Fast disc speed has no effect.

I did a bisect again and got the same result. However, I decided to try the previous version to 5.0-5748, which is 5.0-5745, and it had the stutters too. After that I decided to try the previous version to that one, 5-0-5743, and behold! this one doesn't stutter.

Time for two more videos then.
5.0-5743 (no stutters): https://youtu.be/106UtGJ1EII
5.0-5745 (stutters): https://youtu.be/CSA7Ja48MKI

There may be frame drops on console when changing rooms (I don't really remember) but I am completely sure it never straight up stutters with even the sound stopping :(

Actions #8

Updated by JMC4789 almost 6 years ago

What I'd suggest is checking on console for sure and rechecking the bisect. I'm like ~90% sure there was some report about this being related to disc timings... but that doesn't guarantee fast disc speed to fix it anyway.

Actions #9

Updated by danileon95 almost 6 years ago

Just to clarify: The bisect gave me the same result, but I decided to manually check the builds and quickly found the (apparent) culprit

Actions #10

Updated by JMC4789 almost 6 years ago

Try turning on GPU Texture Decoding out of curiosity.

Actions #11

Updated by danileon95 almost 6 years ago

Wow, what the hell?

GPU texture decoding actually solves the issue on both OpenGL and Vulkan (the option doesn't exist in D3D11)

Wow.

Actions #12

Updated by danileon95 almost 6 years ago

But this doesn't happen on 5743 even without GPU texture decoding

Actions #13

Updated by danileon95 almost 6 years ago

I've been playing for a while and it's fine now with GPU texture decoding, except for one LONG stutter I had after defeating a boss but I guess that's because Nvidia doesn't like Ubershaders on Vulkan/OpenGL very much? Or did that get fixed?

In any case, shouldn't the wiki be updated to recommend users to turn on GPU texture decoding in order to avoid this issue?

Actions #14

Updated by Techjar almost 6 years ago

Long freezes are actually caused by JIT cache flushing, which is an entirely different problem.

Turning on GPU texture decoding won't be recommended on the wiki, as that's not actually a real fix. The real problem is arbitrary mipmap detection being too slow, and GPU texture decoding just masks the problem because it doesn't support that feature (notice the mipmapped textures become higher quality when you turn it on, if your IR is >1x). The proper fix is to make the detection faster, which would probably best be achieved by moving the detection into a compute shader to let the GPU do the dirty work, since it's much faster at processing texels than a CPU. There may be CPU<->GPU latency issues, but testing will have to be done to determine that.

Actions #15

Updated by Techjar almost 6 years ago

JonnyH has crafted up a significant improvement for this issue: https://github.com/dolphin-emu/dolphin/pull/7170

Actions #16

Updated by JosJuice almost 6 years ago

For future reference, turning on fast disc speed can only make problems like these worse. It's not something I would recommend to have enabled when testing.

Actions #17

Updated by danileon95 almost 6 years ago

I enabled it to see if anything changed then disabled it again for the rest of the testing

Actions #18

Updated by danileon95 almost 6 years ago

So then, 5.0-5745 being the build that made this happen makes sense since it introduced resolution independent mipmaps, right? (and it doesn't happen with GPU texture decoding which doesn't support this specific feature)

I don't know why the bisect tool points me to 5.0-5748, but whatever, my manual testing immediately led me to 5745

Actions #19

Updated by markwest76 almost 6 years ago

I think this is the same issue reported in #10680 https://bugs.dolphin-emu.org/issues/10680

Actions #20

Updated by danileon95 almost 6 years ago

Yep, seems like it's the same problem

Actions #21

Updated by markwest76 almost 6 years ago

#10680 has been fixed, you may check if this one is fixed as well...

Actions #22

Updated by JMC4789 almost 6 years ago

  • Status changed from New to Fixed
Actions

Also available in: Atom PDF