Professor Layton games slowdown


#1

I’m experiencing the following problem with the Canary builds:

affected/tested games
Professor Layton and the Azran Legacy (EUR)
Professor Layton and the Miracle Mask (EUR)

Independent of the resolution (and apparently any other setting) those games are slowing down after every 3D-conversation scene. While the first conversation plays at full speed (Frame: 11 ms), the second plays at about 14 ms, the third at about 16 ms and so on until becoming unplayably slow.

To remedy the problem I have to switch to a different resolution whereby it does not matter to which one (native or x6 e.g. does not make any difference, it solves the problem instantly albeit only temporarily until the next 3D-conversation scene when the slowdown cycle starts anew). I checked with Afterburner and there are no issues with RAM usage, GPU temperature, core clock or anything unusual. I’m no coder, but for my amateurish understanding it seems something remains in memory which shouldn’t.

Is this a known issue? I’m using an AMD R9 290X graphics card, different driver versions seem to make no difference (newer drivers are faster, but the slowdown occurs one way or another).

I’m using different emulators (Dolphin, PCSX2, CEMU), Citra is the only one I’m experiencing this kind of problem with.

I hope somebody can help!


#2

You said the problem is in Canary, have you tried nightly?
:thinking:


#3

Thanks for replying!

Nightly builds are not affected, I actually managed to track down the “continuous slowdown” problem to build

Canary-256 (citra-windows-mingw-20171212-32eb09e)

This seems to be the first build with “Texture cache rework”. It gives me a HUGE (+100%!) speedup in those Layton games but at the same time introduces the slowing down after every 3D-conversation scene as described before.

Please investigate, thanks!


#4

This is related to the removal of a specific commit in the PR that boosts the framerate:

“speed regressions in some games compared to earlier versions of this PR is expected since there was a hack that I was testing to see if it broke any games. It made some games faster with no issues, but it completely broke some games like paper mario, so it will be removed permanently. The hack is a placeholder for hardware texture decoding and encoding, so if someone gets around to adding that, we’d get that speed boost back.”


#5

So if I understand you correctly, “Texture cache rework” is a hack offering a significant speed boost in those Layton games but it should not be expected that the described side effect will / can be fixed as this hack is only a temporary solution for a proper texture decoding and encoding algorithm?


#6

No. The texture cache rework PR, as it says in the title, reworks the texture cache, so it would use hardware texture copy - fixes games that didn’t upscale properly before and makes some games run faster. It’s not a hack. However, the PR had a “hackish” commit that is responsible for the insane speed boost, but it also broke several games from working, so the commit was removed. The performance boost can be brought again if someone implemets texture decoding / encoding.


#7

Hmmm…

“…so the commit was removed…”

The latest Canary build (309) still exhibits the same 3D-scene slowdowns in those Layton games as build 256 introduced.


#8

hardware texture encoding/decoding :slight_smile: citra already does texture encoding/decoding, but its on the cpu, so we have to upload/download the texture to/from the gpu every time. The hack commit merely skipped uploading/downloading the texture when it was being loaded as a different format if it was created only in the gpu (and not something on the cpu which implies that its not something the game will not actually use it in the wrong format) which helped out many games. But it broke paper mario horribly (thanks paper mario!)

the fix is to keep the texture on the gpu and reinterpret it by reencoding the texture to the new format. but its a lotta work for some noob like me to take on :slight_smile: