mirror of
https://github.com/yuzu-emu/yuzu-emu.github.io.git
synced 2025-06-11 16:06:41 +00:00
Apply suggestions from code review
byte's Co-authored-by: liamwhite <liamwhite@users.noreply.github.com>
This commit is contained in:
parent
f9c1d7a727
commit
53c9bca332
|
@ -12,10 +12,10 @@ Hello there, yuz-ers! November brought us many GPU fixes followed by driver fixe
|
|||
## Mario Role-Playing as Mario!
|
||||
|
||||
As if `Super Mario Bros. Wonder` wasn’t enough, a cult classic is back, with improved graphics to boot!
|
||||
`Super Mario RPG` brings some distilled nostalgia to the old SNES era guard (we still stand strong), so the question was there at release day: "Does it run in yuzu?"
|
||||
`Super Mario RPG` brings some distilled nostalgia to the old SNES-era guard (we still stand strong), so the question was there at release day: "Does it run in yuzu?"
|
||||
|
||||
It did, but with some buts, as usual.
|
||||
Two things needed fixing to get this colourful cast into good shape, an audio fix affecting everyone, and a fix for NVIDIA users.
|
||||
It did―with some buts, as usual.
|
||||
Two things needed to be fixed to get this colourful cast into good shape: an audio fix affecting everyone, and a separate fix for NVIDIA users.
|
||||
|
||||
Users immediately noticed how the game’s background audio was completely muted, detracting a lot from the experience.
|
||||
After performing a cross-examination [with music and all](https://youtu.be/5I443rHIYVk), [byte[]](https://github.com/liamwhite) found out the cause was {{< gh-hovercard "12058" "a leftover" >}} from the Opus rewrite [Maide](https://github.com/Kelebek1) did [back in September](https://yuzu-emu.org/entry/yuzu-progress-report-sep-2023/#audio-changes).
|
||||
|
@ -28,7 +28,7 @@ With this specific case fixed, the game started playing audio as it should.
|
|||
"./rpg3.png"
|
||||
>}}
|
||||
|
||||
Now, regarding NVIDIA, it was [epicboy](https://github.com/ameerj)’s turn to perform a minor investigation, this time in the shader recompiler.
|
||||
Meanwhile, [epicboy](https://github.com/ameerj)’s performed a separate investigation in the shader recompiler regarding NVIDIA’s broken rendering.
|
||||
|
||||
For those not familiar with the shader pipeline of yuzu and other emulators:
|
||||
|
||||
|
@ -37,7 +37,7 @@ Those shaders are useless for any other device, so the emulator has to intercept
|
|||
After multiple steps of conversion, a Switch shader finally gets turned into a, for example, Ampere shader, or Adreno, or RDNA3.
|
||||
(And now you know why shader stuttering is a thing.)
|
||||
|
||||
Why the sudden explanation? Well, if a GPU driver is not happy with the way a shader is written, odd stuff happens, regardless of settings, API, or shader backend in use. There’s no escape.
|
||||
NVIDIA drivers have a lot of optimizations for various code patterns in shaders. When you hit a bug in these optimizations, odd stuff can happen, regardless of settings, API, or shader backend in use. There’s no escape.
|
||||
In this case, it led to swapped character colours in menus because NVIDIA drivers disliked {{< gh-hovercard "12066" "the specific pattern" >}} the game’s shader used in menus–and unlike most other driver bugs, it was broken in every single backend!
|
||||
|
||||
Here’s a generic example provided by epicboy:
|
||||
|
@ -49,7 +49,7 @@ uint high = uint(bitfieldExtract(some_number, 16, 16));
|
|||
uint swapped = low + high;
|
||||
```
|
||||
|
||||
The solution is to, depending of the case, replace the last line with a [bit by bit operation](https://en.wikipedia.org/wiki/Bitwise_operation) or by using:
|
||||
epicboy’s solution was to detect this specific pattern in yuzu before passing it to the driver, and replace the last line with a [bitwise OR](https://en.wikipedia.org/wiki/Bitwise_operation):
|
||||
|
||||
```cpp
|
||||
uint swapped = low | high;
|
||||
|
@ -70,9 +70,9 @@ With both issues out of the way there’s only one thing left to say: Happy stom
|
|||
Here it is!
|
||||
Time to graduate from a PC emulator compatible with Android to a "native" Android emulator.
|
||||
|
||||
{{< gh-hovercard "12074" "NCE support," >}} or `Native Code Execution`, a huge effort made by [GPUCode](https://github.com/GPUCode) and byte[], adapted [Skyline](https://github.com/skyline-emu/skyline)’s ability to run Switch games’ code natively on ARM devices, with no recompiler middleman slowing things down.
|
||||
{{< gh-hovercard "12074" "NCE support," >}} or `Native Code Execution`, a huge effort made by [GPUCode](https://github.com/GPUCode) and byte[], adapted [Skyline](https://github.com/skyline-emu/skyline)’s ability to run game code natively on ARM devices, with no recompiler to slow things down.
|
||||
|
||||
This sounds great on paper, but what does it mean for the user?
|
||||
This sounds great on paper, but what does it mean for users?
|
||||
The advantage of using a JIT recompiler is ensuring compatibility regardless of the device in use–that’s how an AMD64 computer can run 64-bit ARM games.
|
||||
While this method is good enough for AMD64 desktop and laptops (and one of the few possible ways to do it), it’s very slow on Android phones and tablets, not to mention very taxing, as the recompiled code is less efficient, uses a lot of resources, and requires more power to execute as a byproduct, resulting in increased heat.
|
||||
|
||||
|
@ -116,36 +116,36 @@ We enable NCE by default on the latest GitHub and Play Store builds. The option
|
|||
>}}
|
||||
|
||||
For the setting tweakers out there, disabling Fastmem disables NCE with it, so we don’t recommend disabling it unless you cannot run the game you want otherwise.
|
||||
If you see old pictures of games running with Fastmem disabled but still showing NCE under the framerate counter, that’s because the counter didn’t consider this scenario originally, it has since then been patched to correct this.
|
||||
If you see old pictures of games running with Fastmem disabled but still showing NCE under the framerate counter, that’s because the counter didn’t consider this scenario originally; it has since then been patched to correct this.
|
||||
|
||||
## Yet more changes for Android
|
||||
|
||||
But why stop there? There’s more work baked into the Android builds, here’s this month’s list:
|
||||
But why stop there? There’s more work baked into the Android builds―here’s this month’s list:
|
||||
|
||||
- [t895](https://github.com/t895) made changes to the {{< gh-hovercard "11972" "FPS counter." >}} The text was changed to white, its reading is now continuously updated, and it now mentions what CPU backend is in use, JIT or NCE. The FPS counter can be enabled by dragging from the left while running a game and selecting `Overlay options > FPS counter`.
|
||||
- {{< gh-hovercard "12018" "General UI improvements to the settings tab." >}} icons and descriptions have been added, the order of the elements and the location of some settings was changed.Work by t895.
|
||||
- {{< gh-hovercard "12018" "Many improvements were made to the settings tab." >}} Icons and descriptions have been added, and the order of the elements and the location of some settings was changed. Work by t895.
|
||||
{{< imgs
|
||||
"./icons.png| Pretty"
|
||||
>}}
|
||||
- {{< gh-hovercard "12014" "The Settings tab and About page" >}} have been tweaked to add a landscape layout. This work by t895 improves usability for tablets, foldables, and big devices users.
|
||||
- {{< gh-hovercard "12014" "The Settings tab and About page" >}} have been tweaked to add a landscape layout. This work by t895 improves usability for tablets, foldables, and other large form-factor devices.
|
||||
{{< single-title-imgs
|
||||
"Thank you Alphonsokurukuchu for the tablet pics"
|
||||
"./layout1.png"
|
||||
"./layout2.png"
|
||||
>}}
|
||||
- t895 {{< gh-hovercard "12034" "adds a drop shadow" >}} to the FPS counter to improve readability and allows the device’s style to control the text size of the FPS readout.
|
||||
- t895 {{< gh-hovercard "12034" "added a drop shadow" >}} to the FPS counter to improve readability, and allowed the device’s font style to control the text size of the FPS readout.
|
||||
- When enabled, {{< gh-hovercard "12035" "Picture-in-Picture was blocked" >}} during startup or shutdown, improving stability. Work by t895.
|
||||
- [Blinkhawk](https://github.com/FernandoS27) {{< gh-hovercard "12036" "disabled write syncing" >}} on Android devices running Turnip drivers, fixing crashes in games like `Red Dead Redemption` and `Luigi’s Mansion 3`.
|
||||
- To improve general stability and reduce memory consumption, {{< gh-hovercard "12043" "Picture-in-Picture has been disabled" >}} by default. Work by t895.
|
||||
- Thanks to the better resource management NCE introduced, Blinkhawk again allows {{< gh-hovercard "12081" "more than one single thread" >}} for Vulkan pipeline workers, reducing stuttering when loading caches at boot and building new shaders while in-game.
|
||||
- byte[] found a cause for {{< gh-hovercard "12083" "crashes on Mali GPUs:" >}} they don’t support multi-viewport rendering. Disabling this feature greatly improves stability on Mali equipped devices. And so the list of features Mali doesn’t support keeps growing.
|
||||
- Blinkhawk re-enabled using {{< gh-hovercard "12081" "multithreaded pipeline compilation" >}} for Android, reducing stuttering when loading caches at boot and building new shaders while in-game. This was made possible thanks to the lower resource consumption under NCE.
|
||||
- byte[] found another cause for {{< gh-hovercard "12083" "crashes on Mali GPUs:" >}} they don’t support multi-viewport rendering. Disabling this feature greatly improves stability on Mali equipped devices. (And so the list of features Mali doesn’t support keeps growing.)
|
||||
- The upper {{< gh-hovercard "12091" "speed limit was increased to 400%," >}} as t895 found out using a high limit is more stable than disabling it at all. Happy benchmarking!
|
||||
- When accessing the Search tab, the first results before filtering will now be the {{< gh-hovercard "12092" "most recently played games." >}} Work by t895.
|
||||
- The user can now {{< gh-hovercard "12093" "store save exports locally" >}} by using a file picker. This small time saver is made by t895.
|
||||
- When accessing the Search tab, t895 set the first results before filtering to be your {{< gh-hovercard "12092" "most recently played games." >}}
|
||||
- Thanks to t895, you can now {{< gh-hovercard "12093" "store save exports locally" >}} by using a file picker.
|
||||
- Another Mali limitation, another workaround by byte[]. This time {{< gh-hovercard "12110" "nullDescriptor got a special slower codepath" >}} so Mali devices can run `Super Smash Bros. Ultimate`. Everyone is here!
|
||||
- byte[] also fixed an {{< gh-hovercard "12140" "edge case in the query cache" >}} that caused crashes on Turnip drivers.
|
||||
- Users reported the {{< gh-hovercard "12166" "face ABXY buttons on Redmagic controllers" >}} were flipped, so [german77](https://github.com/german77) addressed the issue.
|
||||
- Back to UI for a bit more, t895 added support for {{< gh-hovercard "12204" "multiple game folders" >}} and the ability to scan subdirectories. Feel free to be as disorganised as you want now, we won’t judge.
|
||||
- t895 added support in the UI for {{< gh-hovercard "12204" "multiple game folders" >}} and the ability to scan subdirectories. Feel free to be as disorganised as you want now; we won’t judge.
|
||||
{{< imgs
|
||||
"./folders.png| We chads use a single folder"
|
||||
>}}
|
||||
|
@ -156,8 +156,8 @@ But why stop there? There’s more work baked into the Android builds, here’s
|
|||
The `Force maximum clocks` setting seems to cause a lot of confusion among users, which sadly leads to it being enabled in cases where it isn’t intended to be used, particularly power/thermally restricted devices.
|
||||
|
||||
The setting was originally intended to solve an AMD problem: their RDNA based cards suffer from severe downclocking, or what your writer calls "chronic downclocking syndrome", when emulating many games.
|
||||
The GPU load the emulator produces is often so low, it fails to trigger the governor of those products, causing the card to set clock speeds to extremely low values.
|
||||
As you can expect, this leads to very low performance.
|
||||
The GPU load the emulator produces is often so low, its workload fails to be detected as a game, causing the card to keep its clock speeds set to extremely low values.
|
||||
As you might expect, this leads to very low performance.
|
||||
|
||||
Enter `Force maximum clocks`, which on desktop yuzu simply generates a dummy compute load to run on the GPU, triggering the card to clock up by force.
|
||||
While this solves the issue and puts the performance of AMD cards on par with NVIDIA (and even helps NVIDIA cards under some scenarios), running a compute load like this is *not* a viable option for integrated GPUs.
|
||||
|
@ -181,10 +181,10 @@ The {{< gh-hovercard "12045" "initial changes" >}} are up, but more work is need
|
|||
Blinkhawk managed to catch and {{< gh-hovercard "12072" "fix several regressions" >}} affecting `Pokémon Scarlet/Violet` introduced by the new Query Cache.
|
||||
|
||||
{{< imgs
|
||||
"./scarlet.png| Perfectly playable again, but sadly we can’t fix its graphics (Pokémon Scarlet)"
|
||||
"./scarlet.png| Playable again (Pokémon Scarlet)"
|
||||
>}}
|
||||
|
||||
In a bit of sad news, byte[] had to {{< gh-hovercard "12173" "disable" >}} the support for the depth bias Vulkan extension which was intended to solve the D24 issues affecting AMD cards on Linux (the Windows driver doesn’t need it now).
|
||||
In a bit of sad news, byte[] had to {{< gh-hovercard "12173" "disable" >}} the support for the depth bias Vulkan extension which was intended to solve the D24 issues affecting AMD cards on Linux (the Windows driver doesn’t support it yet, and uses a different workaround).
|
||||
RADV users (the Linux Mesa Vulkan driver for AMD GPUs) noticed issues with certain stages in `Super Smash Bros. Ultimate`.
|
||||
Investigating the cause reveals that even with the use of the extension, you can only fix some games and break others in the process.
|
||||
While we investigate alternatives for this situation, the old workaround is back in place, allowing players to fight in the Nintendo 64 Zelda stage without going blind from the glare.
|
||||
|
@ -197,15 +197,15 @@ While we investigate alternatives for this situation, the old workaround is back
|
|||
|
||||
Never forgetting about good old OpenGL, epicboy has a list of changes for it this month too.
|
||||
|
||||
First of all, he {{< gh-hovercard "12056" "implements asynchronous downloads," >}} a feature that was previously only available on Vulkan, leading to an 11% performance boost when using the old API.
|
||||
First of all, he {{< gh-hovercard "12056" "implemented asynchronous downloads," >}} a feature that was previously only available on Vulkan, leading to an 11% performance boost when using the old API.
|
||||
|
||||
Next, epicboy fixed the rendering issues affecting `Xenoblade Chronicles: Definitive Edition` and `Xenoblade Chronicles 3` when using the {{< gh-hovercard "12068" "GLASM shader backend" >}}--these two games heavily rely on transform feedback to render.
|
||||
Next, epicboy fixed the rendering issues affecting `Xenoblade Chronicles: Definitive Edition` and `Xenoblade Chronicles 3` when using the {{< gh-hovercard "12068" "GLASM shader backend" >}}―these two games heavily rely on transform feedback to render.
|
||||
That Monado can look good even if you’re still rocking a Kepler GPU.
|
||||
|
||||
Continuing the work on improving the performance of OpenGL, epicboy implemented the use of the `glBindVertexBuffers` and `glBindBuffersRange` {{< gh-hovercard "12094" "commands," >}} making the use of the previous `GL_NV_vertex_buffer_unified_memory` extension obsolete.
|
||||
This reduces the API call overhead that is so notorious in OpenGL, reducing CPU use as a result.
|
||||
|
||||
And finally, to close the section, epicboy helped to mitigate a bothersome disadvantage OpenGL has, shader build times (at least if the user runs NVIDIA hardware).
|
||||
And finally, to close the section, epicboy helped to mitigate a bothersome disadvantage OpenGL has, shader build times―but only when the user is running NVIDIA hardware.
|
||||
By lowering the size of {{< gh-hovercard "12196" "the constant buffer" >}} in the declaration to the size actually used by the shader, shader compilation performance is improved!
|
||||
It’s not as good as Vulkan, but it’s certainly a VERY welcome addition for those cases where OpenGL is the only option.
|
||||
|
||||
|
@ -213,7 +213,7 @@ It’s not as good as Vulkan, but it’s certainly a VERY welcome addition for t
|
|||
|
||||
Back this month for more is [Macj0rdan](https://github.com/Macj0rdan) along with german77, partners in crime working in implementing the {{< gh-hovercard "12011" "controller menu applet." >}}
|
||||
Functionality is limited at the moment, but you can now see your connected controllers just as intended.
|
||||
As expected, a [firmware dump](https://rena21.github.io/yuzu-wiki/setup-guide/dump-firmware/) is required.
|
||||
As usual, a firmware dump is required to launch any applets.
|
||||
|
||||
{{< single-title-imgs
|
||||
"While this is native fun, don’t expect it to be very usable for the time being"
|
||||
|
@ -222,14 +222,14 @@ As expected, a [firmware dump](https://rena21.github.io/yuzu-wiki/setup-guide/du
|
|||
"./applet3.png"
|
||||
>}}
|
||||
|
||||
Working as a solo this time, german77 managed to {{< gh-hovercard "11969" "fix the profile pics" >}} for all currently available system applets, like for example during profile selection.
|
||||
Working on his own, german77 managed to {{< gh-hovercard "11969" "fix the profile pictures" >}} for all currently available system applets, like for example during profile selection.
|
||||
The Switch wants exactly 256x256 images, so included as part of the package is a resizer to just give the applet what it wants.
|
||||
|
||||
{{< imgs
|
||||
"./profiles.png| They’re multiplying!"
|
||||
>}}
|
||||
|
||||
Continuing his [previous work](https://yuzu-emu.org/entry/yuzu-progress-report-jul-2022/#input-improvements) on infrared shenanigans which thankfully don’t involve explosives or self-guidance, german77 finished {{< gh-hovercard "11980" "implementing the" >}} `moment image processor`.
|
||||
Continuing his [previous work](https://yuzu-emu.org/entry/yuzu-progress-report-jul-2022/#input-improvements) on infrared shenanigans (which thankfully don’t involve explosives or self-guidance), german77 finished {{< gh-hovercard "11980" "implementing the" >}} `moment image processor`.
|
||||
This means games like `Trombone Champ`and `WarioWare: Put a lid on it` are now playable with Joy-Cons.
|
||||
Feel free to crack that volume dial and torture your neighbours to your heart’s content.
|
||||
Here’s an example by german77 himself, enjoy:
|
||||
|
@ -247,15 +247,15 @@ Switching a bit to input, german77 fixed an omission in the input code regarding
|
|||
This breaks backwards compatibility with saved input profiles of single right Joy-Cons―an unlikely configuration for most games. If you are using this configuration, you might have to rebind your controller, but other profiles are unaffected.
|
||||
|
||||
Thanks to the work of newcomer [dima-xd](https://github.com/dima-xd), the native {{< gh-hovercard "11929" "software keyboard applet" >}} can be run.
|
||||
Sadly, it’s not possible to use it at this moment as it hasn’t been hooked into the code yet, multiprocess support is needed here.
|
||||
Sadly, it’s not possible to use it in games at this moment, as it can't be launched on demand yet―multiprocess support is needed for this.
|
||||
As an apology, here’s how it looks:
|
||||
|
||||
{{< imgs
|
||||
"./osk.png| Tactile switches? Touch Switch!"
|
||||
>}}
|
||||
|
||||
Since yuzu can now deal with Mii data inside Amiibos, the code will also automatically {{< gh-hovercard "12183" "validate their integrity" >}}.
|
||||
Thanks to german77’s work, now the emulator can detect corrupted Amiibos and load a backup.
|
||||
Since yuzu can now work with Mii data inside Amiibos, the code will also automatically {{< gh-hovercard "12183" "validate their integrity" >}}.
|
||||
Thanks to german77’s work, the emulator can now detect corrupted Amiibos and automatically load a backup.
|
||||
This avoids crashes in games sensitive to Amiibo integrity, like `Super Smash Bros. Ultimate`.
|
||||
|
||||
Macj0rdan, working solo this time, has a separate fix for us.
|
||||
|
@ -270,7 +270,7 @@ Since the emulator doesn’t yet store that information, nor has any use for it
|
|||
>}}
|
||||
|
||||
To close out this section, [toastUnlimited](https://github.com/lat9nq) had to deal with Qt shenanigans.
|
||||
Qt’s text parsing didn’t like how yuzu was structured, causing it to miss many UI translations.
|
||||
Qt’s text parsing didn’t like how yuzu's frontend strings were stored, causing it to miss many UI translations.
|
||||
A bit of {{< gh-hovercard "11984" "restructuring" >}} by the Unlimited Toast, and we’re back in business.
|
||||
|
||||
## Miscellaneous changes
|
||||
|
@ -279,16 +279,16 @@ To help users check the status of their firmware installation, and since the fir
|
|||
Gone is the confusion about "when was the last time I updated this?" now.
|
||||
|
||||
{{< imgs
|
||||
"./fw.png|You need matching keys to decode the firmware, always dump both together"
|
||||
"./fw.png|One day there will be an easier way to install firmware"
|
||||
>}}
|
||||
|
||||
Mouse emulation, along with keyboard emulation, are options for users within yuzu, for the few games that support it.
|
||||
The options has been available in `Emulation > Configure… > Settings > Controls > Advanced`, and report to games that a keyboard and/or mouse is plugged to the console.
|
||||
These are available in `Emulation > Configure… > Settings > Controls > Advanced`, and report to games that a USB keyboard and/or mouse is plugged to the console.
|
||||
|
||||
To help mouse players–and we don’t mean "use mouse as a stick for aiming", we mean emulating an attached USB mouse–german77 made sure the actual native cursor of your OS {{< gh-hovercard "12160" "doesn’t leave the yuzu window." >}}
|
||||
If you hate clicking your own game out of focus, you will like this change.
|
||||
|
||||
While continuing his work on improving yuzu’s file system emulation, byte[] solved a bug that caused `MONSTER HUNTER GENERATIONS ULTIMATE` to {{< gh-hovercard "11936" "fail to boot" >}} when mods for the game were installed.
|
||||
While continuing his work on improving yuzu’s file system emulation, byte[] solved a bug that caused `MONSTER HUNTER GENERATIONS ULTIMATE` to {{< gh-hovercard "11936" "fail to boot" >}} when RomFS mods for the game were installed.
|
||||
|
||||
But that was only an appetiser; here’s the main dish.
|
||||
byte[] {{< gh-hovercard "12208" "improved the performance" >}} of parsing and building RomFS mods, lowering the patch time of `The Legend of Zelda: Tears of the Kingdom` with mods applied from 2.8 seconds to 0.3 seconds on a high performance CPU (a Ryzen 9 5950X in this case). This was very noticeable in testing.
|
||||
|
@ -299,7 +299,7 @@ Exactly the same fix needed for `Super Mario RPG` but in a different spot allows
|
|||
What did the trick? Allowing a {{< gh-hovercard "11952" "stereo count" >}} of zero or higher, and fixing a typo.
|
||||
Coding shenanigans.
|
||||
|
||||
And to finish up, what better way to end than enumerating some of the battles byte[] won for improving shutdown stability!
|
||||
And to close out this section, what better way to end than enumerating some of the battles byte[] won for improving shutdown stability!
|
||||
|
||||
Audio gets the first one.
|
||||
When enough {{< gh-hovercard "12019" "stream data" >}} is still waiting in the output queue, the audio renderer will wait until it has space to add more data.
|
||||
|
@ -322,7 +322,7 @@ On shutdown, the system calls to clear pending events, even while the timing thr
|
|||
|
||||
### AMD, mixing drivers
|
||||
|
||||
[Last month](https://yuzu-testing.netlify.app/entry/yuzu-progress-report-oct-2023/#amd-giving-a-last-hurrah-to-polaris-and-vega) we reported how AMD is discontinuing driver support for Polaris and Vega products and how that can affect yuzu.
|
||||
[Last month](https://yuzu-emu.org/entry/yuzu-progress-report-oct-2023/#amd-giving-a-last-hurrah-to-polaris-and-vega), we reported that AMD is discontinuing driver support for Polaris and Vega products, and speculated how it would affect yuzu.
|
||||
|
||||
What we didn’t consider is what happens to mixed configurations, for example running a Vega iGPU and an RDNA2 dGPU.
|
||||
This kind of configuration is quite common, as AMD is still selling new devices with integrated Vega GPUs, and laptop vendors can sell configurations with dedicated RDNA2 or RDNA3 products.
|
||||
|
|
Loading…
Reference in a new issue