yuzu icon indicating copy to clipboard operation
yuzu copied to clipboard

Project yuzu Fried Chicken (Y.F.C.) Part 1

Open FernandoS27 opened this issue 2 years ago • 20 comments

This is the very fundamental base of project YFC a project aimed at improving multiple aspects of GPU emulation that have been left in the oblivion.

Part 1 includes:

  • Full rework of GPU Driver based on the Re and code from Skyline Emulator with full permission from @bylaws (please check that all crediting and copyright notices are correct).
  • Full rework of GPU memory management.
  • Initial implementation of GPU Channels, this fixes World of light in SSBU, Deltarune, among a bunch of other games.
  • Fixes and accelerations to the DMA engine.
  • A series of fixes for Vulkan, Buffer Cache, Shader Decompiler that affected multiple games.
  • Rework host frame presentation to be a considerably smoother (fixes Xenoblade DE).

Part 1 does NOT include:

  • Performance improvements. (main theme)
  • Buffer Cache Rework. (this fixes FE: Warriors)
  • Macro HLE Rework. DrawIndirect, DrawElementsIndirect, MultiDrawIndirect, etc (perf for MHR and Koemo tecmo games).
  • Fencing Rework with asynchronous buffer and texture downloads.

These will be addressed in part 2.

This are further features that are partially done internally and will be released later after Part 2:

  • Accelerate DMA.
  • Unnormalized texture coords & rectangular textures.
  • Rendering to / from ASTC textures (biggest pain of UE4 games).
  • Host Conditional Rendering ? (still under consideration as it only seemed beneficial in 1 game and detrimental in others).

Credits:

  • Bylaws (@bylaws ) & Skyline Emulator Skyline Emulator for providing information on the RE of NVIDIA's kernel driver as well as being the base at which most of the DRV rework had been done.
  • AsLody (@asLody ) For finding out the cause of the issues behind Yokai Watch 4, The Witcher 3, Hades, among others. Along some of the solutions applied here.
  • Pharynx (@liamwhite ) and toastUnlimited (@lat9nq ) Linux help and compiling bugs fixes on GCC / Clang.
  • yuzu Team & Testers for annoying me to rebase / release this as it has been done since April xD.

FernandoS27 avatar Jun 15 '22 23:06 FernandoS27

Lower resolutions than 1x will break the graphics

german77 avatar Jun 16 '22 05:06 german77

Fixes #8207 #8166 #8129 #7892 #7655 #7235 #7124 #7087 #7071 #6892 #6864 #6757 #6305 May fix #6893

gidoly avatar Jun 16 '22 09:06 gidoly

Causes a regression in Splatoon 2 with at least the NVIDIA driver, where switches in the single player campaign will spontaneously activate. In the video is Station E05 from the Octo Expansion DLC

https://user-images.githubusercontent.com/22451773/174234799-3c91df7d-5531-4149-a414-d133ee4d0591.mp4

lat9nq avatar Jun 17 '22 06:06 lat9nq

@lat9nq are you able to bisect? Please let me know if nvdrv is at fault

bylaws avatar Jun 17 '22 08:06 bylaws

@bylaws I was only able to narrow it down to this: bisect.txt

The skipped commits crash booting the game. Starting from MemoryManager: initial multi paging system implementation it crashes loading the level.

lat9nq avatar Jun 17 '22 20:06 lat9nq

causes crash on metroid dread on title screen ~ before go ingame

gidoly avatar Jun 18 '22 00:06 gidoly

another regression super mario maker 2

https://user-images.githubusercontent.com/66776795/174417135-d479589d-7c98-4ded-a8cf-9716537abe2f.mp4

gidoly avatar Jun 18 '22 01:06 gidoly

users on discord seems also reporting low performance than before on xenoblade 2

gidoly avatar Jun 18 '22 09:06 gidoly

Artifact from Build #20220627.12 Has an issue where handheld performance gets tanked

This is with intel iGPU (iris xe)

image

Issue is already pressent at EA2804 image

For reference this is on mainline 1067 image

NOTE: Docked performance doesnt seem to be affected image

image

pacoa-kdbg avatar Jun 28 '22 01:06 pacoa-kdbg

The multi-channel implementation fixed the #6902

vonchenplus avatar Jun 29 '22 01:06 vonchenplus

Reporting another issue that could be possibly caused by YFC, as it doesn't happen in mainline.

With the Live-A-Live demo, when using Vulkan as the backend, it can potentially crash yuzu on loading screens. I have seen this happening on the loading screen to the chapter selection. This issue didn't happen in mainline, just so you know.

I'll attach the debug logs. The tests were done in EA2805 and mainline 1068. As for the specs:

OS: Windows 10 21H2 RAM: 32 GBs DDR4 GFX: Nvidia Geforce GTX 3060 Ti (Ampere) Processor: AMD Ryzen 5 5600X

The drivers used were 512.xx and 516.xx, so the issue isn't driver-related.

yuzu_log_mainline_debug_1068.zip yuzu_log_ea_debug_2805.zip yuzu_log_ea_debug_2805_512.xx.zip

lightgod87 avatar Jun 30 '22 00:06 lightgod87

@pacoa-kdbg @lightgod87 I have pushed some fixes. Please check if your regressions have been fixed.

FernandoS27 avatar Jul 01 '22 15:07 FernandoS27

@pacoa-kdbg @lightgod87 I have pushed some fixes. Please check if your regressions have been fixed.

Issue still persists. I'll attach new log.

yuzu_log_ea_debug_2811.zip

For the record, it still didn't happen in latest mainline.

yuzu_log_mainline_debug_1071.zip

lightgod87 avatar Jul 01 '22 15:07 lightgod87

I have a crash problem running Xenoblade Chronicles 2 with the latest EA builds. I did some tests and I noticed that the problem started with EA 2803 and so on. So I decided to walk around the world on the last EA build (EA2814) and the last one that the game ran fine (EA2801).

OS: Windows 10
CPU: Ryzen 3 2200G
GPU: RX 570 4GB VRAM
RAM: 16GB RAM

Here are the logs for a playthrough of around ~12 minutes each on EA2801 (I ran around the city Torigoth and headed to Gormott, then Mor Ardain and back to the city Argentum. I stopped the game and closed down Yuzu in both runs): yuzu_log.txt yuzu_log.txt

Here are the logs for EA2814 (Both crashed when I was still in Torigoth. So I didn't had the chance to even do the same route in EA 2801): yuzu_log.txt yuzu_log.txt

I don't have a powerful PC, so I shouldn't be taken as a primary source for the development of Yuzu. I'm just glad and thankful for the work behind the emulator. The game is running fine in the Mainline builds btw.

bajulador avatar Jul 03 '22 20:07 bajulador

Super Mario Sunshine, when booted through the 3DAS launcher, reliably crashes with this branch due to hitting this unreachable. Confirmed on both Windows and Linux. I was unable to bisect due to most commits being unbuildable.

liamwhite avatar Aug 07 '22 00:08 liamwhite

Good day,

As per gidoly's request, I tested the issue again. I checked in Vulkan. The first try was rather successful, the issue didn't happen, but then I tried again and the crash issue with Live-A-Live still appeared. Here's the log.

yuzu_log.txt

This is from EA 2918, just in case.

lightgod87 avatar Aug 24 '22 00:08 lightgod87

The problem with SMO handheld performance have been solved. image image

pacoa-kdbg avatar Aug 30 '22 14:08 pacoa-kdbg

https://github.com/yuzu-emu/yuzu/pull/8467#issuecomment-1158522835

In response to the approval just now, this regression is still present.

lat9nq avatar Sep 01 '22 05:09 lat9nq

This causes a regression in Splatoon 3: Splatfest World Premiere, where stickers on various surfaces are missing.

Mainline: Screenshot from 2022-09-06 02-03-15

yfc-rel-1: Screenshot from 2022-09-06 02-25-57

lat9nq avatar Sep 06 '22 06:09 lat9nq

It seems like the loading issue with Live-A-Live got fixed. I didn't check which commit did it, but I checked in EA2963 and the issue didn't happen in Vulkan. I tried to replicate it like 3 times. There was another crash when I first tried, but it was after the loading screen and probably related to shaders. Otherwise, that issue got solved, it seems.

lightgod87 avatar Sep 18 '22 00:09 lightgod87