Compare commits

...

27 Commits

Author SHA1 Message Date
sunshineinabox
7a477d07d4 Merge 48f9ada59b into a1c0c70ec2 2025-01-20 04:08:29 +00:00
Daenorth
a1c0c70ec2 Added missing TitleIDs (#545)
Added the remaining missing TitleIDs in the compat.csv list.
Excluding Homebrew apps.
2025-01-19 21:15:46 -06:00
Daenorth
290ac405ac Updated Ukrainian translation by Rondo (#543)
Co-authored-by: rrondo <46533574+rrondo@users.noreply.github.com>
2025-01-19 21:00:40 -06:00
Evan Husted
bbd64fd5f0 misc: chore: Cleanup AppletMetadata usage 2025-01-19 19:40:49 -06:00
Evan Husted
09446fd80e [ci skip] infra: Update copyright year in shortcut plist 2025-01-19 18:57:05 -06:00
Evan Husted
4f014a89cf docs: compat: Donkey Kong Country Returns HD 2025-01-19 18:28:43 -06:00
Evan Husted
6482e566ab UI: Compat: Unload compatibility entries when the window closes. 2025-01-19 17:41:50 -06:00
Evan Husted
7fcd9b792e UI: Compat: Update owned game title IDs when ApplicationLibrary app count updates 2025-01-19 17:41:31 -06:00
Evan Husted
e676fd8b17 UI: misc: simplify Intel Mac warning logic 2025-01-19 14:42:15 -06:00
Evan Husted
dd16e3cee1 misc: chore: very small cleanup in AvaHostUIHandler 2025-01-19 13:18:40 -06:00
Evan Husted
31e5f74e05 UI: misc: Replace spaces in Title with newlines when using custom title bar (since the Title is in an Avalonia tooltip) 2025-01-19 13:05:20 -06:00
Evan Husted
f2f099bddb remove Async suffixes; they're factory methods not actual async methods. 2025-01-19 12:46:32 -06:00
Evan Husted
2616dc57fb misc: chore: RelayCommand helper 2025-01-19 12:44:07 -06:00
Evan Husted
0cdf7cfe21 UI: Open cheat manager in catch-all try 2025-01-18 22:48:06 -06:00
Evan Husted
2ecf999569 misc: chore: change ThemeManager ThemeChanged to a basic Action since both arguments are unused 2025-01-18 22:48:06 -06:00
Daenorth
b612fc5155 Updated TitleIDs (#541)
Added more games to the RPC list. Now alphabetical.
2025-01-18 22:19:28 -06:00
Evan Husted
25eb545409 Update bug_report.yml 2025-01-18 20:55:28 -06:00
Jacob
52269964b6 Add the player select applet. (#537)
This introduces the somewhat completed version of the Player Select
Applet, allowing users to select either a user or a guest from the UI.
Note: Selecting the guest more then once currently does not work.

closes https://github.com/Ryubing/Ryujinx/issues/532
2025-01-18 20:40:33 -06:00
Evan Husted
ccdddac8fc Fix compile warnings 2025-01-18 19:34:31 -06:00
Daenorth
1bc30bf3ba Update locales.json (#538)
Added a missing translation line
2025-01-18 18:40:51 -06:00
Evan Husted
4868fface8 UI: Intel Mac warning
Upon launch, shows a warning about using an Intel Mac. This will only show once every boot. You can only turn it off by getting a better system.
2025-01-18 15:33:05 -06:00
Evan Husted
6fca4492d0 misc: chore: Remove status update event stuff in Headless 2025-01-18 15:15:08 -06:00
Evan Husted
ade2f256e0 misc: chore: remove duplicate graphics debug levels in headless windows 2025-01-18 11:19:38 -06:00
Evan Husted
580b150c9a Revert "infra: Conditionally compile Metal & OpenGL depending on if the target RuntimeIdentifier is mac"
This reverts commit 2f93a0f706.
2025-01-18 10:57:02 -06:00
Evan Husted
e6bad52945 Revert "Only selectively compile Metal & fix some compilation issues"
This reverts commit beda3206e0.
2025-01-18 10:56:58 -06:00
Evan Husted
beda3206e0 Only selectively compile Metal & fix some compilation issues 2025-01-18 10:52:32 -06:00
sunshineinabox
48f9ada59b Support VK_EXT_extended_dynamic_state and VK_EXT_extended_dynamic_state2 2024-11-21 17:53:52 -08:00
58 changed files with 2266 additions and 961 deletions

View File

@@ -22,7 +22,7 @@ body:
id: log
attributes:
label: Log file
description: A log file will help our developers to better diagnose and fix the issue.
description: "A log file will help our developers to better diagnose and fix the issue. UPLOAD THE FILE. DO NOT COPY AND PASTE THE FILE'S CONTENT."
placeholder: Logs files can be found under "Logs" folder in Ryujinx program folder. They can also be accessed by opening Ryujinx, then going to File > Open Logs Folder. You can drag and drop the log on to the text area (do not copy paste).
validations:
required: true

View File

@@ -19,7 +19,7 @@
<key>CSResourcesFileMapped</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2018 - 2023 Ryujinx Team and Contributors.</string>
<string>Copyright © 2018 - 2025 Ryujinx Team and Contributors.</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.games</string>
<key>LSMinimumSystemVersion</key>

View File

@@ -167,7 +167,7 @@
01006C40086EA000,"AeternoBlade",nvdec,playable,2020-12-14 20:06:48
0100B1C00949A000,"AeternoBlade Demo",nvdec,playable,2021-02-09 14:39:26
01009D100EA28000,"AeternoBlade II",online-broken;UE4;vulkan-backend-bug,playable,2022-09-12 21:11:18
,"AeternoBlade II Demo Version",gpu;nvdec,ingame,2021-02-09 15:10:19
0100B1C00949A000,"AeternoBlade II Demo Version",gpu;nvdec,ingame,2021-02-09 15:10:19
01001B400D334000,"AFL Evolution 2",slow;online-broken;UE4,playable,2022-12-07 12:45:56
0100DB100BBCE000,"Afterparty",,playable,2022-09-22 12:23:19
010087C011C4E000,"Agatha Christie - The ABC Murders",,playable,2020-10-27 17:08:23
@@ -477,7 +477,7 @@
010020700DE04000,"Bear With Me: The Lost Robots",nvdec,playable,2021-02-27 14:20:10
010024200E97E800,"Bear With Me: The Lost Robots Demo",nvdec,playable,2021-02-12 22:38:12
0100C0E014A4E000,"Bear's Restaurant",,playable,2024-08-11 21:26:59
,"BEAST Darling! ~Kemomimi Danshi to Himitsu no Ryou~",crash,menus,2020-10-04 06:12:08
010045F00BF64000,"BEAST Darling! ~Kemomimi Danshi to Himitsu no Ryou~",crash,menus,2020-10-04 06:12:08
01009C300BB4C000,"Beat Cop",,playable,2021-01-06 19:26:48
01002D20129FC000,"Beat Me!",online-broken,playable,2022-10-16 21:59:26
01006B0014590000,"BEAUTIFUL DESOLATION",gpu;nvdec,ingame,2022-10-26 10:34:38
@@ -703,7 +703,7 @@
01006A30124CA000,"Chocobo GP",gpu;crash,ingame,2022-06-04 14:52:18
0100BF600BF26000,"Chocobo's Mystery Dungeon EVERY BUDDY!",slow,playable,2020-05-26 13:53:13
01000BA0132EA000,"Choices That Matter: And The Sun Went Out",,playable,2020-12-17 15:44:08
,"Chou no Doku Hana no Kusari: Taishou Irokoi Ibun",gpu;nvdec,ingame,2020-09-28 17:58:04
0100A1200CA3C000,"Chou no Doku Hana no Kusari: Taishou Irokoi Ibun",gpu;nvdec,ingame,2020-09-28 17:58:04
010039A008E76000,"ChromaGun",,playable,2020-05-26 12:56:42
010006800E13A000,"Chronos: Before the Ashes",UE4;gpu;nvdec,ingame,2020-12-11 22:16:35
010039700BA7E000,"Circle of Sumo",,playable,2020-05-22 12:45:21
@@ -769,7 +769,7 @@
0100CCB01B1A0000,"COSMIC FANTASY COLLECTION",,ingame,2024-05-21 17:56:37
010067C00A776000,"Cosmic Star Heroine",,playable,2021-02-20 14:30:47
01003DD00F94A000,"COTTOn Reboot! [ コットン リブート! ]",,playable,2022-05-24 16:29:24
,"Cotton/Guardian Saturn Tribute Games",gpu,boots,2022-11-27 21:00:51
010077001526E000,"Cotton/Guardian Saturn Tribute Games",gpu,boots,2022-11-27 21:00:51
01000E301107A000,"Couch Co-Op Bundle Vol. 2",nvdec,playable,2022-10-02 12:04:21
0100C1E012A42000,"Country Tales",,playable,2021-06-17 16:45:39
01003370136EA000,"Cozy Grove",gpu,ingame,2023-07-30 22:22:19
@@ -830,7 +830,7 @@
01003ED0099B0000,"Danger Mouse: The Danger Games",crash;online,boots,2022-07-22 15:49:45
0100EFA013E7C000,"Danger Scavenger",nvdec,playable,2021-04-17 15:53:04
0100417007F78000,"Danmaku Unlimited 3",,playable,2020-11-15 00:48:35
,"Darius Cozmic Collection",,playable,2021-02-19 20:59:06
01000330105BE000,"Darius Cozmic Collection",,playable,2021-02-19 20:59:06
010059C00BED4000,"Darius Cozmic Collection Special Edition",,playable,2022-07-22 16:26:50
010015800F93C000,"Dariusburst - Another Chronicle EX+",online,playable,2021-04-05 14:21:43
01003D301357A000,"Dark Arcana: The Carnival",gpu;slow,ingame,2022-02-19 08:52:28
@@ -859,7 +859,7 @@
010095A011A14000,"Deadly Days",,playable,2020-11-27 13:38:55
0100BAC011928000,"Deadly Premonition 2: A Blessing In Disguise",,playable,2021-06-15 14:12:36
0100EBE00F22E000,"Deadly Premonition Origins",32-bit;nvdec,playable,2024-03-25 12:47:46
,"Dear Magi - Mahou Shounen Gakka -",,playable,2020-11-22 16:45:16
010015600D814000,"Dear Magi - Mahou Shounen Gakka -",,playable,2020-11-22 16:45:16
01000D60126B6000,"Death and Taxes",,playable,2020-12-15 20:27:49
010012B011AB2000,"Death Come True",nvdec,playable,2021-06-10 22:30:49
0100F3B00CF32000,"Death Coming",crash,nothing,2022-02-06 07:43:03
@@ -902,13 +902,13 @@
010023600C704000,"Deponia",nvdec,playable,2021-01-26 17:17:19
0100ED700469A000,"Deru - The Art of Cooperation",,playable,2021-01-07 16:59:59
0100D4600D0E4000,"Descenders",gpu,ingame,2020-12-10 15:22:36
,"Desire remaster ver.",crash,boots,2021-01-17 02:34:37
0100D870102BC000,"Desire remaster ver.",crash,boots,2021-01-17 02:34:37
010069500DD86000,"Destiny Connect: Tick-Tock Travelers",UE4;gpu;nvdec,ingame,2020-12-16 12:20:36
01008BB011ED6000,"Destrobots",,playable,2021-03-06 14:37:05
01009E701356A000,"Destroy All Humans!",gpu;nvdec;UE4,ingame,2023-01-14 22:23:53
010030600E65A000,"Detective Dolittle",,playable,2021-03-02 14:03:59
01009C0009842000,"Detective Gallo",nvdec,playable,2022-07-24 11:51:04
,"Detective Jinguji Saburo Prism of Eyes",,playable,2020-10-02 21:54:41
01002D400B0F6000,"Detective Jinguji Saburo Prism of Eyes",,playable,2020-10-02 21:54:41
010007500F27C000,"Detective Pikachu™ Returns",,playable,2023-10-07 10:24:59
010031B00CF66000,"Devil Engine",,playable,2021-06-04 11:54:30
01002F000E8F2000,"Devil Kingdom",,playable,2023-01-31 08:58:44
@@ -1057,7 +1057,7 @@
01004F000B716000,"Edna & Harvey: The Breakout Anniversary Edition",crash;nvdec,ingame,2022-08-01 16:59:56
01002550129F0000,"Effie",,playable,2022-10-27 14:36:39
0100CC0010A46000,"Ego Protocol: Remastered",nvdec,playable,2020-12-16 20:16:35
,"Eiga Sumikko Gurashi Tobidasu Ehon to Himitsu no Ko Game de Asobo Ehon no Sekai",,playable,2020-11-12 00:11:50
01004CC00B352000,"Eiga Sumikko Gurashi Tobidasu Ehon to Himitsu no Ko Game de Asobo Ehon no Sekai",,playable,2020-11-12 00:11:50
01003AD013BD2000,"Eight Dragons",nvdec,playable,2022-10-27 14:47:28
010020A01209C000,"El Hijo - A Wild West Tale",nvdec,playable,2021-04-19 17:44:08
0100B5B00EF38000,"Elden: Path of the Forgotten",,playable,2020-12-15 00:33:19
@@ -1123,7 +1123,7 @@
01005C10136CA000,"Fantasy Tavern Sextet -Vol.2 Adventurer's Days-",gpu;slow;crash,ingame,2021-11-06 02:57:29
010022700E7D6000,"FAR: Lone Sails",,playable,2022-09-06 16:33:05
0100C9E00FD62000,"Farabel",,playable,2020-08-03 17:47:28
,"Farm Expert 2019 for Nintendo Switch",,playable,2020-07-09 21:42:57
0100ECD00C806000,"Farm Expert 2019 for Nintendo Switch",,playable,2020-07-09 21:42:57
01000E400ED98000,"Farm Mystery",nvdec,playable,2022-09-06 16:46:47
010086B00BB50000,"Farm Together",,playable,2021-01-19 20:01:19
0100EB600E914000,"Farming Simulator 20",nvdec,playable,2021-06-13 10:52:44
@@ -1246,12 +1246,12 @@
0100ECE00C0C4000,"Fury Unleashed",crash;services,ingame,2020-10-18 11:52:40
010070000ED9E000,"Fury Unleashed Demo",,playable,2020-10-08 20:09:21
0100E1F013674000,"FUSER™",nvdec;UE4,playable,2022-10-17 20:58:32
,"Fushigi no Gensokyo Lotus Labyrinth",Needs Update;audio;gpu;nvdec,ingame,2021-01-20 15:30:02
0100A7A015E4C000,"Fushigi no Gensokyo Lotus Labyrinth",Needs Update;audio;gpu;nvdec,ingame,2021-01-20 15:30:02
01003C300B274000,"Futari de! Nyanko Daisensou",,playable,2024-01-05 22:26:52
010055801134E000,"FUZE Player",online-broken;vulkan-backend-bug,ingame,2022-10-18 12:23:53
0100EAD007E98000,"FUZE4 Nintendo Switch",vulkan-backend-bug,playable,2022-09-06 19:25:01
010067600F1A0000,"FuzzBall",crash,nothing,2021-03-29 20:13:21
,"G-MODE Archives 06 The strongest ever Julia Miyamoto",,playable,2020-10-15 13:06:26
0100275011e54000,"G-MODE Archives 06 The strongest ever Julia Miyamoto",,playable,2020-10-15 13:06:26
0100EB10108EA000,"G.I. Joe: Operation Blackout",UE4;crash,boots,2020-11-21 12:37:44
010048600B14E000,"Gal Metal",,playable,2022-07-27 20:57:48
010024700901A000,"Gal*Gun 2",nvdec;UE4,playable,2022-07-27 12:45:37
@@ -1370,7 +1370,7 @@
01006F80082E4000,"GUILTY GEAR XX ACCENT CORE PLUS R",nvdec,playable,2021-01-13 09:28:33
01003C6008940000,"GUNBIRD for Nintendo Switch",32-bit,playable,2021-06-04 19:16:01
0100BCB00AE98000,"GUNBIRD2 for Nintendo Switch",,playable,2020-10-10 14:41:16
,"Gunka o haita neko",gpu;nvdec,ingame,2020-08-25 12:37:56
01003FF010312000,"Gunka o haita neko",gpu;nvdec,ingame,2020-08-25 12:37:56
010061000D318000,"Gunman Clive HD Collection",,playable,2020-10-09 12:17:35
01006D4003BCE000,"Guns, Gore and Cannoli 2",online,playable,2021-01-06 18:43:59
01008C800E654000,"Gunvolt Chronicles Luminous Avenger iX - Retail Version",,playable,2020-06-16 22:47:07
@@ -1564,7 +1564,7 @@
0100BDC00A664000,"KAMEN RIDER CLIMAX SCRAMBLE",nvdec;ldn-untested,playable,2024-07-03 08:51:11
0100A9801180E000,"KAMEN RIDER memory of heroez / Premium Sound Edition",,playable,2022-12-06 03:14:26
010085300314E000,"KAMIKO",,playable,2020-05-13 12:48:57
,"Kangokuto Mary Skelter Finale",audio;crash,ingame,2021-01-09 22:39:28
010042C011736000,"Kangokuto Mary Skelter Finale",audio;crash,ingame,2021-01-09 22:39:28
01007FD00DB20000,"Katakoi Contrast - collection of branch -",nvdec,playable,2022-12-09 09:41:26
0100D7000C2C6000,"Katamari Damacy REROLL",,playable,2022-08-02 21:35:05
0100F9800EDFA000,"KATANA KAMI: A Way of the Samurai Story",slow,playable,2022-04-09 10:40:16
@@ -1581,7 +1581,7 @@
0100FB400D832000,"KILL la KILL -IF",,playable,2020-06-09 14:47:08
010011B00910C000,"Kill The Bad Guy",,playable,2020-05-12 22:16:10
0100F2900B3E2000,"Killer Queen Black",ldn-untested;online,playable,2021-04-08 12:46:18
,"Kin'iro no Corda Octave",,playable,2020-09-22 13:23:12
010014A00C5E0000,"Kin'iro no Corda Octave",,playable,2020-09-22 13:23:12
010089000F0E8000,"Kine",UE4,playable,2022-09-14 14:28:37
0100E6B00FFBA000,"King Lucas",,playable,2022-09-21 19:43:23
0100B1300783E000,"King Oddball",,playable,2020-05-13 13:47:57
@@ -1612,7 +1612,7 @@
01009EF00DDB4000,"Knockout City™",services;online-broken,boots,2022-12-09 09:48:58
0100C57019BA2000,"Koa and the Five Pirates of Mara",gpu,ingame,2024-07-11 16:14:44
01001E500401C000,"Koi DX",,playable,2020-05-11 21:37:51
,"Koi no Hanasaku Hyakkaen",32-bit;gpu;nvdec,ingame,2020-10-03 14:17:10
010052300F612000,"Koi no Hanasaku Hyakkaen",32-bit;gpu;nvdec,ingame,2020-10-03 14:17:10
01005D200C9AA000,"Koloro",,playable,2022-08-03 12:34:02
0100464009294000,"Kona",,playable,2022-08-03 12:48:19
010016C011AAA000,"Kono Subarashii Sekai ni Shukufuku o Kono Yokubo no Isho ni Choai o",,playable,2023-04-26 09:51:08
@@ -1779,8 +1779,8 @@
0100EC000CE24000,"Mech Rage",,playable,2020-11-18 12:30:16
0100C4F005EB4000,"Mecho Tales",,playable,2022-08-04 17:03:19
0100E4600D31A000,"Mechstermination Force",,playable,2024-07-04 05:39:15
,"Medarot Classics Plus Kabuto Ver",,playable,2020-11-21 11:31:18
,"Medarot Classics Plus Kuwagata Ver",,playable,2020-11-21 11:30:40
01007580124C0000,"Medarot Classics Plus Kabuto Ver",,playable,2020-11-21 11:31:18
0100228012682000,"Medarot Classics Plus Kuwagata Ver",,playable,2020-11-21 11:30:40
0100BBC00CB9A000,"Mega Mall Story",slow,playable,2022-08-04 17:10:58
0100B0C0086B0000,"Mega Man 11",,playable,2021-04-26 12:07:53
010038E016264000,"Mega Man Battle Network Legacy Collection Vol. 1",,playable,2023-04-25 03:55:57
@@ -1797,7 +1797,7 @@
0100B360068B2000,"Mekorama",gpu,boots,2021-06-17 16:37:21
01000FA010340000,"Melbits World",nvdec;online,menus,2021-11-26 13:51:22
0100F68019636000,"Melon Journey",,playable,2023-04-23 21:20:01
,"Memories Off -Innocent Fille- for Dearest",,playable,2020-08-04 07:31:22
010079C012896000,"Memories Off -Innocent Fille- for Dearest",,playable,2020-08-04 07:31:22
010062F011E7C000,"Memory Lane",UE4,playable,2022-10-05 14:31:03
0100EBE00D5B0000,"Meow Motors",UE4;gpu,ingame,2020-12-18 00:24:01
0100273008FBC000,"Mercenaries Saga Chronicles",,playable,2021-01-10 12:48:19
@@ -1873,7 +1873,7 @@
010093A01305C000,"Monster Hunter Rise Demo",online-broken;ldn-works;demo,playable,2022-10-18 23:04:17
0100E21011446000,"Monster Hunter Stories 2: Wings of Ruin",services,ingame,2022-07-10 19:27:30
010042501329E000,"MONSTER HUNTER STORIES 2: WINGS OF RUIN Trial Version",demo,playable,2022-11-13 22:20:26
,"Monster Hunter XX Demo",32-bit;cpu,nothing,2020-03-22 10:12:28
0100C51003B46000,"Monster Hunter XX Demo",32-bit;cpu,nothing,2020-03-22 10:12:28
0100C3800049C000,"Monster Hunter XX Nintendo Switch Ver ( Double Cross )",,playable,2024-07-21 14:08:09
010088400366E000,"Monster Jam Crush It!",UE4;nvdec;online,playable,2021-04-08 19:29:27
010095C00F354000,"Monster Jam Steel Titans",crash;nvdec;UE4,menus,2021-11-14 09:45:38
@@ -1917,7 +1917,7 @@
010035901046C000,"Mushroom Quest",,playable,2020-05-17 13:07:08
0100700006EF6000,"Mushroom Wars 2",nvdec,playable,2020-09-28 15:26:08
010046400F310000,"Music Racer",,playable,2020-08-10 08:51:23
,"Musou Orochi 2 Ultimate",crash;nvdec,boots,2021-04-09 19:39:16
0100153006300000,"Musou Orochi 2 Ultimate",crash;nvdec,boots,2021-04-09 19:39:16
0100F6000EAA8000,"Must Dash Amigos",,playable,2022-09-20 16:45:56
01007B6006092000,"MUSYNX",,playable,2020-05-08 14:24:43
0100C3E00ACAA000,"Mutant Football League: Dynasty Edition",online-broken,playable,2022-08-05 17:01:51
@@ -1948,7 +1948,7 @@
0100A6F00AC70000,"NAIRI: Tower of Shirin",nvdec,playable,2020-08-09 19:49:12
010002F001220000,"NAMCO MUSEUM",ldn-untested,playable,2024-08-13 07:52:21
0100DAA00AEE6000,"NAMCO MUSEUM™ ARCADE PAC™",,playable,2021-06-07 21:44:50
,"NAMCOT COLLECTION",audio,playable,2020-06-25 13:35:22
010039F010E14000,"NAMCOT COLLECTION",audio,playable,2020-06-25 13:35:22
010072B00BDDE000,"Narcos: Rise of the Cartels",UE4;crash;nvdec,boots,2021-03-22 13:18:47
01006BB00800A000,"NARUTO SHIPPUDEN: Ultimate Ninja STORM 3 Full Burst",nvdec,playable,2024-06-16 14:58:05
010084D00CF5E000,"NARUTO SHIPPUDEN™: Ultimate Ninja® STORM 4 ROAD TO BORUTO",,playable,2024-06-29 13:04:22
@@ -2089,11 +2089,11 @@
0100F9D00C186000,"Olympia Soiree",,playable,2022-12-04 21:07:12
0100A8B00E14A000,"Olympic Games Tokyo 2020 The Official Video Game™",ldn-untested;nvdec;online,playable,2021-01-06 01:20:24
01001D600E51A000,"Omega Labyrinth Life",,playable,2021-02-23 21:03:03
,"Omega Vampire",nvdec,playable,2020-10-17 19:15:35
01005DE00CA34000,"Omega Vampire",nvdec,playable,2020-10-17 19:15:35
0100CDC00C40A000,"Omensight: Definitive Edition",UE4;crash;nvdec,ingame,2020-07-26 01:45:14
01006DB00D970000,"OMG Zombies!",32-bit,playable,2021-04-12 18:04:45
010014E017B14000,"OMORI",,playable,2023-01-07 20:21:02
,"Once Upon A Coma",nvdec,playable,2020-08-01 12:09:39
0100A5F011800000,"Once Upon A Coma",nvdec,playable,2020-08-01 12:09:39
0100BD3006A02000,"One More Dungeon",,playable,2021-01-06 09:10:58
010076600FD64000,"One Person Story",,playable,2020-07-14 11:51:02
0100774009CF6000,"ONE PIECE Pirate Warriors 3 Deluxe Edition",nvdec,playable,2020-05-10 06:23:52
@@ -2184,7 +2184,7 @@
010062B01525C000,"Persona 4 Golden",,playable,2024-08-07 17:48:07
01005CA01580E000,"Persona 5 Royal",gpu,ingame,2024-08-17 21:45:15
010087701B092000,"Persona 5 Tactica",,playable,2024-04-01 22:21:03
,"Persona 5: Scramble",deadlock,boots,2020-10-04 03:22:29
0100E4F010D92000,"Persona 5: Scramble",deadlock,boots,2020-10-04 03:22:29
0100801011C3E000,"Persona® 5 Strikers",nvdec;mac-bug,playable,2023-09-26 09:36:01
010044400EEAE000,"Petoons Party",nvdec,playable,2021-03-02 21:07:58
010053401147C000,"PGA TOUR 2K21",deadlock;nvdec,ingame,2022-10-05 21:53:50
@@ -2273,7 +2273,7 @@
0100D1C01C194000,"Powerful Pro Baseball 2024-2025",gpu,ingame,2024-08-25 06:40:48
01008E100E416000,"PowerSlave Exhumed",gpu,ingame,2023-07-31 23:19:10
010054F01266C000,"Prehistoric Dude",gpu,ingame,2020-10-12 12:38:48
,"Pretty Princess Magical Coordinate",,playable,2020-10-15 11:43:41
0100DB200D3E4000,"Pretty Princess Magical Coordinate",,playable,2020-10-15 11:43:41
01007F00128CC000,"Pretty Princess Party",,playable,2022-10-19 17:23:58
010009300D278000,"Preventive Strike",nvdec,playable,2022-10-06 10:55:51
0100210019428000,"Prince of Persia The Lost Crown",crash,ingame,2024-06-08 21:31:58
@@ -2294,13 +2294,13 @@
0100ACE00DAB6000,"Project Nimbus: Complete Edition",nvdec;UE4;vulkan-backend-bug,playable,2022-08-10 17:35:43
01002980140F6000,"Project TRIANGLE STRATEGY™ Debut Demo",UE4;demo,playable,2022-10-24 21:40:27
0100BDB01150E000,"Project Warlock",,playable,2020-06-16 10:50:41
,"Psikyo Collection Vol 1",32-bit,playable,2020-10-11 13:18:47
01009F100BC52000,"Psikyo Collection Vol 1",32-bit,playable,2020-10-11 13:18:47
0100A2300DB78000,"Psikyo Collection Vol. 3",,ingame,2021-06-07 02:46:23
01009D400C4A8000,"Psikyo Collection Vol.2",32-bit,playable,2021-06-07 03:22:07
01007A200F2E2000,"Psikyo Shooting Stars Alpha",32-bit,playable,2021-04-13 12:03:43
0100D7400F2E4000,"Psikyo Shooting Stars Bravo",32-bit,playable,2021-06-14 12:09:07
0100EC100A790000,"PSYVARIAR DELTA",nvdec,playable,2021-01-20 13:01:46
,"Puchitto kurasutā",Need-Update;crash;services,menus,2020-07-04 16:44:28
0100AE700F184000,"Puchitto kurasutā",Need-Update;crash;services,menus,2020-07-04 16:44:28
0100D61010526000,"Pulstario",,playable,2022-10-06 11:02:01
01009AE00B788000,"Pumped BMX Pro",nvdec;online-broken,playable,2022-09-20 17:40:50
01006C10131F6000,"Pumpkin Jack",nvdec;UE4,playable,2022-10-13 12:52:32
@@ -2325,7 +2325,7 @@
0100DCF00F13A000,"Queen's Quest 4: Sacred Truce",nvdec,playable,2022-10-13 12:59:21
0100492012378000,"Quell",gpu,ingame,2021-06-11 15:59:53
01001DE005012000,"Quest of Dungeons",,playable,2021-06-07 10:29:22
,"QuietMansion2",,playable,2020-09-03 14:59:35
010067D011E68000,"QuietMansion2",,playable,2020-09-03 14:59:35
0100AF100EE76000,"Quiplash 2 InterLASHional: The Say Anything Party Game!",online-working,playable,2022-10-19 17:43:45
0100E5400BE64000,"R-Type Dimensions EX",,playable,2020-10-09 12:04:43
0100F930136B6000,"R-Type® Final 2",slow;nvdec;UE4,ingame,2022-10-30 21:46:29
@@ -2383,7 +2383,7 @@
01007A800D520000,"Refunct",UE4,playable,2020-12-15 22:46:21
0100FDF0083A6000,"Regalia: Of Men and Monarchs - Royal Edition",,playable,2022-08-11 12:24:01
01005FD00F15A000,"Regions of Ruin",,playable,2020-08-05 11:38:58
,"Reine des Fleurs",cpu;crash,boots,2020-09-27 18:50:39
0100B5800C0E4000,"Reine des Fleurs",cpu;crash,boots,2020-09-27 18:50:39
0100F1900B144000,"REKT! High Octane Stunts",online,playable,2020-09-28 12:33:56
01002AD013C52000,"Relicta",nvdec;UE4,playable,2022-10-31 12:48:33
010095900B436000,"RemiLore",,playable,2021-06-03 18:58:15
@@ -2495,7 +2495,7 @@
01002DF00F76C000,"SAMURAI SHODOWN",UE4;crash;nvdec,menus,2020-09-06 02:17:00
0100F6800F48E000,"SAMURAI SHODOWN NEOGEO COLLECTION",nvdec,playable,2021-06-14 17:12:56
0100B6501A360000,"Samurai Warrior",,playable,2023-02-27 18:42:38
,"Sangoku Rensenki ~Otome no Heihou!~",gpu;nvdec,ingame,2020-10-17 19:13:14
01000EA00B23C000,"Sangoku Rensenki ~Otome no Heihou!~",gpu;nvdec,ingame,2020-10-17 19:13:14
0100A4700BC98000,"Satsujin Tantei Jack the Ripper",,playable,2021-06-21 16:32:54
0100F0000869C000,"Saturday Morning RPG",nvdec,playable,2022-08-12 12:41:50
01006EE00380C000,"Sausage Sports Club",gpu,ingame,2021-01-10 05:37:17
@@ -2532,7 +2532,7 @@
010054400D2E6000,"SEGA AGES Virtua Racing",online-broken,playable,2023-01-29 17:08:39
01001E700AC60000,"SEGA AGES Wonder Boy: Monster Land",online,playable,2021-05-05 16:28:25
0100B3C014BDA000,"SEGA Genesis™ Nintendo Switch Online",crash;regression,nothing,2022-04-11 07:27:21
,"SEGA Mega Drive Classics",online,playable,2021-01-05 11:08:00
0100F7300B24E000,"SEGA Mega Drive Classics",online,playable,2021-01-05 11:08:00
01009840046BC000,"Semispheres",,playable,2021-01-06 23:08:31
0100D1800D902000,"SENRAN KAGURA Peach Ball",,playable,2021-06-03 15:12:10
0100E0C00ADAC000,"SENRAN KAGURA Reflexions",,playable,2020-03-23 19:15:23
@@ -2585,7 +2585,7 @@
0100B2E00F13E000,"Shipped",,playable,2020-11-21 14:22:32
01000E800FCB4000,"Ships",,playable,2021-06-11 16:14:37
01007430122D0000,"Shiren the Wanderer: The Tower of Fortune and the Dice of Fate",nvdec,playable,2022-10-20 11:44:36
,"Shiritsu Berubara Gakuen ~Versailles no Bara Re*imagination~",cpu;crash,boots,2020-09-27 19:01:25
010027300A660000,"Shiritsu Berubara Gakuen ~Versailles no Bara Re*imagination~",cpu;crash,boots,2020-09-27 19:01:25
01000244016BAE00,"Shiro0",gpu,ingame,2024-01-13 08:54:39
0100CCE00DDB6000,"Shoot 1UP DX",,playable,2020-12-13 12:32:47
01001180021FA000,"Shovel Knight: Specter of Torment",,playable,2020-05-30 08:34:17
@@ -2626,7 +2626,7 @@
0100C52011460000,"Sky: Children of the Light",cpu;online-broken,nothing,2023-02-23 10:57:10
010041C01014E000,"Skybolt Zack",,playable,2021-04-12 18:28:00
0100A0A00D1AA000,"SKYHILL",,playable,2021-03-05 15:19:11
,"Skylanders Imaginators",crash;services,boots,2020-05-30 18:49:18
0100CCC0002E6000,"Skylanders Imaginators",crash;services,boots,2020-05-30 18:49:18
010021A00ABEE000,"SKYPEACE",,playable,2020-05-29 14:14:30
0100EA400BF44000,"SkyScrappers",,playable,2020-05-28 22:11:25
0100F3C00C400000,"SkyTime",slow,ingame,2020-05-30 09:24:51
@@ -2797,7 +2797,7 @@
0100681011B56000,"Struggling",,playable,2020-10-15 20:37:03
0100AF000B4AE000,"Stunt Kite Party",nvdec,playable,2021-01-25 17:16:56
0100C5500E7AE000,"STURMWIND EX",audio;32-bit,playable,2022-09-16 12:01:39
,"Subarashiki Kono Sekai -Final Remix-",services;slow,ingame,2020-02-10 16:21:51
01001C1009892000,"Subarashiki Kono Sekai -Final Remix-",services;slow,ingame,2020-02-10 16:21:51
010001400E474000,"Subdivision Infinity DX",UE4;crash,boots,2021-03-03 14:26:46
0100E6400BCE8000,"Sublevel Zero Redux",,playable,2022-09-16 12:30:03
0100EDA00D866000,"Submerged",nvdec;UE4;vulkan-backend-bug,playable,2022-08-16 15:17:01
@@ -2846,9 +2846,9 @@
0100284007D6C000,"Super One More Jump",,playable,2022-08-17 16:47:47
01001F90122B2000,"Super Punch Patrol",,playable,2024-07-12 19:49:02
0100331005E8E000,"Super Putty Squad",gpu;32-bit,ingame,2024-04-29 15:51:54
,"SUPER ROBOT WARS T",online,playable,2021-03-25 11:00:40
,"SUPER ROBOT WARS V",online,playable,2020-06-23 12:56:37
,"SUPER ROBOT WARS X",online,playable,2020-08-05 19:18:51
01006C900CC60000,"SUPER ROBOT WARS T",online,playable,2021-03-25 11:00:40
0100CA400E300000,"SUPER ROBOT WARS V",online,playable,2020-06-23 12:56:37
010026800E304000,"SUPER ROBOT WARS X",online,playable,2020-08-05 19:18:51
01004CF00A60E000,"Super Saurio Fly",nvdec,playable,2020-08-06 13:12:14
010039700D200000,"Super Skelemania",,playable,2020-06-07 22:59:50
01006A800016E000,"Super Smash Bros.™ Ultimate",gpu;crash;nvdec;ldn-works;intel-vendor-bug,ingame,2024-09-14 23:05:21
@@ -3014,7 +3014,7 @@
010085A00C5E8000,"The Lord of the Rings: Adventure Card Game - Definitive Edition",online-broken,menus,2022-09-16 15:19:32
01008A000A404000,"The Lost Child",nvdec,playable,2021-02-23 15:44:20
0100BAB00A116000,"The Low Road",,playable,2021-02-26 13:23:22
,"The Mahjong",Needs Update;crash;services,nothing,2021-04-01 22:06:22
01005F3006AFE000,"The Mahjong",Needs Update;crash;services,nothing,2021-04-01 22:06:22
0100DC300AC78000,"The Messenger",,playable,2020-03-22 13:51:37
0100DEC00B2BC000,"The Midnight Sanctuary",nvdec;UE4;vulkan-backend-bug,playable,2022-10-03 17:17:32
0100F1B00B456000,"The MISSING: J.J. Macfield and the Island of Memories",,playable,2022-08-22 19:36:18
@@ -3060,7 +3060,7 @@
010064E00ECBC000,"The Unicorn Princess",,playable,2022-09-16 16:20:56
0100BCF00E970000,"The Vanishing of Ethan Carter",UE4,playable,2021-06-09 17:14:47
0100D0500B0A6000,"The VideoKid",nvdec,playable,2021-01-06 09:28:24
,"The Voice",services,menus,2020-07-28 20:48:49
01008CF00BA38000,"The Voice",services,menus,2020-07-28 20:48:49
010056E00B4F4000,"The Walking Dead: A New Frontier",,playable,2022-09-21 13:40:48
010099100B6AC000,"The Walking Dead: Season Two",,playable,2020-08-09 12:57:06
010029200B6AA000,"The Walking Dead: The Complete First Season",,playable,2021-06-04 13:10:56
@@ -3376,7 +3376,7 @@
010022F00DA66000,"Yooka-Laylee and the Impossible Lair",,playable,2021-03-05 17:32:21
01006000040C2000,"Yoshis Crafted World™",gpu;audout,ingame,2021-08-30 13:25:51
0100AE800C9C6000,"Yoshis Crafted World™ Demo",gpu,boots,2020-12-16 14:57:40
,"Yoshiwara Higanbana Kuon no Chigiri",nvdec,playable,2020-10-17 19:14:46
0100BBA00B23E000,"Yoshiwara Higanbana Kuon no Chigiri",nvdec,playable,2020-10-17 19:14:46
01003A400C3DA800,"YouTube",,playable,2024-06-08 05:24:10
00100A7700CCAA40,"Youtubers Life00",nvdec,playable,2022-09-03 14:56:19
0100E390124D8000,"Ys IX: Monstrum Nox",,playable,2022-06-12 04:14:42
@@ -3386,7 +3386,7 @@
01002D60188DE000,"Yu-Gi-Oh! Rush Duel: Dawn of the Battle Royale!! Let's Go! Go Rush!!",crash,ingame,2023-03-17 01:54:01
010037D00DBDC000,"YU-NO: A girl who chants love at the bound of this world.",nvdec,playable,2021-01-26 17:03:52
0100B56011502000,"Yumeutsutsu Re:After",,playable,2022-11-20 16:09:06
,"Yunohana Spring! - Mellow Times -",audio;crash,menus,2020-09-27 19:27:40
0100DE200C0DA000,"Yunohana Spring! - Mellow Times -",audio;crash,menus,2020-09-27 19:27:40
0100307011C44000,"Yuppie Psycho: Executive Edition",crash,ingame,2020-12-11 10:37:06
0100FC900963E000,"Yuri",,playable,2021-06-11 13:08:50
010092400A678000,"Zaccaria Pinball",online-broken,playable,2022-09-03 15:44:28
@@ -3397,7 +3397,7 @@
0100AAC00E692000,"Zenith",,playable,2022-09-17 09:57:02
0100A6A00894C000,"ZERO GUNNER 2- for Nintendo Switch",,playable,2021-01-04 20:17:14
01004B001058C000,"Zero Strain",services;UE4,menus,2021-11-10 07:48:32
,"Zettai kaikyu gakuen",gpu;nvdec,ingame,2020-08-25 15:15:54
010021300F69E000,"Zettai kaikyu gakuen",gpu;nvdec,ingame,2020-08-25 15:15:54
0100D7B013DD0000,"Ziggy the Chaser",,playable,2021-02-04 20:34:27
010086700EF16000,"ZikSquare",gpu,ingame,2021-11-06 02:02:48
010069C0123D8000,"Zoids Wild Blast Unleashed",nvdec,playable,2022-10-15 11:26:59
@@ -3409,7 +3409,7 @@
0100CD300A1BA000,"Zombillie",,playable,2020-07-23 17:42:23
01001EE00A6B0000,"Zotrix: Solar Division",,playable,2021-06-07 20:34:05
0100B9B00C6A4000,"この世の果てで恋を唄う少女YU-NO",audio,ingame,2021-01-22 07:00:16
,"スーパーファミコン Nintendo Switch Online",slow,ingame,2020-03-14 05:48:38
0100E8600C504000,"スーパーファミコン Nintendo Switch Online",slow,ingame,2020-03-14 05:48:38
01000BB01CB8A000,"トラブル・マギア ~訳アリ少女は未来を勝ち取るために異国の魔法学校へ留学します~(Trouble Magia ~Wakeari Shoujo wa Mirai o Kachitoru Tame ni Ikoku no Mahou Gakkou e Ryuugaku Shimasu~)",,nothing,2024-09-28 07:03:14
010065500B218000,"メモリーズオフ - Innocent Fille",,playable,2022-12-02 17:36:48
010032400E700000,"二ノ国 白き聖灰の女王",services;32-bit,menus,2023-04-16 17:11:06
1 title_id game_name labels status last_updated
167 01006C40086EA000 AeternoBlade nvdec playable 2020-12-14 20:06:48
168 0100B1C00949A000 AeternoBlade Demo nvdec playable 2021-02-09 14:39:26
169 01009D100EA28000 AeternoBlade II online-broken;UE4;vulkan-backend-bug playable 2022-09-12 21:11:18
170 0100B1C00949A000 AeternoBlade II Demo Version gpu;nvdec ingame 2021-02-09 15:10:19
171 01001B400D334000 AFL Evolution 2 slow;online-broken;UE4 playable 2022-12-07 12:45:56
172 0100DB100BBCE000 Afterparty playable 2022-09-22 12:23:19
173 010087C011C4E000 Agatha Christie - The ABC Murders playable 2020-10-27 17:08:23
477 010020700DE04000 Bear With Me: The Lost Robots nvdec playable 2021-02-27 14:20:10
478 010024200E97E800 Bear With Me: The Lost Robots Demo nvdec playable 2021-02-12 22:38:12
479 0100C0E014A4E000 Bear's Restaurant playable 2024-08-11 21:26:59
480 010045F00BF64000 BEAST Darling! ~Kemomimi Danshi to Himitsu no Ryou~ crash menus 2020-10-04 06:12:08
481 01009C300BB4C000 Beat Cop playable 2021-01-06 19:26:48
482 01002D20129FC000 Beat Me! online-broken playable 2022-10-16 21:59:26
483 01006B0014590000 BEAUTIFUL DESOLATION gpu;nvdec ingame 2022-10-26 10:34:38
703 01006A30124CA000 Chocobo GP gpu;crash ingame 2022-06-04 14:52:18
704 0100BF600BF26000 Chocobo's Mystery Dungeon EVERY BUDDY! slow playable 2020-05-26 13:53:13
705 01000BA0132EA000 Choices That Matter: And The Sun Went Out playable 2020-12-17 15:44:08
706 0100A1200CA3C000 Chou no Doku Hana no Kusari: Taishou Irokoi Ibun gpu;nvdec ingame 2020-09-28 17:58:04
707 010039A008E76000 ChromaGun playable 2020-05-26 12:56:42
708 010006800E13A000 Chronos: Before the Ashes UE4;gpu;nvdec ingame 2020-12-11 22:16:35
709 010039700BA7E000 Circle of Sumo playable 2020-05-22 12:45:21
769 0100CCB01B1A0000 COSMIC FANTASY COLLECTION ingame 2024-05-21 17:56:37
770 010067C00A776000 Cosmic Star Heroine playable 2021-02-20 14:30:47
771 01003DD00F94A000 COTTOn Reboot! [ コットン リブート! ] playable 2022-05-24 16:29:24
772 010077001526E000 Cotton/Guardian Saturn Tribute Games gpu boots 2022-11-27 21:00:51
773 01000E301107A000 Couch Co-Op Bundle Vol. 2 nvdec playable 2022-10-02 12:04:21
774 0100C1E012A42000 Country Tales playable 2021-06-17 16:45:39
775 01003370136EA000 Cozy Grove gpu ingame 2023-07-30 22:22:19
830 01003ED0099B0000 Danger Mouse: The Danger Games crash;online boots 2022-07-22 15:49:45
831 0100EFA013E7C000 Danger Scavenger nvdec playable 2021-04-17 15:53:04
832 0100417007F78000 Danmaku Unlimited 3 playable 2020-11-15 00:48:35
833 01000330105BE000 Darius Cozmic Collection playable 2021-02-19 20:59:06
834 010059C00BED4000 Darius Cozmic Collection Special Edition playable 2022-07-22 16:26:50
835 010015800F93C000 Dariusburst - Another Chronicle EX+ online playable 2021-04-05 14:21:43
836 01003D301357A000 Dark Arcana: The Carnival gpu;slow ingame 2022-02-19 08:52:28
859 010095A011A14000 Deadly Days playable 2020-11-27 13:38:55
860 0100BAC011928000 Deadly Premonition 2: A Blessing In Disguise playable 2021-06-15 14:12:36
861 0100EBE00F22E000 Deadly Premonition Origins 32-bit;nvdec playable 2024-03-25 12:47:46
862 010015600D814000 Dear Magi - Mahou Shounen Gakka - playable 2020-11-22 16:45:16
863 01000D60126B6000 Death and Taxes playable 2020-12-15 20:27:49
864 010012B011AB2000 Death Come True nvdec playable 2021-06-10 22:30:49
865 0100F3B00CF32000 Death Coming crash nothing 2022-02-06 07:43:03
902 010023600C704000 Deponia nvdec playable 2021-01-26 17:17:19
903 0100ED700469A000 Deru - The Art of Cooperation playable 2021-01-07 16:59:59
904 0100D4600D0E4000 Descenders gpu ingame 2020-12-10 15:22:36
905 0100D870102BC000 Desire remaster ver. crash boots 2021-01-17 02:34:37
906 010069500DD86000 Destiny Connect: Tick-Tock Travelers UE4;gpu;nvdec ingame 2020-12-16 12:20:36
907 01008BB011ED6000 Destrobots playable 2021-03-06 14:37:05
908 01009E701356A000 Destroy All Humans! gpu;nvdec;UE4 ingame 2023-01-14 22:23:53
909 010030600E65A000 Detective Dolittle playable 2021-03-02 14:03:59
910 01009C0009842000 Detective Gallo nvdec playable 2022-07-24 11:51:04
911 01002D400B0F6000 Detective Jinguji Saburo Prism of Eyes playable 2020-10-02 21:54:41
912 010007500F27C000 Detective Pikachu™ Returns playable 2023-10-07 10:24:59
913 010031B00CF66000 Devil Engine playable 2021-06-04 11:54:30
914 01002F000E8F2000 Devil Kingdom playable 2023-01-31 08:58:44
1057 01004F000B716000 Edna & Harvey: The Breakout – Anniversary Edition crash;nvdec ingame 2022-08-01 16:59:56
1058 01002550129F0000 Effie playable 2022-10-27 14:36:39
1059 0100CC0010A46000 Ego Protocol: Remastered nvdec playable 2020-12-16 20:16:35
1060 01004CC00B352000 Eiga Sumikko Gurashi Tobidasu Ehon to Himitsu no Ko Game de Asobo Ehon no Sekai playable 2020-11-12 00:11:50
1061 01003AD013BD2000 Eight Dragons nvdec playable 2022-10-27 14:47:28
1062 010020A01209C000 El Hijo - A Wild West Tale nvdec playable 2021-04-19 17:44:08
1063 0100B5B00EF38000 Elden: Path of the Forgotten playable 2020-12-15 00:33:19
1123 01005C10136CA000 Fantasy Tavern Sextet -Vol.2 Adventurer's Days- gpu;slow;crash ingame 2021-11-06 02:57:29
1124 010022700E7D6000 FAR: Lone Sails playable 2022-09-06 16:33:05
1125 0100C9E00FD62000 Farabel playable 2020-08-03 17:47:28
1126 0100ECD00C806000 Farm Expert 2019 for Nintendo Switch playable 2020-07-09 21:42:57
1127 01000E400ED98000 Farm Mystery nvdec playable 2022-09-06 16:46:47
1128 010086B00BB50000 Farm Together playable 2021-01-19 20:01:19
1129 0100EB600E914000 Farming Simulator 20 nvdec playable 2021-06-13 10:52:44
1246 0100ECE00C0C4000 Fury Unleashed crash;services ingame 2020-10-18 11:52:40
1247 010070000ED9E000 Fury Unleashed Demo playable 2020-10-08 20:09:21
1248 0100E1F013674000 FUSER™ nvdec;UE4 playable 2022-10-17 20:58:32
1249 0100A7A015E4C000 Fushigi no Gensokyo Lotus Labyrinth Needs Update;audio;gpu;nvdec ingame 2021-01-20 15:30:02
1250 01003C300B274000 Futari de! Nyanko Daisensou playable 2024-01-05 22:26:52
1251 010055801134E000 FUZE Player online-broken;vulkan-backend-bug ingame 2022-10-18 12:23:53
1252 0100EAD007E98000 FUZE4 Nintendo Switch vulkan-backend-bug playable 2022-09-06 19:25:01
1253 010067600F1A0000 FuzzBall crash nothing 2021-03-29 20:13:21
1254 0100275011e54000 G-MODE Archives 06 The strongest ever Julia Miyamoto playable 2020-10-15 13:06:26
1255 0100EB10108EA000 G.I. Joe: Operation Blackout UE4;crash boots 2020-11-21 12:37:44
1256 010048600B14E000 Gal Metal playable 2022-07-27 20:57:48
1257 010024700901A000 Gal*Gun 2 nvdec;UE4 playable 2022-07-27 12:45:37
1370 01006F80082E4000 GUILTY GEAR XX ACCENT CORE PLUS R nvdec playable 2021-01-13 09:28:33
1371 01003C6008940000 GUNBIRD for Nintendo Switch 32-bit playable 2021-06-04 19:16:01
1372 0100BCB00AE98000 GUNBIRD2 for Nintendo Switch playable 2020-10-10 14:41:16
1373 01003FF010312000 Gunka o haita neko gpu;nvdec ingame 2020-08-25 12:37:56
1374 010061000D318000 Gunman Clive HD Collection playable 2020-10-09 12:17:35
1375 01006D4003BCE000 Guns, Gore and Cannoli 2 online playable 2021-01-06 18:43:59
1376 01008C800E654000 Gunvolt Chronicles Luminous Avenger iX - Retail Version playable 2020-06-16 22:47:07
1564 0100BDC00A664000 KAMEN RIDER CLIMAX SCRAMBLE nvdec;ldn-untested playable 2024-07-03 08:51:11
1565 0100A9801180E000 KAMEN RIDER memory of heroez / Premium Sound Edition playable 2022-12-06 03:14:26
1566 010085300314E000 KAMIKO playable 2020-05-13 12:48:57
1567 010042C011736000 Kangokuto Mary Skelter Finale audio;crash ingame 2021-01-09 22:39:28
1568 01007FD00DB20000 Katakoi Contrast - collection of branch - nvdec playable 2022-12-09 09:41:26
1569 0100D7000C2C6000 Katamari Damacy REROLL playable 2022-08-02 21:35:05
1570 0100F9800EDFA000 KATANA KAMI: A Way of the Samurai Story slow playable 2022-04-09 10:40:16
1581 0100FB400D832000 KILL la KILL -IF playable 2020-06-09 14:47:08
1582 010011B00910C000 Kill The Bad Guy playable 2020-05-12 22:16:10
1583 0100F2900B3E2000 Killer Queen Black ldn-untested;online playable 2021-04-08 12:46:18
1584 010014A00C5E0000 Kin'iro no Corda Octave playable 2020-09-22 13:23:12
1585 010089000F0E8000 Kine UE4 playable 2022-09-14 14:28:37
1586 0100E6B00FFBA000 King Lucas playable 2022-09-21 19:43:23
1587 0100B1300783E000 King Oddball playable 2020-05-13 13:47:57
1612 01009EF00DDB4000 Knockout City™ services;online-broken boots 2022-12-09 09:48:58
1613 0100C57019BA2000 Koa and the Five Pirates of Mara gpu ingame 2024-07-11 16:14:44
1614 01001E500401C000 Koi DX playable 2020-05-11 21:37:51
1615 010052300F612000 Koi no Hanasaku Hyakkaen 32-bit;gpu;nvdec ingame 2020-10-03 14:17:10
1616 01005D200C9AA000 Koloro playable 2022-08-03 12:34:02
1617 0100464009294000 Kona playable 2022-08-03 12:48:19
1618 010016C011AAA000 Kono Subarashii Sekai ni Shukufuku o Kono Yokubo no Isho ni Choai o playable 2023-04-26 09:51:08
1779 0100EC000CE24000 Mech Rage playable 2020-11-18 12:30:16
1780 0100C4F005EB4000 Mecho Tales playable 2022-08-04 17:03:19
1781 0100E4600D31A000 Mechstermination Force playable 2024-07-04 05:39:15
1782 01007580124C0000 Medarot Classics Plus Kabuto Ver playable 2020-11-21 11:31:18
1783 0100228012682000 Medarot Classics Plus Kuwagata Ver playable 2020-11-21 11:30:40
1784 0100BBC00CB9A000 Mega Mall Story slow playable 2022-08-04 17:10:58
1785 0100B0C0086B0000 Mega Man 11 playable 2021-04-26 12:07:53
1786 010038E016264000 Mega Man Battle Network Legacy Collection Vol. 1 playable 2023-04-25 03:55:57
1797 0100B360068B2000 Mekorama gpu boots 2021-06-17 16:37:21
1798 01000FA010340000 Melbits World nvdec;online menus 2021-11-26 13:51:22
1799 0100F68019636000 Melon Journey playable 2023-04-23 21:20:01
1800 010079C012896000 Memories Off -Innocent Fille- for Dearest playable 2020-08-04 07:31:22
1801 010062F011E7C000 Memory Lane UE4 playable 2022-10-05 14:31:03
1802 0100EBE00D5B0000 Meow Motors UE4;gpu ingame 2020-12-18 00:24:01
1803 0100273008FBC000 Mercenaries Saga Chronicles playable 2021-01-10 12:48:19
1873 010093A01305C000 Monster Hunter Rise Demo online-broken;ldn-works;demo playable 2022-10-18 23:04:17
1874 0100E21011446000 Monster Hunter Stories 2: Wings of Ruin services ingame 2022-07-10 19:27:30
1875 010042501329E000 MONSTER HUNTER STORIES 2: WINGS OF RUIN Trial Version demo playable 2022-11-13 22:20:26
1876 0100C51003B46000 Monster Hunter XX Demo 32-bit;cpu nothing 2020-03-22 10:12:28
1877 0100C3800049C000 Monster Hunter XX Nintendo Switch Ver ( Double Cross ) playable 2024-07-21 14:08:09
1878 010088400366E000 Monster Jam Crush It! UE4;nvdec;online playable 2021-04-08 19:29:27
1879 010095C00F354000 Monster Jam Steel Titans crash;nvdec;UE4 menus 2021-11-14 09:45:38
1917 010035901046C000 Mushroom Quest playable 2020-05-17 13:07:08
1918 0100700006EF6000 Mushroom Wars 2 nvdec playable 2020-09-28 15:26:08
1919 010046400F310000 Music Racer playable 2020-08-10 08:51:23
1920 0100153006300000 Musou Orochi 2 Ultimate crash;nvdec boots 2021-04-09 19:39:16
1921 0100F6000EAA8000 Must Dash Amigos playable 2022-09-20 16:45:56
1922 01007B6006092000 MUSYNX playable 2020-05-08 14:24:43
1923 0100C3E00ACAA000 Mutant Football League: Dynasty Edition online-broken playable 2022-08-05 17:01:51
1948 0100A6F00AC70000 NAIRI: Tower of Shirin nvdec playable 2020-08-09 19:49:12
1949 010002F001220000 NAMCO MUSEUM ldn-untested playable 2024-08-13 07:52:21
1950 0100DAA00AEE6000 NAMCO MUSEUM™ ARCADE PAC™ playable 2021-06-07 21:44:50
1951 010039F010E14000 NAMCOT COLLECTION audio playable 2020-06-25 13:35:22
1952 010072B00BDDE000 Narcos: Rise of the Cartels UE4;crash;nvdec boots 2021-03-22 13:18:47
1953 01006BB00800A000 NARUTO SHIPPUDEN: Ultimate Ninja STORM 3 Full Burst nvdec playable 2024-06-16 14:58:05
1954 010084D00CF5E000 NARUTO SHIPPUDEN™: Ultimate Ninja® STORM 4 ROAD TO BORUTO playable 2024-06-29 13:04:22
2089 0100F9D00C186000 Olympia Soiree playable 2022-12-04 21:07:12
2090 0100A8B00E14A000 Olympic Games Tokyo 2020 – The Official Video Game™ ldn-untested;nvdec;online playable 2021-01-06 01:20:24
2091 01001D600E51A000 Omega Labyrinth Life playable 2021-02-23 21:03:03
2092 01005DE00CA34000 Omega Vampire nvdec playable 2020-10-17 19:15:35
2093 0100CDC00C40A000 Omensight: Definitive Edition UE4;crash;nvdec ingame 2020-07-26 01:45:14
2094 01006DB00D970000 OMG Zombies! 32-bit playable 2021-04-12 18:04:45
2095 010014E017B14000 OMORI playable 2023-01-07 20:21:02
2096 0100A5F011800000 Once Upon A Coma nvdec playable 2020-08-01 12:09:39
2097 0100BD3006A02000 One More Dungeon playable 2021-01-06 09:10:58
2098 010076600FD64000 One Person Story playable 2020-07-14 11:51:02
2099 0100774009CF6000 ONE PIECE Pirate Warriors 3 Deluxe Edition nvdec playable 2020-05-10 06:23:52
2184 010062B01525C000 Persona 4 Golden playable 2024-08-07 17:48:07
2185 01005CA01580E000 Persona 5 Royal gpu ingame 2024-08-17 21:45:15
2186 010087701B092000 Persona 5 Tactica playable 2024-04-01 22:21:03
2187 0100E4F010D92000 Persona 5: Scramble deadlock boots 2020-10-04 03:22:29
2188 0100801011C3E000 Persona® 5 Strikers nvdec;mac-bug playable 2023-09-26 09:36:01
2189 010044400EEAE000 Petoons Party nvdec playable 2021-03-02 21:07:58
2190 010053401147C000 PGA TOUR 2K21 deadlock;nvdec ingame 2022-10-05 21:53:50
2273 0100D1C01C194000 Powerful Pro Baseball 2024-2025 gpu ingame 2024-08-25 06:40:48
2274 01008E100E416000 PowerSlave Exhumed gpu ingame 2023-07-31 23:19:10
2275 010054F01266C000 Prehistoric Dude gpu ingame 2020-10-12 12:38:48
2276 0100DB200D3E4000 Pretty Princess Magical Coordinate playable 2020-10-15 11:43:41
2277 01007F00128CC000 Pretty Princess Party playable 2022-10-19 17:23:58
2278 010009300D278000 Preventive Strike nvdec playable 2022-10-06 10:55:51
2279 0100210019428000 Prince of Persia The Lost Crown crash ingame 2024-06-08 21:31:58
2294 0100ACE00DAB6000 Project Nimbus: Complete Edition nvdec;UE4;vulkan-backend-bug playable 2022-08-10 17:35:43
2295 01002980140F6000 Project TRIANGLE STRATEGY™ Debut Demo UE4;demo playable 2022-10-24 21:40:27
2296 0100BDB01150E000 Project Warlock playable 2020-06-16 10:50:41
2297 01009F100BC52000 Psikyo Collection Vol 1 32-bit playable 2020-10-11 13:18:47
2298 0100A2300DB78000 Psikyo Collection Vol. 3 ingame 2021-06-07 02:46:23
2299 01009D400C4A8000 Psikyo Collection Vol.2 32-bit playable 2021-06-07 03:22:07
2300 01007A200F2E2000 Psikyo Shooting Stars Alpha 32-bit playable 2021-04-13 12:03:43
2301 0100D7400F2E4000 Psikyo Shooting Stars Bravo 32-bit playable 2021-06-14 12:09:07
2302 0100EC100A790000 PSYVARIAR DELTA nvdec playable 2021-01-20 13:01:46
2303 0100AE700F184000 Puchitto kurasutā Need-Update;crash;services menus 2020-07-04 16:44:28
2304 0100D61010526000 Pulstario playable 2022-10-06 11:02:01
2305 01009AE00B788000 Pumped BMX Pro nvdec;online-broken playable 2022-09-20 17:40:50
2306 01006C10131F6000 Pumpkin Jack nvdec;UE4 playable 2022-10-13 12:52:32
2325 0100DCF00F13A000 Queen's Quest 4: Sacred Truce nvdec playable 2022-10-13 12:59:21
2326 0100492012378000 Quell gpu ingame 2021-06-11 15:59:53
2327 01001DE005012000 Quest of Dungeons playable 2021-06-07 10:29:22
2328 010067D011E68000 QuietMansion2 playable 2020-09-03 14:59:35
2329 0100AF100EE76000 Quiplash 2 InterLASHional: The Say Anything Party Game! online-working playable 2022-10-19 17:43:45
2330 0100E5400BE64000 R-Type Dimensions EX playable 2020-10-09 12:04:43
2331 0100F930136B6000 R-Type® Final 2 slow;nvdec;UE4 ingame 2022-10-30 21:46:29
2383 01007A800D520000 Refunct UE4 playable 2020-12-15 22:46:21
2384 0100FDF0083A6000 Regalia: Of Men and Monarchs - Royal Edition playable 2022-08-11 12:24:01
2385 01005FD00F15A000 Regions of Ruin playable 2020-08-05 11:38:58
2386 0100B5800C0E4000 Reine des Fleurs cpu;crash boots 2020-09-27 18:50:39
2387 0100F1900B144000 REKT! High Octane Stunts online playable 2020-09-28 12:33:56
2388 01002AD013C52000 Relicta nvdec;UE4 playable 2022-10-31 12:48:33
2389 010095900B436000 RemiLore playable 2021-06-03 18:58:15
2495 01002DF00F76C000 SAMURAI SHODOWN UE4;crash;nvdec menus 2020-09-06 02:17:00
2496 0100F6800F48E000 SAMURAI SHODOWN NEOGEO COLLECTION nvdec playable 2021-06-14 17:12:56
2497 0100B6501A360000 Samurai Warrior playable 2023-02-27 18:42:38
2498 01000EA00B23C000 Sangoku Rensenki ~Otome no Heihou!~ gpu;nvdec ingame 2020-10-17 19:13:14
2499 0100A4700BC98000 Satsujin Tantei Jack the Ripper playable 2021-06-21 16:32:54
2500 0100F0000869C000 Saturday Morning RPG nvdec playable 2022-08-12 12:41:50
2501 01006EE00380C000 Sausage Sports Club gpu ingame 2021-01-10 05:37:17
2532 010054400D2E6000 SEGA AGES Virtua Racing online-broken playable 2023-01-29 17:08:39
2533 01001E700AC60000 SEGA AGES Wonder Boy: Monster Land online playable 2021-05-05 16:28:25
2534 0100B3C014BDA000 SEGA Genesis™ – Nintendo Switch Online crash;regression nothing 2022-04-11 07:27:21
2535 0100F7300B24E000 SEGA Mega Drive Classics online playable 2021-01-05 11:08:00
2536 01009840046BC000 Semispheres playable 2021-01-06 23:08:31
2537 0100D1800D902000 SENRAN KAGURA Peach Ball playable 2021-06-03 15:12:10
2538 0100E0C00ADAC000 SENRAN KAGURA Reflexions playable 2020-03-23 19:15:23
2585 0100B2E00F13E000 Shipped playable 2020-11-21 14:22:32
2586 01000E800FCB4000 Ships playable 2021-06-11 16:14:37
2587 01007430122D0000 Shiren the Wanderer: The Tower of Fortune and the Dice of Fate nvdec playable 2022-10-20 11:44:36
2588 010027300A660000 Shiritsu Berubara Gakuen ~Versailles no Bara Re*imagination~ cpu;crash boots 2020-09-27 19:01:25
2589 01000244016BAE00 Shiro0 gpu ingame 2024-01-13 08:54:39
2590 0100CCE00DDB6000 Shoot 1UP DX playable 2020-12-13 12:32:47
2591 01001180021FA000 Shovel Knight: Specter of Torment playable 2020-05-30 08:34:17
2626 0100C52011460000 Sky: Children of the Light cpu;online-broken nothing 2023-02-23 10:57:10
2627 010041C01014E000 Skybolt Zack playable 2021-04-12 18:28:00
2628 0100A0A00D1AA000 SKYHILL playable 2021-03-05 15:19:11
2629 0100CCC0002E6000 Skylanders Imaginators crash;services boots 2020-05-30 18:49:18
2630 010021A00ABEE000 SKYPEACE playable 2020-05-29 14:14:30
2631 0100EA400BF44000 SkyScrappers playable 2020-05-28 22:11:25
2632 0100F3C00C400000 SkyTime slow ingame 2020-05-30 09:24:51
2797 0100681011B56000 Struggling playable 2020-10-15 20:37:03
2798 0100AF000B4AE000 Stunt Kite Party nvdec playable 2021-01-25 17:16:56
2799 0100C5500E7AE000 STURMWIND EX audio;32-bit playable 2022-09-16 12:01:39
2800 01001C1009892000 Subarashiki Kono Sekai -Final Remix- services;slow ingame 2020-02-10 16:21:51
2801 010001400E474000 Subdivision Infinity DX UE4;crash boots 2021-03-03 14:26:46
2802 0100E6400BCE8000 Sublevel Zero Redux playable 2022-09-16 12:30:03
2803 0100EDA00D866000 Submerged nvdec;UE4;vulkan-backend-bug playable 2022-08-16 15:17:01
2846 0100284007D6C000 Super One More Jump playable 2022-08-17 16:47:47
2847 01001F90122B2000 Super Punch Patrol playable 2024-07-12 19:49:02
2848 0100331005E8E000 Super Putty Squad gpu;32-bit ingame 2024-04-29 15:51:54
2849 01006C900CC60000 SUPER ROBOT WARS T online playable 2021-03-25 11:00:40
2850 0100CA400E300000 SUPER ROBOT WARS V online playable 2020-06-23 12:56:37
2851 010026800E304000 SUPER ROBOT WARS X online playable 2020-08-05 19:18:51
2852 01004CF00A60E000 Super Saurio Fly nvdec playable 2020-08-06 13:12:14
2853 010039700D200000 Super Skelemania playable 2020-06-07 22:59:50
2854 01006A800016E000 Super Smash Bros.™ Ultimate gpu;crash;nvdec;ldn-works;intel-vendor-bug ingame 2024-09-14 23:05:21
3014 010085A00C5E8000 The Lord of the Rings: Adventure Card Game - Definitive Edition online-broken menus 2022-09-16 15:19:32
3015 01008A000A404000 The Lost Child nvdec playable 2021-02-23 15:44:20
3016 0100BAB00A116000 The Low Road playable 2021-02-26 13:23:22
3017 01005F3006AFE000 The Mahjong Needs Update;crash;services nothing 2021-04-01 22:06:22
3018 0100DC300AC78000 The Messenger playable 2020-03-22 13:51:37
3019 0100DEC00B2BC000 The Midnight Sanctuary nvdec;UE4;vulkan-backend-bug playable 2022-10-03 17:17:32
3020 0100F1B00B456000 The MISSING: J.J. Macfield and the Island of Memories playable 2022-08-22 19:36:18
3060 010064E00ECBC000 The Unicorn Princess playable 2022-09-16 16:20:56
3061 0100BCF00E970000 The Vanishing of Ethan Carter UE4 playable 2021-06-09 17:14:47
3062 0100D0500B0A6000 The VideoKid nvdec playable 2021-01-06 09:28:24
3063 01008CF00BA38000 The Voice services menus 2020-07-28 20:48:49
3064 010056E00B4F4000 The Walking Dead: A New Frontier playable 2022-09-21 13:40:48
3065 010099100B6AC000 The Walking Dead: Season Two playable 2020-08-09 12:57:06
3066 010029200B6AA000 The Walking Dead: The Complete First Season playable 2021-06-04 13:10:56
3376 010022F00DA66000 Yooka-Laylee and the Impossible Lair playable 2021-03-05 17:32:21
3377 01006000040C2000 Yoshi’s Crafted World™ gpu;audout ingame 2021-08-30 13:25:51
3378 0100AE800C9C6000 Yoshi’s Crafted World™ Demo gpu boots 2020-12-16 14:57:40
3379 0100BBA00B23E000 Yoshiwara Higanbana Kuon no Chigiri nvdec playable 2020-10-17 19:14:46
3380 01003A400C3DA800 YouTube playable 2024-06-08 05:24:10
3381 00100A7700CCAA40 Youtubers Life00 nvdec playable 2022-09-03 14:56:19
3382 0100E390124D8000 Ys IX: Monstrum Nox playable 2022-06-12 04:14:42
3386 01002D60188DE000 Yu-Gi-Oh! Rush Duel: Dawn of the Battle Royale!! Let's Go! Go Rush!! crash ingame 2023-03-17 01:54:01
3387 010037D00DBDC000 YU-NO: A girl who chants love at the bound of this world. nvdec playable 2021-01-26 17:03:52
3388 0100B56011502000 Yumeutsutsu Re:After playable 2022-11-20 16:09:06
3389 0100DE200C0DA000 Yunohana Spring! - Mellow Times - audio;crash menus 2020-09-27 19:27:40
3390 0100307011C44000 Yuppie Psycho: Executive Edition crash ingame 2020-12-11 10:37:06
3391 0100FC900963E000 Yuri playable 2021-06-11 13:08:50
3392 010092400A678000 Zaccaria Pinball online-broken playable 2022-09-03 15:44:28
3397 0100AAC00E692000 Zenith playable 2022-09-17 09:57:02
3398 0100A6A00894C000 ZERO GUNNER 2- for Nintendo Switch playable 2021-01-04 20:17:14
3399 01004B001058C000 Zero Strain services;UE4 menus 2021-11-10 07:48:32
3400 010021300F69E000 Zettai kaikyu gakuen gpu;nvdec ingame 2020-08-25 15:15:54
3401 0100D7B013DD0000 Ziggy the Chaser playable 2021-02-04 20:34:27
3402 010086700EF16000 ZikSquare gpu ingame 2021-11-06 02:02:48
3403 010069C0123D8000 Zoids Wild Blast Unleashed nvdec playable 2022-10-15 11:26:59
3409 0100CD300A1BA000 Zombillie playable 2020-07-23 17:42:23
3410 01001EE00A6B0000 Zotrix: Solar Division playable 2021-06-07 20:34:05
3411 0100B9B00C6A4000 この世の果てで恋を唄う少女YU-NO audio ingame 2021-01-22 07:00:16
3412 0100E8600C504000 スーパーファミコン Nintendo Switch Online slow ingame 2020-03-14 05:48:38
3413 01000BB01CB8A000 トラブル・マギア ~訳アリ少女は未来を勝ち取るために異国の魔法学校へ留学します~(Trouble Magia ~Wakeari Shoujo wa Mirai o Kachitoru Tame ni Ikoku no Mahou Gakkou e Ryuugaku Shimasu~) nothing 2024-09-28 07:03:14
3414 010065500B218000 メモリーズオフ - Innocent Fille playable 2022-12-02 17:36:48
3415 010032400E700000 二ノ国 白き聖灰の女王 services;32-bit menus 2023-04-16 17:11:06

View File

@@ -1,4 +1,4 @@
using Gommon;
using Gommon;
using Ryujinx.Common.Configuration;
using System;
using System.Linq;
@@ -47,6 +47,9 @@ namespace Ryujinx.Common
public static readonly string[] DiscordGameAssetKeys =
[
"010008900705c000", // Dragon Quest Builders
"010042000a986000", // Dragon Quest Builders 2
"010055d009f78000", // Fire Emblem: Three Houses
"0100a12011cc8000", // Fire Emblem: Shadow Dragon
"0100a6301214e000", // Fire Emblem Engage
@@ -105,17 +108,18 @@ namespace Ryujinx.Common
"0100f4c009322000", // Pikmin 3 Deluxe
"0100b7c00933a000", // Pikmin 4
"0100f4300bf2c000", // New Pokémon Snap
"0100000011d90000", // Pokémon Brilliant Diamond
"01001f5010dfa000", // Pokémon Legends: Arceus
"010003f003a34000", // Pokémon: Let's Go Pikachu!
"0100187003a36000", // Pokémon: Let's Go Eevee!
"0100abf008968000", // Pokémon Sword
"01008db008c2c000", // Pokémon Shield
"0100000011d90000", // Pokémon Brilliant Diamond
"010018e011d92000", // Pokémon Shining Pearl
"01001f5010dfa000", // Pokémon Legends: Arceus
"01003d200baa2000", // Pokémon Mystery Dungeon - Rescue Team DX
"0100a3d008c5c000", // Pokémon Scarlet
"01008db008c2c000", // Pokémon Shield
"010018e011d92000", // Pokémon Shining Pearl
"0100abf008968000", // Pokémon Sword
"01008f6008c5e000", // Pokémon Violet
"0100b3f000be2000", // Pokkén Tournament DX
"0100f4300bf2c000", // New Pokémon Snap
"01003bc0000a0000", // Splatoon 2 (US)
"0100f8f0000a2000", // Splatoon 2 (EU)
@@ -165,13 +169,21 @@ namespace Ryujinx.Common
"01005ea01c0fc000", // SONIC X SHADOW GENERATIONS
"01005ea01c0fc001", // ^
"0100ff500e34a000", // Xenoblade Chronicles - Definitive Edition
"0100e95004038000", // Xenoblade Chronicles 2
"010074f013262000", // Xenoblade Chronicles 3
"010056e00853a000", // A Hat in Time
"0100fd1014726000", // Baldurs Gate: Dark Alliance
"0100dbf01000a000", // Burnout Paradise Remastered
"0100744001588000", // Cars 3: Driven to Win
"0100b41013c82000", // Cruis'n Blast
"010085900337e000", // Death Squared
"01001b300b9be000", // Diablo III: Eternal Collection
"01008c8012920000", // Dying Light Platinum Edition
"01001cc01b2d4000", // Goat Simulator 3
"01003620068ea000", // Hand of Fate 2
"010085500130a000", // Lego City: Undercover
"010073c01af34000", // LEGO Horizon Adventures
"0100770008dd8000", // Monster Hunter Generations Ultimate
"0100b04011742000", // Monster Hunter Rise
@@ -190,6 +202,8 @@ namespace Ryujinx.Common
"01000a10041ea000", // The Elder Scrolls V: Skyrim
"010057a01e4d4000", // TSUKIHIME -A piece of blue glass moon-
"010080b00ad66000", // Undertale
"010069401adb8000", // Unicorn Overlord
"0100534009ff2000", // Yonder - The cloud catcher chronicles
];
}
}

View File

@@ -50,6 +50,10 @@ namespace Ryujinx.Graphics.GAL
public readonly bool SupportsViewportSwizzle;
public readonly bool SupportsIndirectParameters;
public readonly bool SupportsDepthClipControl;
public readonly bool SupportsExtendedDynamicState;
public readonly bool SupportsExtendedDynamicState2;
public readonly bool SupportsLogicOpDynamicState;
public readonly bool SupportsPatchControlPointsDynamicState;
public readonly int UniformBufferSetIndex;
public readonly int StorageBufferSetIndex;
@@ -118,6 +122,10 @@ namespace Ryujinx.Graphics.GAL
bool supportsViewportSwizzle,
bool supportsIndirectParameters,
bool supportsDepthClipControl,
bool supportsExtendedDynamicState,
bool supportsExtendedDynamicState2,
bool supportsLogicOpDynamicState,
bool supportsPatchControlPointsDynamicState,
int uniformBufferSetIndex,
int storageBufferSetIndex,
int textureSetIndex,
@@ -180,6 +188,10 @@ namespace Ryujinx.Graphics.GAL
SupportsViewportSwizzle = supportsViewportSwizzle;
SupportsIndirectParameters = supportsIndirectParameters;
SupportsDepthClipControl = supportsDepthClipControl;
SupportsExtendedDynamicState = supportsExtendedDynamicState;
SupportsExtendedDynamicState2 = supportsExtendedDynamicState2;
SupportsLogicOpDynamicState = supportsLogicOpDynamicState;
SupportsPatchControlPointsDynamicState = supportsPatchControlPointsDynamicState;
UniformBufferSetIndex = uniformBufferSetIndex;
StorageBufferSetIndex = storageBufferSetIndex;
TextureSetIndex = textureSetIndex;

View File

@@ -2,6 +2,7 @@ namespace Ryujinx.Graphics.GAL
{
public enum Face
{
None = 0,
Front = 0x404,
Back = 0x405,
FrontAndBack = 0x408,

View File

@@ -50,9 +50,9 @@ namespace Ryujinx.Graphics.GAL
void SetDepthBias(PolygonModeMask enables, float factor, float units, float clamp);
void SetDepthClamp(bool clamp);
void SetDepthMode(DepthMode mode);
void SetDepthTest(DepthTestDescriptor depthTest);
void SetDepthTest(DepthTestDescriptor depthTest, bool signalChange = true);
void SetFaceCulling(bool enable, Face face);
void SetFaceCulling(Face face);
void SetFrontFace(FrontFace frontFace);
@@ -75,16 +75,16 @@ namespace Ryujinx.Graphics.GAL
void SetPrimitiveRestart(bool enable, int index);
void SetPrimitiveTopology(PrimitiveTopology topology);
void SetPrimitiveTopology(PrimitiveTopology topology, bool signalChange = true);
void SetProgram(IProgram program);
void SetProgram(IProgram program, bool signalChange = true);
void SetRasterizerDiscard(bool discard);
void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMask);
void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMask, bool signalChange = true);
void SetRenderTargets(ITexture[] colors, ITexture depthStencil);
void SetScissors(ReadOnlySpan<Rectangle<int>> regions);
void SetScissors(ReadOnlySpan<Rectangle<int>> regions, bool signalChange = true);
void SetStencilTest(StencilTestDescriptor stencilTest);
@@ -102,7 +102,7 @@ namespace Ryujinx.Graphics.GAL
void SetVertexAttribs(ReadOnlySpan<VertexAttribDescriptor> vertexAttribs);
void SetVertexBuffers(ReadOnlySpan<VertexBufferDescriptor> vertexBuffers);
void SetViewports(ReadOnlySpan<Viewport> viewports);
void SetViewports(ReadOnlySpan<Viewport> viewports, bool signalChange = true);
void TextureBarrier();
void TextureBarrierTiled();

View File

@@ -3,18 +3,16 @@ namespace Ryujinx.Graphics.GAL.Multithreading.Commands
struct SetFaceCullingCommand : IGALCommand, IGALCommand<SetFaceCullingCommand>
{
public readonly CommandType CommandType => CommandType.SetFaceCulling;
private bool _enable;
private Face _face;
public void Set(bool enable, Face face)
public void Set(Face face)
{
_enable = enable;
_face = face;
}
public static void Run(ref SetFaceCullingCommand command, ThreadedRenderer threaded, IRenderer renderer)
{
renderer.Pipeline.SetFaceCulling(command._enable, command._face);
renderer.Pipeline.SetFaceCulling(command._face);
}
}
}

View File

@@ -159,15 +159,15 @@ namespace Ryujinx.Graphics.GAL.Multithreading
_renderer.QueueCommand();
}
public void SetDepthTest(DepthTestDescriptor depthTest)
public void SetDepthTest(DepthTestDescriptor depthTest, bool signalChange = true)
{
_renderer.New<SetDepthTestCommand>().Set(depthTest);
_renderer.QueueCommand();
}
public void SetFaceCulling(bool enable, Face face)
public void SetFaceCulling(Face face)
{
_renderer.New<SetFaceCullingCommand>().Set(enable, face);
_renderer.New<SetFaceCullingCommand>().Set(face);
_renderer.QueueCommand();
}
@@ -243,13 +243,13 @@ namespace Ryujinx.Graphics.GAL.Multithreading
_renderer.QueueCommand();
}
public void SetPrimitiveTopology(PrimitiveTopology topology)
public void SetPrimitiveTopology(PrimitiveTopology topology, bool signalChange = true)
{
_renderer.New<SetPrimitiveTopologyCommand>().Set(topology);
_renderer.QueueCommand();
}
public void SetProgram(IProgram program)
public void SetProgram(IProgram program, bool signalChange = true)
{
_renderer.New<SetProgramCommand>().Set(Ref(program));
_renderer.QueueCommand();
@@ -261,7 +261,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
_renderer.QueueCommand();
}
public void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMask)
public void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMask, bool signalChange = true)
{
_renderer.New<SetRenderTargetColorMasksCommand>().Set(_renderer.CopySpan(componentMask));
_renderer.QueueCommand();
@@ -273,7 +273,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
_renderer.QueueCommand();
}
public void SetScissors(ReadOnlySpan<Rectangle<int>> scissors)
public void SetScissors(ReadOnlySpan<Rectangle<int>> scissors, bool signalChange = true)
{
_renderer.New<SetScissorsCommand>().Set(_renderer.CopySpan(scissors));
_renderer.QueueCommand();
@@ -339,7 +339,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
_renderer.QueueCommand();
}
public void SetViewports(ReadOnlySpan<Viewport> viewports)
public void SetViewports(ReadOnlySpan<Viewport> viewports, bool signalChange = true)
{
_renderer.New<SetViewportsCommand>().Set(_renderer.CopySpan(viewports));
_renderer.QueueCommand();

View File

@@ -51,11 +51,12 @@ namespace Ryujinx.Graphics.GAL
public StencilTestDescriptor StencilTest;
public FrontFace FrontFace;
public Face CullMode;
public bool CullEnable;
public PolygonModeMask BiasEnable;
public float LineWidth;
public bool AlphaToCoverageEnable;
public bool AlphaToOneEnable;
// TODO: Polygon mode.
public bool DepthClampEnable;
public bool RasterizerDiscard;
@@ -63,6 +64,9 @@ namespace Ryujinx.Graphics.GAL
public bool PrimitiveRestartEnable;
public uint PatchControlPoints;
public float DepthBiasUnits;
public float DepthBiasFactor;
public DepthMode DepthMode;
public void SetVertexAttribs(ReadOnlySpan<VertexAttribDescriptor> vertexAttribs)

View File

@@ -854,6 +854,9 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
enables |= (depthBias.FillEnable ? PolygonModeMask.Fill : 0);
_pipeline.BiasEnable = enables;
_pipeline.DepthBiasUnits = units / 2f;
_pipeline.DepthBiasFactor = factor;
_context.Renderer.Pipeline.SetDepthBias(enables, factor, units / 2f, clamp);
}
@@ -1026,7 +1029,6 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
float width = _state.State.LineWidthSmooth;
bool smooth = _state.State.LineSmoothEnable;
_pipeline.LineWidth = width;
_context.Renderer.Pipeline.SetLineParameters(width, smooth);
}
@@ -1196,9 +1198,16 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
var yControl = _state.State.YControl;
var face = _state.State.FaceState;
_pipeline.CullEnable = face.CullEnable;
_pipeline.CullMode = face.CullFace;
_context.Renderer.Pipeline.SetFaceCulling(face.CullEnable, face.CullFace);
if (face.CullEnable)
{
_pipeline.CullMode = face.CullFace;
_context.Renderer.Pipeline.SetFaceCulling(face.CullFace);
}
else
{
_pipeline.CullMode = Face.None;
_context.Renderer.Pipeline.SetFaceCulling(Face.None);
}
UpdateFrontFace(yControl, face.FrontFace);
}
@@ -1388,6 +1397,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
bool alphaToCoverageEnable = (_state.State.MultisampleControl & 1) != 0;
bool alphaToOneEnable = (_state.State.MultisampleControl & 0x10) != 0;
_pipeline.AlphaToCoverageEnable = alphaToCoverageEnable;
_pipeline.AlphaToOneEnable = alphaToOneEnable;
_context.Renderer.Pipeline.SetMultisampleState(new MultisampleDescriptor(
alphaToCoverageEnable,
_state.State.AlphaToCoverageDitherEnable,

View File

@@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
private const ushort FileFormatVersionMajor = 1;
private const ushort FileFormatVersionMinor = 2;
private const uint FileFormatVersionPacked = ((uint)FileFormatVersionMajor << 16) | FileFormatVersionMinor;
private const uint CodeGenVersion = 7353;
private const uint CodeGenVersion = 6877;
private const string SharedTocFileName = "shared.toc";
private const string SharedDataFileName = "shared.data";

View File

@@ -23,6 +23,8 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
private readonly CancellationToken _cancellationToken;
private readonly Action<ShaderCacheState, int, int> _stateChangeCallback;
private readonly HashSet<ProgramPipelineState> _pipelineStateSet = new();
/// <summary>
/// Indicates if the cache should be loaded.
/// </summary>
@@ -233,10 +235,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
for (int index = 0; index < ThreadCount; index++)
{
workThreads[index] = new Thread(ProcessAsyncQueue)
{
Name = $"GPU.AsyncTranslationThread.{index}",
};
workThreads[index] = new Thread(ProcessAsyncQueue) { Name = $"GPU.AsyncTranslationThread.{index}", };
}
int programCount = _hostStorage.GetProgramCount();
@@ -306,6 +305,8 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
using var streams = _hostStorage.GetOutputStreams(_context);
int packagedShaders = 0;
ProgramPipelineState currentPipelineState = default;
foreach (var kv in _programList)
{
if (!Active)
@@ -315,12 +316,53 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
(CachedShaderProgram program, byte[] binaryCode) = kv.Value;
_hostStorage.AddShader(_context, program, binaryCode, streams);
if (program.SpecializationState.PipelineState.HasValue && _context.Capabilities.SupportsExtendedDynamicState)
{
currentPipelineState = program.SpecializationState.PipelineState.Value;
_stateChangeCallback(ShaderCacheState.Packaging, ++packagedShaders, _programList.Count);
if (_context.Capabilities.SupportsExtendedDynamicState)
{
currentPipelineState.StencilTest = default;
currentPipelineState.CullMode = 0;
currentPipelineState.FrontFace = 0;
currentPipelineState.DepthTest = default;
currentPipelineState.Topology = ConvertToClass(currentPipelineState.Topology);
}
if (_context.Capabilities.SupportsExtendedDynamicState2)
{
currentPipelineState.PrimitiveRestartEnable = false;
currentPipelineState.BiasEnable = 0;
currentPipelineState.RasterizerDiscard = false;
}
if (_context.Capabilities.SupportsLogicOpDynamicState)
{
currentPipelineState.LogicOp = 0;
}
if (_context.Capabilities.SupportsPatchControlPointsDynamicState)
{
currentPipelineState.PatchControlPoints = 0;
}
}
if (!_pipelineStateSet.Contains(currentPipelineState) ||
!_context.Capabilities.SupportsExtendedDynamicState ||
!program.SpecializationState.PipelineState.HasValue)
{
_hostStorage.AddShader(_context, program, binaryCode, streams);
_stateChangeCallback(ShaderCacheState.Packaging, ++packagedShaders, _programList.Count);
if (_context.Capabilities.SupportsExtendedDynamicState)
{
_pipelineStateSet.Add(currentPipelineState);
}
}
}
Logger.Info?.Print(LogClass.Gpu, $"Rebuilt {_programList.Count} shaders successfully.");
Logger.Info?.Print(LogClass.Gpu, $"Rebuilt {packagedShaders} shaders successfully.");
}
else
{
@@ -344,6 +386,29 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache
_stateChangeCallback(ShaderCacheState.Loaded, programCount, programCount);
}
private PrimitiveTopology ConvertToClass(PrimitiveTopology topology)
{
return topology switch
{
PrimitiveTopology.Points => PrimitiveTopology.Points,
PrimitiveTopology.Lines or
PrimitiveTopology.LineStrip or
PrimitiveTopology.LinesAdjacency or
PrimitiveTopology.LineStripAdjacency => PrimitiveTopology.Lines,
PrimitiveTopology.Triangles or
PrimitiveTopology.TriangleStrip or
PrimitiveTopology.TriangleFan or
PrimitiveTopology.TrianglesAdjacency or
PrimitiveTopology.TriangleStripAdjacency or
PrimitiveTopology.Polygon => PrimitiveTopology.TriangleStrip,
PrimitiveTopology.Patches => PrimitiveTopology.Patches,
PrimitiveTopology.Quads => PrimitiveTopology.Quads,
PrimitiveTopology.QuadStrip => PrimitiveTopology.QuadStrip,
PrimitiveTopology.LineLoop => PrimitiveTopology.LineLoop,
_ => PrimitiveTopology.TriangleStrip,
};
}
/// <summary>
/// Enqueues a host program for compilation.
/// </summary>

View File

@@ -191,6 +191,10 @@ namespace Ryujinx.Graphics.OpenGL
supportsViewportSwizzle: HwCapabilities.SupportsViewportSwizzle,
supportsIndirectParameters: HwCapabilities.SupportsIndirectParameters,
supportsDepthClipControl: true,
supportsExtendedDynamicState: false,
supportsExtendedDynamicState2: false,
supportsLogicOpDynamicState: false,
supportsPatchControlPointsDynamicState: false,
uniformBufferSetIndex: 0,
storageBufferSetIndex: 1,
textureSetIndex: 2,

View File

@@ -898,7 +898,7 @@ namespace Ryujinx.Graphics.OpenGL
}
}
public void SetDepthTest(DepthTestDescriptor depthTest)
public void SetDepthTest(DepthTestDescriptor depthTest, bool signalChange = true)
{
if (depthTest.TestEnable)
{
@@ -915,11 +915,11 @@ namespace Ryujinx.Graphics.OpenGL
_depthTestEnable = depthTest.TestEnable;
}
public void SetFaceCulling(bool enable, Face face)
public void SetFaceCulling(Face face)
{
_cullEnable = enable;
_cullEnable = face != Face.None;
if (!enable)
if (!_cullEnable)
{
GL.Disable(EnableCap.CullFace);
return;
@@ -1107,12 +1107,12 @@ namespace Ryujinx.Graphics.OpenGL
GL.Enable(EnableCap.PrimitiveRestart);
}
public void SetPrimitiveTopology(PrimitiveTopology topology)
public void SetPrimitiveTopology(PrimitiveTopology topology, bool signalChange = true)
{
_primitiveType = topology.Convert();
}
public void SetProgram(IProgram program)
public void SetProgram(IProgram program, bool signalChange = true)
{
Program prg = (Program)program;
@@ -1154,7 +1154,7 @@ namespace Ryujinx.Graphics.OpenGL
_rasterizerDiscard = discard;
}
public void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMasks)
public void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMasks, bool signalChange = true)
{
_componentMasks = 0;
@@ -1195,7 +1195,7 @@ namespace Ryujinx.Graphics.OpenGL
_framebuffer.SetDrawBuffers(colors.Length);
}
public void SetScissors(ReadOnlySpan<Rectangle<int>> regions)
public void SetScissors(ReadOnlySpan<Rectangle<int>> regions, bool signalChange = true)
{
int count = Math.Min(regions.Length, Constants.MaxViewports);
@@ -1388,7 +1388,7 @@ namespace Ryujinx.Graphics.OpenGL
_vertexArray.SetVertexBuffers(vertexBuffers);
}
public void SetViewports(ReadOnlySpan<Viewport> viewports)
public void SetViewports(ReadOnlySpan<Viewport> viewports, bool signalChange = true)
{
Array.Resize(ref _viewportArray, viewports.Length * 4);
Array.Resize(ref _depthRangeArray, viewports.Length * 2);

View File

@@ -257,8 +257,8 @@ namespace Ryujinx.Graphics.Vulkan.Effects
scissors[0] = new Rectangle<int>(0, 0, texture.Width, texture.Height);
_pipeline.SetRenderTarget(texture, (uint)texture.Width, (uint)texture.Height);
_pipeline.SetRenderTargetColorMasks(colorMasks);
_pipeline.SetRenderTarget(texture, (uint)texture.Width, (uint)texture.Height, false);
_pipeline.SetRenderTargetColorMasks(colorMasks, false);
_pipeline.SetScissors(scissors);
_pipeline.ClearRenderTargetColor(0, 0, 1, new ColorF(0f, 0f, 0f, 1f));
}

View File

@@ -238,6 +238,7 @@ namespace Ryujinx.Graphics.Vulkan
Face.Back => CullModeFlags.BackBit,
Face.Front => CullModeFlags.FrontBit,
Face.FrontAndBack => CullModeFlags.FrontAndBack,
Face.None => CullModeFlags.None,
_ => LogInvalidAndReturn(face, nameof(Face), CullModeFlags.BackBit),
};
}
@@ -310,6 +311,25 @@ namespace Ryujinx.Graphics.Vulkan
};
}
public static PrimitiveTopology ConvertToClass(this PrimitiveTopology topology)
{
return topology switch
{
PrimitiveTopology.PointList => PrimitiveTopology.PointList,
PrimitiveTopology.LineList or
PrimitiveTopology.LineStrip or
PrimitiveTopology.LineListWithAdjacency or
PrimitiveTopology.LineStripWithAdjacency => PrimitiveTopology.LineList,
PrimitiveTopology.TriangleList or
PrimitiveTopology.TriangleStrip or
PrimitiveTopology.TriangleFan or
PrimitiveTopology.TriangleListWithAdjacency or
PrimitiveTopology.TriangleStripWithAdjacency => PrimitiveTopology.TriangleStrip,
PrimitiveTopology.PatchList => PrimitiveTopology.PatchList,
_ => LogInvalidAndReturn(topology, nameof(PrimitiveTopology), PrimitiveTopology.TriangleStrip),
};
}
public static StencilOp Convert(this GAL.StencilOp op)
{
return op switch

View File

@@ -31,6 +31,7 @@ namespace Ryujinx.Graphics.Vulkan
public readonly bool SupportsShaderStorageImageMultisample;
public readonly bool SupportsConditionalRendering;
public readonly bool SupportsExtendedDynamicState;
public readonly PhysicalDeviceExtendedDynamicState2FeaturesEXT SupportsExtendedDynamicState2;
public readonly bool SupportsMultiView;
public readonly bool SupportsNullDescriptors;
public readonly bool SupportsPushDescriptors;
@@ -46,6 +47,7 @@ namespace Ryujinx.Graphics.Vulkan
public readonly bool SupportsViewportArray2;
public readonly bool SupportsHostImportedMemory;
public readonly bool SupportsDepthClipControl;
public readonly bool SupportsWideLines;
public readonly bool SupportsAttachmentFeedbackLoop;
public readonly bool SupportsDynamicAttachmentFeedbackLoop;
public readonly uint SubgroupSize;
@@ -54,6 +56,7 @@ namespace Ryujinx.Graphics.Vulkan
public readonly uint VertexBufferAlignment;
public readonly uint SubTexelPrecisionBits;
public readonly ulong MinResourceAlignment;
public readonly uint MaxTessellationPatchSize;
public HardwareCapabilities(
bool supportsIndexTypeUint8,
@@ -71,6 +74,8 @@ namespace Ryujinx.Graphics.Vulkan
bool supportsShaderStorageImageMultisample,
bool supportsConditionalRendering,
bool supportsExtendedDynamicState,
PhysicalDeviceExtendedDynamicState2FeaturesEXT supportsExtendedDynamicState2,
uint maxTessellationPatchSize,
bool supportsMultiView,
bool supportsNullDescriptors,
bool supportsPushDescriptors,
@@ -86,6 +91,7 @@ namespace Ryujinx.Graphics.Vulkan
bool supportsViewportArray2,
bool supportsHostImportedMemory,
bool supportsDepthClipControl,
bool supportsWideLines,
bool supportsAttachmentFeedbackLoop,
bool supportsDynamicAttachmentFeedbackLoop,
uint subgroupSize,
@@ -110,6 +116,8 @@ namespace Ryujinx.Graphics.Vulkan
SupportsShaderStorageImageMultisample = supportsShaderStorageImageMultisample;
SupportsConditionalRendering = supportsConditionalRendering;
SupportsExtendedDynamicState = supportsExtendedDynamicState;
SupportsExtendedDynamicState2 = supportsExtendedDynamicState2;
MaxTessellationPatchSize = maxTessellationPatchSize;
SupportsMultiView = supportsMultiView;
SupportsNullDescriptors = supportsNullDescriptors;
SupportsPushDescriptors = supportsPushDescriptors;
@@ -125,6 +133,7 @@ namespace Ryujinx.Graphics.Vulkan
SupportsViewportArray2 = supportsViewportArray2;
SupportsHostImportedMemory = supportsHostImportedMemory;
SupportsDepthClipControl = supportsDepthClipControl;
SupportsWideLines = supportsWideLines;
SupportsAttachmentFeedbackLoop = supportsAttachmentFeedbackLoop;
SupportsDynamicAttachmentFeedbackLoop = supportsDynamicAttachmentFeedbackLoop;
SubgroupSize = subgroupSize;

View File

@@ -429,35 +429,35 @@ namespace Ryujinx.Graphics.Vulkan
if (dstIsDepthOrStencil)
{
_pipeline.SetProgram(src.Info.Target.IsMultisample() ? _programDepthBlitMs : _programDepthBlit);
_pipeline.SetDepthTest(new DepthTestDescriptor(true, true, CompareOp.Always));
_pipeline.SetProgram(src.Info.Target.IsMultisample() ? _programDepthBlitMs : _programDepthBlit, false);
_pipeline.SetDepthTest(new DepthTestDescriptor(true, true, CompareOp.Always), false);
}
else if (src.Info.Target.IsMultisample())
{
_pipeline.SetProgram(_programColorBlitMs);
_pipeline.SetProgram(_programColorBlitMs, false);
}
else if (clearAlpha)
{
_pipeline.SetProgram(_programColorBlitClearAlpha);
_pipeline.SetProgram(_programColorBlitClearAlpha, false);
}
else
{
_pipeline.SetProgram(_programColorBlit);
_pipeline.SetProgram(_programColorBlit, false);
}
int dstWidth = dst.Width;
int dstHeight = dst.Height;
_pipeline.SetRenderTarget(dst, (uint)dstWidth, (uint)dstHeight);
_pipeline.SetRenderTargetColorMasks(new uint[] { 0xf });
_pipeline.SetScissors(stackalloc Rectangle<int>[] { new Rectangle<int>(0, 0, dstWidth, dstHeight) });
_pipeline.SetRenderTarget(dst, (uint)dstWidth, (uint)dstHeight, false);
_pipeline.SetRenderTargetColorMasks(new uint[] { 0xf }, false);
_pipeline.SetScissors(stackalloc Rectangle<int>[] { new Rectangle<int>(0, 0, dstWidth, dstHeight) }, false);
if (clearAlpha)
{
_pipeline.ClearRenderTargetColor(0, 0, 1, new ColorF(0f, 0f, 0f, 1f));
}
_pipeline.SetViewports(viewports);
_pipeline.SetViewports(viewports, false);
_pipeline.SetPrimitiveTopology(PrimitiveTopology.TriangleStrip);
_pipeline.Draw(4, 1, 0, 0);
@@ -524,10 +524,10 @@ namespace Ryujinx.Graphics.Vulkan
int dstWidth = dst.Width;
int dstHeight = dst.Height;
_pipeline.SetRenderTarget(dst, (uint)dstWidth, (uint)dstHeight);
_pipeline.SetScissors(stackalloc Rectangle<int>[] { new Rectangle<int>(0, 0, dstWidth, dstHeight) });
_pipeline.SetViewports(viewports);
_pipeline.SetPrimitiveTopology(PrimitiveTopology.TriangleStrip);
_pipeline.SetRenderTarget(dst, (uint)dstWidth, (uint)dstHeight, false);
_pipeline.SetScissors(stackalloc Rectangle<int>[] { new Rectangle<int>(0, 0, dstWidth, dstHeight) }, false);
_pipeline.SetViewports(viewports, false);
_pipeline.SetPrimitiveTopology(PrimitiveTopology.TriangleStrip, false);
var aspectFlags = src.Info.Format.ConvertAspectFlags();
@@ -589,12 +589,12 @@ namespace Ryujinx.Graphics.Vulkan
if (isDepth)
{
_pipeline.SetProgram(src.Info.Target.IsMultisample() ? _programDepthBlitMs : _programDepthBlit);
_pipeline.SetProgram(src.Info.Target.IsMultisample() ? _programDepthBlitMs : _programDepthBlit, false);
_pipeline.SetDepthTest(new DepthTestDescriptor(true, true, CompareOp.Always));
}
else
{
_pipeline.SetProgram(src.Info.Target.IsMultisample() ? _programStencilBlitMs : _programStencilBlit);
_pipeline.SetProgram(src.Info.Target.IsMultisample() ? _programStencilBlitMs : _programStencilBlit, false);
_pipeline.SetStencilTest(CreateStencilTestDescriptor(true));
}
@@ -684,11 +684,11 @@ namespace Ryujinx.Graphics.Vulkan
program = _programColorClearF;
}
_pipeline.SetProgram(program);
_pipeline.SetRenderTarget(dst, (uint)dstWidth, (uint)dstHeight);
_pipeline.SetRenderTargetColorMasks(new[] { componentMask });
_pipeline.SetViewports(viewports);
_pipeline.SetScissors(stackalloc Rectangle<int>[] { scissor });
_pipeline.SetProgram(program, false);
_pipeline.SetRenderTarget(dst, (uint)dstWidth, (uint)dstHeight, false);
_pipeline.SetRenderTargetColorMasks(new[] { componentMask }, false);
_pipeline.SetViewports(viewports, false);
_pipeline.SetScissors(stackalloc Rectangle<int>[] { scissor }, false);
_pipeline.SetPrimitiveTopology(PrimitiveTopology.TriangleStrip);
_pipeline.Draw(4, 1, 0, 0);
_pipeline.Finish();
@@ -731,12 +731,12 @@ namespace Ryujinx.Graphics.Vulkan
0f,
1f);
_pipeline.SetProgram(_programDepthStencilClear);
_pipeline.SetRenderTarget(dst, (uint)dstWidth, (uint)dstHeight);
_pipeline.SetViewports(viewports);
_pipeline.SetScissors(stackalloc Rectangle<int>[] { scissor });
_pipeline.SetPrimitiveTopology(PrimitiveTopology.TriangleStrip);
_pipeline.SetDepthTest(new DepthTestDescriptor(true, depthMask, CompareOp.Always));
_pipeline.SetProgram(_programDepthStencilClear, false);
_pipeline.SetRenderTarget(dst, (uint)dstWidth, (uint)dstHeight, false);
_pipeline.SetViewports(viewports, false);
_pipeline.SetScissors(stackalloc Rectangle<int>[] { scissor }, false);
_pipeline.SetPrimitiveTopology(PrimitiveTopology.TriangleStrip, false);
_pipeline.SetDepthTest(new DepthTestDescriptor(true, depthMask, CompareOp.Always), false);
_pipeline.SetStencilTest(CreateStencilTestDescriptor(stencilMask != 0, stencilValue, 0xff, stencilMask));
_pipeline.Draw(4, 1, 0, 0);
_pipeline.Finish();
@@ -794,8 +794,8 @@ namespace Ryujinx.Graphics.Vulkan
0f,
1f);
pipeline.SetProgram(_programColorBlit);
pipeline.SetViewports(viewports);
pipeline.SetProgram(_programColorBlit, false);
pipeline.SetViewports(viewports, false);
pipeline.SetPrimitiveTopology(PrimitiveTopology.TriangleStrip);
pipeline.Draw(4, 1, 0, 0);
@@ -1129,16 +1129,16 @@ namespace Ryujinx.Graphics.Vulkan
0f,
1f);
_pipeline.SetScissors(stackalloc Rectangle<int>[] { new Rectangle<int>(0, 0, dst.Width, dst.Height) });
_pipeline.SetViewports(viewports);
_pipeline.SetPrimitiveTopology(PrimitiveTopology.TriangleStrip);
_pipeline.SetScissors(stackalloc Rectangle<int>[] { new Rectangle<int>(0, 0, dst.Width, dst.Height) }, false);
_pipeline.SetViewports(viewports, false);
_pipeline.SetPrimitiveTopology(PrimitiveTopology.TriangleStrip, false);
for (int z = 0; z < depth; z++)
{
var srcView = Create2DLayerView(src, srcLayer + z, 0);
var dstView = Create2DLayerView(dst, dstLayer + z, 0);
_pipeline.SetRenderTarget(dstView, (uint)dst.Width, (uint)dst.Height);
_pipeline.SetRenderTarget(dstView, (uint)dst.Width, (uint)dst.Height, false);
CopyMSDraw(srcView, aspectFlags, fromMS: true);
@@ -1251,9 +1251,9 @@ namespace Ryujinx.Graphics.Vulkan
1f);
_pipeline.SetRenderTargetColorMasks(new uint[] { 0xf });
_pipeline.SetScissors(stackalloc Rectangle<int>[] { new Rectangle<int>(0, 0, dst.Width, dst.Height) });
_pipeline.SetViewports(viewports);
_pipeline.SetPrimitiveTopology(PrimitiveTopology.TriangleStrip);
_pipeline.SetScissors(stackalloc Rectangle<int>[] { new Rectangle<int>(0, 0, dst.Width, dst.Height) }, false);
_pipeline.SetViewports(viewports, false);
_pipeline.SetPrimitiveTopology(PrimitiveTopology.TriangleStrip, false);
_pipeline.SetUniformBuffers(stackalloc[] { new BufferAssignment(0, buffer.Range) });
@@ -1264,7 +1264,7 @@ namespace Ryujinx.Graphics.Vulkan
var srcView = Create2DLayerView(src, srcLayer + z, 0);
var dstView = Create2DLayerView(dst, dstLayer + z, 0);
_pipeline.SetRenderTarget(dstView, (uint)dst.Width, (uint)dst.Height);
_pipeline.SetRenderTarget(dstView, (uint)dst.Width, (uint)dst.Height, false);
CopyMSDraw(srcView, aspectFlags, fromMS: false);
@@ -1281,7 +1281,7 @@ namespace Ryujinx.Graphics.Vulkan
}
else
{
_pipeline.SetProgram(_programColorDrawToMs);
_pipeline.SetProgram(_programColorDrawToMs, false);
var format = GetFormat(src.Info.BytesPerPixel);
var vkFormat = FormatTable.GetFormat(format);
@@ -1358,12 +1358,12 @@ namespace Ryujinx.Graphics.Vulkan
if (isDepth)
{
_pipeline.SetProgram(fromMS ? _programDepthDrawToNonMs : _programDepthDrawToMs);
_pipeline.SetProgram(fromMS ? _programDepthDrawToNonMs : _programDepthDrawToMs, false);
_pipeline.SetDepthTest(new DepthTestDescriptor(true, true, CompareOp.Always));
}
else
{
_pipeline.SetProgram(fromMS ? _programStencilDrawToNonMs : _programStencilDrawToMs);
_pipeline.SetProgram(fromMS ? _programStencilDrawToNonMs : _programStencilDrawToMs, false);
_pipeline.SetStencilTest(CreateStencilTestDescriptor(true));
}

View File

@@ -1,3 +1,5 @@
using Ryujinx.Common.Logging;
using Ryujinx.Common.Memory;
using Ryujinx.Graphics.GAL;
using Ryujinx.Graphics.Shader;
using Silk.NET.Vulkan;
@@ -74,6 +76,7 @@ namespace Ryujinx.Graphics.Vulkan
private readonly BufferState[] _transformFeedbackBuffers;
private readonly VertexBufferState[] _vertexBuffers;
private ulong _vertexBuffersDirty;
private bool _bindingsSet;
protected Rectangle<int> ClearScissor;
private readonly VertexBufferUpdater _vertexBufferUpdater;
@@ -87,6 +90,9 @@ namespace Ryujinx.Graphics.Vulkan
private bool _tfEnabled;
private bool _tfActive;
private readonly bool _supportExtDynamic;
private readonly bool _supportExtDynamic2;
private FeedbackLoopAspects _feedbackLoop;
private bool _passWritesDepthStencil;
@@ -94,6 +100,8 @@ namespace Ryujinx.Graphics.Vulkan
public ulong DrawCount { get; private set; }
public bool RenderPassActive { get; private set; }
private readonly int[] _vertexBufferBindings;
public unsafe PipelineBase(VulkanRenderer gd, Device device)
{
Gd = gd;
@@ -126,7 +134,19 @@ namespace Ryujinx.Graphics.Vulkan
_storedBlend = new PipelineColorBlendAttachmentState[Constants.MaxRenderTargets];
_newState.Initialize();
_supportExtDynamic = gd.Capabilities.SupportsExtendedDynamicState;
_supportExtDynamic2 = gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2;
_bindingsSet = false;
_vertexBufferBindings = new int[Constants.MaxVertexBuffers];
for (int i = 0; i < Constants.MaxVertexBuffers; i++)
{
_vertexBufferBindings[i] = i + 1;
}
_newState.Initialize(gd.Capabilities);
}
public void Initialize()
@@ -632,19 +652,46 @@ namespace Ryujinx.Graphics.Vulkan
{
if (texture is TextureView srcTexture)
{
var oldCullMode = _newState.CullMode;
var oldStencilTestEnable = _newState.StencilTestEnable;
var oldDepthTestEnable = _newState.DepthTestEnable;
var oldDepthWriteEnable = _newState.DepthWriteEnable;
var oldViewports = DynamicState.Viewports;
var oldViewportsCount = _newState.ViewportsCount;
var oldTopology = _topology;
CullModeFlags oldCullMode;
bool oldStencilTestEnable;
bool oldDepthTestEnable;
bool oldDepthWriteEnable;
PrimitiveTopology oldTopology;
Array16<Silk.NET.Vulkan.Viewport> oldViewports = DynamicState.Viewports;
uint oldViewportsCount;
_newState.CullMode = CullModeFlags.None;
_newState.StencilTestEnable = false;
_newState.DepthTestEnable = false;
_newState.DepthWriteEnable = false;
SignalStateChange();
if (_supportExtDynamic)
{
oldCullMode = DynamicState.CullMode;
oldStencilTestEnable = DynamicState.StencilTestEnable;
oldDepthTestEnable = DynamicState.DepthTestEnable;
oldDepthWriteEnable = DynamicState.DepthWriteEnable;
oldTopology = _topology;
oldViewportsCount = DynamicState.ViewportsCount;
}
else
{
oldCullMode = _newState.CullMode;
oldStencilTestEnable = _newState.StencilTestEnable;
oldDepthTestEnable = _newState.DepthTestEnable;
oldDepthWriteEnable = _newState.DepthWriteEnable;
oldTopology = _topology;
oldViewportsCount = _newState.ViewportsCount;
}
if (_supportExtDynamic)
{
DynamicState.SetCullMode(CullModeFlags.None);
DynamicState.SetDepthTestBool(false, false);
DynamicState.SetStencilTest(false);
}
else
{
_newState.CullMode = CullModeFlags.None;
_newState.StencilTestEnable = false;
_newState.DepthTestEnable = false;
_newState.DepthWriteEnable = false;
}
Gd.HelperShader.DrawTexture(
Gd,
@@ -654,16 +701,24 @@ namespace Ryujinx.Graphics.Vulkan
srcRegion,
dstRegion);
_newState.CullMode = oldCullMode;
_newState.StencilTestEnable = oldStencilTestEnable;
_newState.DepthTestEnable = oldDepthTestEnable;
_newState.DepthWriteEnable = oldDepthWriteEnable;
if (_supportExtDynamic)
{
DynamicState.SetCullMode(oldCullMode);
DynamicState.SetStencilTest(oldStencilTestEnable);
DynamicState.SetDepthTestBool(oldDepthTestEnable, oldDepthWriteEnable);
}
else
{
_newState.CullMode = oldCullMode;
_newState.StencilTestEnable = oldStencilTestEnable;
_newState.DepthTestEnable = oldDepthTestEnable;
_newState.DepthWriteEnable = oldDepthWriteEnable;
_newState.ViewportsCount = oldViewportsCount;
}
SetPrimitiveTopology(oldTopology);
DynamicState.SetViewports(ref oldViewports, oldViewportsCount);
_newState.ViewportsCount = oldViewportsCount;
SignalStateChange();
}
}
@@ -792,48 +847,102 @@ namespace Ryujinx.Graphics.Vulkan
public void SetDepthBias(PolygonModeMask enables, float factor, float units, float clamp)
{
DynamicState.SetDepthBias(factor, units, clamp);
bool depthBiasEnable = (enables != 0) && (factor != 0 && units != 0);
bool changed = false;
_newState.DepthBiasEnable = enables != 0;
SignalStateChange();
}
if (_supportExtDynamic2)
{
DynamicState.SetDepthBiasEnable(depthBiasEnable);
}
else if (_newState.DepthBiasEnable != depthBiasEnable)
{
_newState.DepthBiasEnable = depthBiasEnable;
changed = true;
}
public void SetDepthClamp(bool clamp)
{
_newState.DepthClampEnable = clamp;
SignalStateChange();
}
if (depthBiasEnable)
{
DynamicState.SetDepthBias(factor, units, clamp);
}
public void SetDepthMode(DepthMode mode)
{
bool oldMode = _newState.DepthMode;
_newState.DepthMode = mode == DepthMode.MinusOneToOne;
if (_newState.DepthMode != oldMode)
if (changed)
{
SignalStateChange();
}
}
public void SetDepthTest(DepthTestDescriptor depthTest)
public void SetDepthClamp(bool clamp)
{
_newState.DepthTestEnable = depthTest.TestEnable;
_newState.DepthWriteEnable = depthTest.WriteEnable;
_newState.DepthCompareOp = depthTest.Func.Convert();
_newState.DepthClampEnable = clamp;
UpdatePassDepthStencil();
SignalStateChange();
}
public void SetFaceCulling(bool enable, Face face)
public void SetDepthMode(DepthMode mode)
{
_newState.CullMode = enable ? face.Convert() : CullModeFlags.None;
bool newMode = mode == DepthMode.MinusOneToOne;
if (_newState.DepthMode == newMode)
{
return;
}
_newState.DepthMode = newMode;
SignalStateChange();
}
public void SetDepthTest(DepthTestDescriptor depthTest, bool signalChange = true)
{
if (_supportExtDynamic)
{
DynamicState.SetDepthTestBool(depthTest.TestEnable, depthTest.WriteEnable);
if (depthTest.TestEnable)
{
DynamicState.SetDepthTestCompareOp(depthTest.Func.Convert());
}
}
else
{
_newState.DepthTestEnable = depthTest.TestEnable;
_newState.DepthWriteEnable = depthTest.WriteEnable;
_newState.DepthCompareOp = depthTest.Func.Convert();
if (signalChange)
{
SignalStateChange();
}
}
UpdatePassDepthStencil();
}
public void SetFaceCulling(Face face)
{
if (_supportExtDynamic)
{
DynamicState.SetCullMode(face.Convert());
}
else
{
_newState.CullMode = face.Convert();
SignalStateChange();
}
}
public void SetFrontFace(FrontFace frontFace)
{
_newState.FrontFace = frontFace.Convert();
SignalStateChange();
if (_supportExtDynamic)
{
DynamicState.SetFrontFace(frontFace.Convert());
}
else
{
_newState.FrontFace = frontFace.Convert();
SignalStateChange();
}
}
public void SetImage(ShaderStage stage, int binding, ITexture image)
@@ -872,28 +981,56 @@ namespace Ryujinx.Graphics.Vulkan
public void SetLineParameters(float width, bool smooth)
{
_newState.LineWidth = width;
SignalStateChange();
if (!Gd.IsMoltenVk)
{
DynamicState.SetLineWidth(Gd.Capabilities.SupportsWideLines ? width : 1.0f);
}
}
public void SetLogicOpState(bool enable, LogicalOp op)
{
// Vendors other than NVIDIA have a bug where it enables logical operations even for float formats,
// so we need to force disable them here.
bool logicOpEnable = enable && (Gd.Vendor == Vendor.Nvidia || _newState.Internal.LogicOpsAllowed);
_newState.LogicOpEnable = enable;
_newState.LogicOp = op.Convert();
if (Gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2LogicOp)
{
if (logicOpEnable)
{
DynamicState.SetLogicOp(op.Convert());
}
}
else
{
_newState.LogicOp = op.Convert();
}
SignalStateChange();
}
public void SetMultisampleState(MultisampleDescriptor multisample)
{
_newState.AlphaToCoverageEnable = multisample.AlphaToCoverageEnable;
_newState.AlphaToOneEnable = multisample.AlphaToOneEnable;
SignalStateChange();
}
public void SetPatchParameters(int vertices, ReadOnlySpan<float> defaultOuterLevel, ReadOnlySpan<float> defaultInnerLevel)
{
_newState.PatchControlPoints = (uint)vertices;
SignalStateChange();
if (Gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2PatchControlPoints)
{
DynamicState.SetPatchControlPoints((uint)vertices);
}
else
{
_newState.PatchControlPoints = (uint)vertices;
SignalStateChange();
}
// TODO: Default levels (likely needs emulation on shaders?)
}
@@ -910,12 +1047,21 @@ namespace Ryujinx.Graphics.Vulkan
public void SetPrimitiveRestart(bool enable, int index)
{
_newState.PrimitiveRestartEnable = enable;
if (_supportExtDynamic2)
{
DynamicState.SetPrimitiveRestartEnable(enable);
}
else
{
_newState.PrimitiveRestartEnable = enable;
SignalStateChange();
}
// TODO: What to do about the index?
SignalStateChange();
}
public void SetPrimitiveTopology(PrimitiveTopology topology)
public void SetPrimitiveTopology(PrimitiveTopology topology, bool signalChange = true)
{
_topology = topology;
@@ -923,10 +1069,18 @@ namespace Ryujinx.Graphics.Vulkan
_newState.Topology = vkTopology;
SignalStateChange();
if (_supportExtDynamic)
{
DynamicState.SetPrimitiveTopology(vkTopology);
}
if (signalChange)
{
SignalStateChange();
}
}
public void SetProgram(IProgram program)
public void SetProgram(IProgram program, bool signalChange = true)
{
var internalProgram = (ShaderCollection)program;
var stages = internalProgram.GetInfos();
@@ -942,7 +1096,10 @@ namespace Ryujinx.Graphics.Vulkan
stages.CopyTo(_newState.Stages.AsSpan()[..stages.Length]);
SignalStateChange();
if (signalChange)
{
SignalStateChange();
}
if (internalProgram.IsCompute)
{
@@ -968,18 +1125,26 @@ namespace Ryujinx.Graphics.Vulkan
public void SetRasterizerDiscard(bool discard)
{
_newState.RasterizerDiscardEnable = discard;
SignalStateChange();
if (_supportExtDynamic2)
{
DynamicState.SetRasterizerDiscard(discard);
}
else
{
_newState.RasterizerDiscardEnable = discard;
SignalStateChange();
}
if (!discard && Gd.IsQualcommProprietary)
{
// On Adreno, enabling rasterizer discard somehow corrupts the viewport state.
// Force it to be updated on next use to work around this bug.
DynamicState.ForceAllDirty();
DynamicState.ForceAllDirty(Gd);
}
}
public void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMask)
public void SetRenderTargetColorMasks(ReadOnlySpan<uint> componentMask, bool signalChange = true)
{
int count = Math.Min(Constants.MaxRenderTargets, componentMask.Length);
int writtenAttachments = 0;
@@ -1019,7 +1184,10 @@ namespace Ryujinx.Graphics.Vulkan
}
else
{
SignalStateChange();
if (signalChange)
{
SignalStateChange();
}
if (writtenAttachments != _writtenAttachmentCount)
{
@@ -1043,7 +1211,7 @@ namespace Ryujinx.Graphics.Vulkan
SetRenderTargetsInternal(colors, depthStencil, Gd.IsTBDR);
}
public void SetScissors(ReadOnlySpan<Rectangle<int>> regions)
public void SetScissors(ReadOnlySpan<Rectangle<int>> regions, bool signalChange = true)
{
int maxScissors = Gd.Capabilities.SupportsMultiView ? Constants.MaxViewports : 1;
int count = Math.Min(maxScissors, regions.Length);
@@ -1052,6 +1220,8 @@ namespace Ryujinx.Graphics.Vulkan
ClearScissor = regions[0];
}
DynamicState.ScissorsCount = count;
for (int i = 0; i < count; i++)
{
var region = regions[i];
@@ -1061,34 +1231,56 @@ namespace Ryujinx.Graphics.Vulkan
DynamicState.SetScissor(i, new Rect2D(offset, extent));
}
DynamicState.ScissorsCount = count;
if (!_supportExtDynamic)
{
_newState.ScissorsCount = (uint)count;
_newState.ScissorsCount = (uint)count;
SignalStateChange();
if (signalChange)
{
SignalStateChange();
}
}
}
public void SetStencilTest(StencilTestDescriptor stencilTest)
{
DynamicState.SetStencilMasks(
(uint)stencilTest.BackFuncMask,
if (_supportExtDynamic)
{
DynamicState.SetStencilTestandOp(
stencilTest.BackSFail.Convert(),
stencilTest.BackDpPass.Convert(),
stencilTest.BackDpFail.Convert(),
stencilTest.BackFunc.Convert(),
stencilTest.FrontSFail.Convert(),
stencilTest.FrontDpPass.Convert(),
stencilTest.FrontDpFail.Convert(),
stencilTest.FrontFunc.Convert(),
stencilTest.TestEnable);
UpdatePassDepthStencil();
}
else
{
_newState.StencilBackFailOp = stencilTest.BackSFail.Convert();
_newState.StencilBackPassOp = stencilTest.BackDpPass.Convert();
_newState.StencilBackDepthFailOp = stencilTest.BackDpFail.Convert();
_newState.StencilBackCompareOp = stencilTest.BackFunc.Convert();
_newState.StencilFrontFailOp = stencilTest.FrontSFail.Convert();
_newState.StencilFrontPassOp = stencilTest.FrontDpPass.Convert();
_newState.StencilFrontDepthFailOp = stencilTest.FrontDpFail.Convert();
_newState.StencilFrontCompareOp = stencilTest.FrontFunc.Convert();
_newState.StencilTestEnable = stencilTest.TestEnable;
UpdatePassDepthStencil();
SignalStateChange();
}
DynamicState.SetStencilMask((uint)stencilTest.BackFuncMask,
(uint)stencilTest.BackMask,
(uint)stencilTest.BackFuncRef,
(uint)stencilTest.FrontFuncMask,
(uint)stencilTest.FrontMask,
(uint)stencilTest.FrontFuncRef);
_newState.StencilTestEnable = stencilTest.TestEnable;
_newState.StencilBackFailOp = stencilTest.BackSFail.Convert();
_newState.StencilBackPassOp = stencilTest.BackDpPass.Convert();
_newState.StencilBackDepthFailOp = stencilTest.BackDpFail.Convert();
_newState.StencilBackCompareOp = stencilTest.BackFunc.Convert();
_newState.StencilFrontFailOp = stencilTest.FrontSFail.Convert();
_newState.StencilFrontPassOp = stencilTest.FrontDpPass.Convert();
_newState.StencilFrontDepthFailOp = stencilTest.FrontDpFail.Convert();
_newState.StencilFrontCompareOp = stencilTest.FrontFunc.Convert();
UpdatePassDepthStencil();
SignalStateChange();
}
public void SetStorageBuffers(ReadOnlySpan<BufferAssignment> buffers)
@@ -1207,12 +1399,24 @@ namespace Ryujinx.Graphics.Vulkan
{
int count = Math.Min(Constants.MaxVertexBuffers, vertexBuffers.Length);
_newState.Internal.VertexBindingDescriptions[0] = new VertexInputBindingDescription(0, 0, VertexInputRate.Vertex);
int validCount = 1;
if (!_bindingsSet)
{
_newState.Internal.VertexBindingDescriptions[0] = new VertexInputBindingDescription(0, _supportExtDynamic && (!Gd.IsMoltenVk || Gd.SupportsMTL31) ? null : 0, VertexInputRate.Vertex);
for (int i = 1; i < count; i++)
{
_newState.Internal.VertexBindingDescriptions[i] = new VertexInputBindingDescription((uint)i);
}
_bindingsSet = true;
}
BufferHandle lastHandle = default;
Auto<DisposableBuffer> lastBuffer = default;
bool vertexBindingDescriptionChanged = false;
bool vertexDescriptionCountChanged = false;
for (int i = 0; i < count; i++)
{
@@ -1231,13 +1435,32 @@ namespace Ryujinx.Graphics.Vulkan
if (vb != null)
{
int binding = i + 1;
int descriptorIndex = validCount++;
_newState.Internal.VertexBindingDescriptions[descriptorIndex] = new VertexInputBindingDescription(
(uint)binding,
(uint)vertexBuffer.Stride,
inputRate);
if (_supportExtDynamic && (!Gd.IsMoltenVk || Gd.SupportsMTL31))
{
if (_newState.Internal.VertexBindingDescriptions[descriptorIndex].InputRate != inputRate ||
_newState.Internal.VertexBindingDescriptions[descriptorIndex].Binding != _vertexBufferBindings[i])
{
_newState.Internal.VertexBindingDescriptions[descriptorIndex].InputRate = inputRate;
_newState.Internal.VertexBindingDescriptions[descriptorIndex].Binding = (uint)_vertexBufferBindings[i];
vertexBindingDescriptionChanged = true;
}
}
else
{
if (_newState.Internal.VertexBindingDescriptions[descriptorIndex].InputRate != inputRate ||
_newState.Internal.VertexBindingDescriptions[descriptorIndex].Stride != vertexBuffer.Stride ||
_newState.Internal.VertexBindingDescriptions[descriptorIndex].Binding != _vertexBufferBindings[i])
{
_newState.Internal.VertexBindingDescriptions[descriptorIndex].Binding = (uint)_vertexBufferBindings[i];
_newState.Internal.VertexBindingDescriptions[descriptorIndex].Stride = (uint)vertexBuffer.Stride;
_newState.Internal.VertexBindingDescriptions[descriptorIndex].InputRate = inputRate;
vertexBindingDescriptionChanged = true;
}
}
int vbSize = vertexBuffer.Buffer.Size;
@@ -1253,7 +1476,7 @@ namespace Ryujinx.Graphics.Vulkan
}
}
ref var buffer = ref _vertexBuffers[binding];
ref var buffer = ref _vertexBuffers[_vertexBufferBindings[i]];
int oldScalarAlign = buffer.AttributeScalarAlignment;
if (Gd.Capabilities.VertexBufferAlignment < 2 &&
@@ -1270,7 +1493,7 @@ namespace Ryujinx.Graphics.Vulkan
vbSize,
vertexBuffer.Stride);
buffer.BindVertexBuffer(Gd, Cbs, (uint)binding, ref _newState, _vertexBufferUpdater);
buffer.BindVertexBuffer(Gd, Cbs, (uint)_vertexBufferBindings[i], ref _newState, _vertexBufferUpdater);
}
}
else
@@ -1286,7 +1509,7 @@ namespace Ryujinx.Graphics.Vulkan
vbSize,
vertexBuffer.Stride);
_vertexBuffersDirty |= 1UL << binding;
_vertexBuffersDirty |= 1UL << _vertexBufferBindings[i];
}
buffer.AttributeScalarAlignment = oldScalarAlign;
@@ -1296,11 +1519,19 @@ namespace Ryujinx.Graphics.Vulkan
_vertexBufferUpdater.Commit(Cbs);
_newState.VertexBindingDescriptionsCount = (uint)validCount;
SignalStateChange();
if (_newState.VertexBindingDescriptionsCount != validCount)
{
_newState.VertexBindingDescriptionsCount = (uint)validCount;
vertexDescriptionCountChanged = true;
}
if (vertexDescriptionCountChanged || vertexBindingDescriptionChanged)
{
SignalStateChange();
}
}
public void SetViewports(ReadOnlySpan<Viewport> viewports)
public void SetViewports(ReadOnlySpan<Viewport> viewports, bool signalChange = true)
{
int maxViewports = Gd.Capabilities.SupportsMultiView ? Constants.MaxViewports : 1;
int count = Math.Min(maxViewports, viewports.Length);
@@ -1325,8 +1556,15 @@ namespace Ryujinx.Graphics.Vulkan
Clamp(viewport.DepthFar)));
}
_newState.ViewportsCount = (uint)count;
SignalStateChange();
if (!_supportExtDynamic)
{
_newState.ViewportsCount = (uint)count;
if (signalChange)
{
SignalStateChange();
}
}
}
public void SwapBuffer(Auto<DisposableBuffer> from, Auto<DisposableBuffer> to)
@@ -1375,7 +1613,7 @@ namespace Ryujinx.Graphics.Vulkan
_vertexBuffersDirty = ulong.MaxValue >> (64 - _vertexBuffers.Length);
_descriptorSetUpdater.SignalCommandBufferChange();
DynamicState.ForceAllDirty();
DynamicState.ForceAllDirty(Gd);
_currentPipelineHandle = 0;
}
@@ -1529,9 +1767,10 @@ namespace Ryujinx.Graphics.Vulkan
{
if (Gd.Capabilities.SupportsDynamicAttachmentFeedbackLoop)
{
_newState.FeedbackLoopDynamicState = true;
DynamicState.SetFeedbackLoop(aspects);
}
else
else if (Gd.Capabilities.SupportsAttachmentFeedbackLoop)
{
_newState.FeedbackLoopAspects = aspects;
}
@@ -1591,7 +1830,14 @@ namespace Ryujinx.Graphics.Vulkan
}
// Stencil test being enabled doesn't necessarily mean a write, but it's not critical to check.
_passWritesDepthStencil |= (_newState.DepthTestEnable && _newState.DepthWriteEnable) || _newState.StencilTestEnable;
if (_supportExtDynamic)
{
_passWritesDepthStencil |= (DynamicState.DepthTestEnable && DynamicState.DepthWriteEnable) || DynamicState.StencilTestEnable;
}
else
{
_passWritesDepthStencil |= (_newState.DepthTestEnable && _newState.DepthWriteEnable) || _newState.StencilTestEnable;
}
}
private bool RecreateGraphicsPipelineIfNeeded()

View File

@@ -4,6 +4,7 @@ using Silk.NET.Vulkan;
using System;
using Format = Silk.NET.Vulkan.Format;
using PolygonMode = Silk.NET.Vulkan.PolygonMode;
using PrimitiveTopology = Ryujinx.Graphics.GAL.PrimitiveTopology;
namespace Ryujinx.Graphics.Vulkan
{
@@ -160,64 +161,84 @@ namespace Ryujinx.Graphics.Vulkan
public static PipelineState ToVulkanPipelineState(this ProgramPipelineState state, VulkanRenderer gd)
{
var extendedDynamicState2 = gd.Capabilities.SupportsExtendedDynamicState2;
var extendedDynamicState = gd.Capabilities.SupportsExtendedDynamicState;
PipelineState pipeline = new();
pipeline.Initialize();
pipeline.Initialize(gd.Capabilities);
// It is assumed that Dynamic State is enabled when this conversion is used.
pipeline.CullMode = state.CullEnable ? state.CullMode.Convert() : CullModeFlags.None;
pipeline.DepthBoundsTestEnable = false; // Not implemented.
pipeline.DepthClampEnable = state.DepthClampEnable;
pipeline.DepthTestEnable = state.DepthTest.TestEnable;
pipeline.DepthWriteEnable = state.DepthTest.WriteEnable;
pipeline.DepthCompareOp = state.DepthTest.Func.Convert();
pipeline.AlphaToCoverageEnable = state.AlphaToCoverageEnable;
pipeline.AlphaToOneEnable = state.AlphaToOneEnable;
pipeline.DepthMode = state.DepthMode == DepthMode.MinusOneToOne;
pipeline.FrontFace = state.FrontFace.Convert();
pipeline.HasDepthStencil = state.DepthStencilEnable;
pipeline.LineWidth = state.LineWidth;
pipeline.LogicOpEnable = state.LogicOpEnable;
pipeline.LogicOp = state.LogicOp.Convert();
pipeline.PatchControlPoints = state.PatchControlPoints;
pipeline.PolygonMode = PolygonMode.Fill; // Not implemented.
pipeline.PrimitiveRestartEnable = state.PrimitiveRestartEnable;
pipeline.RasterizerDiscardEnable = state.RasterizerDiscard;
pipeline.SamplesCount = (uint)state.SamplesCount;
if (gd.Capabilities.SupportsMultiView)
{
pipeline.ScissorsCount = Constants.MaxViewports;
pipeline.ViewportsCount = Constants.MaxViewports;
}
else
{
pipeline.ScissorsCount = 1;
pipeline.ViewportsCount = 1;
}
pipeline.DepthBiasEnable = state.BiasEnable != 0;
// Stencil masks and ref are dynamic, so are 0 in the Vulkan pipeline.
pipeline.StencilFrontFailOp = state.StencilTest.FrontSFail.Convert();
pipeline.StencilFrontPassOp = state.StencilTest.FrontDpPass.Convert();
pipeline.StencilFrontDepthFailOp = state.StencilTest.FrontDpFail.Convert();
pipeline.StencilFrontCompareOp = state.StencilTest.FrontFunc.Convert();
pipeline.StencilBackFailOp = state.StencilTest.BackSFail.Convert();
pipeline.StencilBackPassOp = state.StencilTest.BackDpPass.Convert();
pipeline.StencilBackDepthFailOp = state.StencilTest.BackDpFail.Convert();
pipeline.StencilBackCompareOp = state.StencilTest.BackFunc.Convert();
pipeline.StencilTestEnable = state.StencilTest.TestEnable;
pipeline.Topology = gd.TopologyRemap(state.Topology).Convert();
if (!extendedDynamicState)
{
pipeline.DepthCompareOp = state.DepthTest.Func.Convert();
pipeline.CullMode = state.CullMode.Convert();
pipeline.DepthTestEnable = state.DepthTest.TestEnable;
pipeline.DepthWriteEnable = state.DepthTest.WriteEnable;
pipeline.FrontFace = state.FrontFace.Convert();
if (gd.Capabilities.SupportsMultiView)
{
pipeline.ScissorsCount = Constants.MaxViewports;
pipeline.ViewportsCount = Constants.MaxViewports;
}
else
{
pipeline.ScissorsCount = 1;
pipeline.ViewportsCount = 1;
}
pipeline.StencilTestEnable = state.StencilTest.TestEnable;
pipeline.StencilFrontFailOp = state.StencilTest.FrontSFail.Convert();
pipeline.StencilFrontPassOp = state.StencilTest.FrontDpPass.Convert();
pipeline.StencilFrontDepthFailOp = state.StencilTest.FrontDpFail.Convert();
pipeline.StencilFrontCompareOp = state.StencilTest.FrontFunc.Convert();
pipeline.StencilBackFailOp = state.StencilTest.BackSFail.Convert();
pipeline.StencilBackPassOp = state.StencilTest.BackDpPass.Convert();
pipeline.StencilBackDepthFailOp = state.StencilTest.BackDpFail.Convert();
pipeline.StencilBackCompareOp = state.StencilTest.BackFunc.Convert();
}
if (!extendedDynamicState2.ExtendedDynamicState2)
{
pipeline.PrimitiveRestartEnable = state.PrimitiveRestartEnable;
pipeline.RasterizerDiscardEnable = state.RasterizerDiscard;
pipeline.DepthBiasEnable = (state.BiasEnable != 0) &&
(state.DepthBiasFactor != 0 && state.DepthBiasUnits != 0);
}
if (!extendedDynamicState2.ExtendedDynamicState2LogicOp)
{
pipeline.LogicOp = state.LogicOp.Convert();
}
if (!extendedDynamicState2.ExtendedDynamicState2PatchControlPoints)
{
pipeline.PatchControlPoints = state.PatchControlPoints;
}
pipeline.SamplesCount = (uint)state.SamplesCount;
pipeline.LogicOpEnable = state.LogicOpEnable;
int vaCount = Math.Min(Constants.MaxVertexAttributes, state.VertexAttribCount);
int vbCount = Math.Min(Constants.MaxVertexBuffers, state.VertexBufferCount);
@@ -241,7 +262,7 @@ namespace Ryujinx.Graphics.Vulkan
}
int descriptorIndex = 1;
pipeline.Internal.VertexBindingDescriptions[0] = new VertexInputBindingDescription(0, 0, VertexInputRate.Vertex);
pipeline.Internal.VertexBindingDescriptions[0] = new VertexInputBindingDescription(0, extendedDynamicState && (!gd.IsMoltenVk || gd.SupportsMTL31) ? null : 0, VertexInputRate.Vertex);
for (int i = 0; i < vbCount; i++)
{
@@ -261,7 +282,7 @@ namespace Ryujinx.Graphics.Vulkan
// TODO: Support divisor > 1
pipeline.Internal.VertexBindingDescriptions[descriptorIndex++] = new VertexInputBindingDescription(
(uint)i + 1,
(uint)alignedStride,
extendedDynamicState && (!gd.IsMoltenVk || gd.SupportsMTL31) ? null : (uint)alignedStride,
inputRate);
}
}

View File

@@ -1,6 +1,8 @@
using Ryujinx.Common.Memory;
using Silk.NET.Vulkan;
using Silk.NET.Vulkan.Extensions.EXT;
using System;
using System.Numerics;
namespace Ryujinx.Graphics.Vulkan
{
@@ -9,6 +11,7 @@ namespace Ryujinx.Graphics.Vulkan
private float _depthBiasSlopeFactor;
private float _depthBiasConstantFactor;
private float _depthBiasClamp;
private bool _depthBiasEnable;
public int ScissorsCount;
private Array16<Rect2D> _scissors;
@@ -20,6 +23,23 @@ namespace Ryujinx.Graphics.Vulkan
private uint _frontWriteMask;
private uint _frontReference;
private StencilOp _backFailOp;
private StencilOp _backPassOp;
private StencilOp _backDepthFailOp;
private CompareOp _backCompareOp;
private StencilOp _frontFailOp;
private StencilOp _frontPassOp;
private StencilOp _frontDepthFailOp;
private CompareOp _frontCompareOp;
private float _lineWidth;
public bool StencilTestEnable;
public bool DepthTestEnable;
public bool DepthWriteEnable;
private CompareOp _depthCompareOp;
private Array4<float> _blendConstants;
private FeedbackLoopAspects _feedbackLoopAspects;
@@ -27,6 +47,20 @@ namespace Ryujinx.Graphics.Vulkan
public uint ViewportsCount;
public Array16<Viewport> Viewports;
public CullModeFlags CullMode;
private FrontFace _frontFace;
private bool _discard;
private LogicOp _logicOp;
private uint _patchControlPoints;
public PrimitiveTopology Topology;
private bool _primitiveRestartEnable;
[Flags]
private enum DirtyFlags
{
None = 0,
@@ -36,7 +70,21 @@ namespace Ryujinx.Graphics.Vulkan
Stencil = 1 << 3,
Viewport = 1 << 4,
FeedbackLoop = 1 << 5,
All = Blend | DepthBias | Scissor | Stencil | Viewport | FeedbackLoop,
CullMode = 1 << 6,
FrontFace = 1 << 7,
DepthTestBool = 1 << 8,
DepthTestCompareOp = 1 << 9,
StencilTestEnableAndStencilOp = 1 << 10,
LineWidth = 1 << 11,
RasterDiscard = 1 << 12,
LogicOp = 1 << 13,
PatchControlPoints = 1 << 14,
PrimitiveRestart = 1 << 15,
PrimitiveTopology = 1 << 16,
DepthBiasEnable = 1 << 17,
Standard = Blend | DepthBias | Scissor | Stencil | Viewport,
Extended = CullMode | FrontFace | DepthTestBool | DepthTestCompareOp | StencilTestEnableAndStencilOp | PrimitiveTopology,
Extended2 = RasterDiscard | PrimitiveRestart | DepthBiasEnable,
}
private DirtyFlags _dirty;
@@ -47,7 +95,6 @@ namespace Ryujinx.Graphics.Vulkan
_blendConstants[1] = g;
_blendConstants[2] = b;
_blendConstants[3] = a;
_dirty |= DirtyFlags.Blend;
}
@@ -60,15 +107,64 @@ namespace Ryujinx.Graphics.Vulkan
_dirty |= DirtyFlags.DepthBias;
}
public void SetDepthBiasEnable(bool enable)
{
_depthBiasEnable = enable;
_dirty |= DirtyFlags.DepthBiasEnable;
}
public void SetScissor(int index, Rect2D scissor)
{
_scissors[index] = scissor;
_dirty |= DirtyFlags.Scissor;
}
public void SetStencilMasks(
uint backCompareMask,
public void SetDepthTestBool(bool testEnable, bool writeEnable)
{
DepthTestEnable = testEnable;
DepthWriteEnable = writeEnable;
_dirty |= DirtyFlags.DepthTestBool;
}
public void SetDepthTestCompareOp(CompareOp depthTestOp)
{
_depthCompareOp = depthTestOp;
_dirty |= DirtyFlags.DepthTestCompareOp;
}
public void SetStencilTestandOp(
StencilOp backFailOp,
StencilOp backPassOp,
StencilOp backDepthFailOp,
CompareOp backCompareOp,
StencilOp frontFailOp,
StencilOp frontPassOp,
StencilOp frontDepthFailOp,
CompareOp frontCompareOp,
bool stencilTestEnable)
{
_backFailOp = backFailOp;
_backPassOp = backPassOp;
_backDepthFailOp = backDepthFailOp;
_backCompareOp = backCompareOp;
_frontFailOp = frontFailOp;
_frontPassOp = frontPassOp;
_frontDepthFailOp = frontDepthFailOp;
_frontCompareOp = frontCompareOp;
StencilTestEnable = stencilTestEnable;
_dirty |= DirtyFlags.StencilTestEnableAndStencilOp;
}
public void SetStencilTest(bool stencilTestEnable)
{
StencilTestEnable = stencilTestEnable;
_dirty |= DirtyFlags.StencilTestEnableAndStencilOp;
}
public void SetStencilMask(uint backCompareMask,
uint backWriteMask,
uint backReference,
uint frontCompareMask,
@@ -81,28 +177,46 @@ namespace Ryujinx.Graphics.Vulkan
_frontCompareMask = frontCompareMask;
_frontWriteMask = frontWriteMask;
_frontReference = frontReference;
_dirty |= DirtyFlags.Stencil;
}
public void SetViewport(int index, Viewport viewport)
{
Viewports[index] = viewport;
_dirty |= DirtyFlags.Viewport;
}
public void SetViewports(ref Array16<Viewport> viewports, uint viewportsCount)
{
Viewports = viewports;
ViewportsCount = viewportsCount;
if (ViewportsCount != 0)
if (!Viewports.Equals(viewports) || ViewportsCount != viewportsCount)
{
_dirty |= DirtyFlags.Viewport;
Viewports = viewports;
ViewportsCount = viewportsCount;
if (ViewportsCount != 0)
{
_dirty |= DirtyFlags.Viewport;
}
}
}
public void SetCullMode(CullModeFlags cullMode)
{
CullMode = cullMode;
_dirty |= DirtyFlags.CullMode;
}
public void SetFrontFace(FrontFace frontFace)
{
_frontFace = frontFace;
_dirty |= DirtyFlags.FrontFace;
}
public void SetLineWidth(float width)
{
_lineWidth = width;
_dirty |= DirtyFlags.LineWidth;
}
public void SetFeedbackLoop(FeedbackLoopAspects aspects)
{
_feedbackLoopAspects = aspects;
@@ -110,43 +224,149 @@ namespace Ryujinx.Graphics.Vulkan
_dirty |= DirtyFlags.FeedbackLoop;
}
public void ForceAllDirty()
public void SetRasterizerDiscard(bool discard)
{
_dirty = DirtyFlags.All;
_discard = discard;
_dirty |= DirtyFlags.RasterDiscard;
}
public void SetPrimitiveRestartEnable(bool primitiveRestart)
{
_primitiveRestartEnable = primitiveRestart;
_dirty |= DirtyFlags.PrimitiveRestart;
}
public void SetPrimitiveTopology(PrimitiveTopology primitiveTopology)
{
Topology = primitiveTopology;
_dirty |= DirtyFlags.PrimitiveTopology;
}
public void SetLogicOp(LogicOp op)
{
_logicOp = op;
_dirty |= DirtyFlags.LogicOp;
}
public void SetPatchControlPoints(uint points)
{
_patchControlPoints = points;
_dirty |= DirtyFlags.PatchControlPoints;
}
public void ForceAllDirty(VulkanRenderer gd)
{
_dirty = DirtyFlags.Standard;
if (gd.Capabilities.SupportsExtendedDynamicState)
{
_dirty |= DirtyFlags.Extended;
}
if (gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2)
{
_dirty |= DirtyFlags.Extended2;
if (gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2LogicOp)
{
_dirty |= DirtyFlags.LogicOp;
}
if (gd.Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2PatchControlPoints)
{
_dirty |= DirtyFlags.PatchControlPoints;
}
}
if (!gd.IsMoltenVk)
{
_dirty |= DirtyFlags.LineWidth;
}
if (gd.Capabilities.SupportsDynamicAttachmentFeedbackLoop)
{
_dirty |= DirtyFlags.FeedbackLoop;
}
}
public void ReplayIfDirty(VulkanRenderer gd, CommandBuffer commandBuffer)
{
Vk api = gd.Api;
if (_dirty.HasFlag(DirtyFlags.Blend))
if (_dirty == DirtyFlags.None)
{
RecordBlend(api, commandBuffer);
return;
}
if (_dirty.HasFlag(DirtyFlags.DepthBias))
{
RecordDepthBias(api, commandBuffer);
}
var api = gd.Api;
var extendedStateApi = gd.ExtendedDynamicStateApi;
var extendedState2Api = gd.ExtendedDynamicState2Api;
var dynamicFeedbackLoopApi = gd.DynamicFeedbackLoopApi;
if (_dirty.HasFlag(DirtyFlags.Scissor))
{
RecordScissor(api, commandBuffer);
}
DirtyFlags dirtyFlags = _dirty;
if (_dirty.HasFlag(DirtyFlags.Stencil))
while (dirtyFlags != DirtyFlags.None)
{
RecordStencilMasks(api, commandBuffer);
}
int bitIndex = BitOperations.TrailingZeroCount((uint)dirtyFlags);
DirtyFlags currentFlag = (DirtyFlags)(1 << bitIndex);
if (_dirty.HasFlag(DirtyFlags.Viewport))
{
RecordViewport(api, commandBuffer);
}
switch (currentFlag)
{
case DirtyFlags.Blend:
RecordBlend(api, commandBuffer);
break;
case DirtyFlags.DepthBias:
RecordDepthBias(api, commandBuffer);
break;
case DirtyFlags.Scissor:
RecordScissor(gd, commandBuffer);
break;
case DirtyFlags.Stencil:
RecordStencil(api, commandBuffer);
break;
case DirtyFlags.Viewport:
RecordViewport(gd, commandBuffer);
break;
case DirtyFlags.FeedbackLoop:
RecordFeedbackLoop(dynamicFeedbackLoopApi, commandBuffer);
break;
case DirtyFlags.CullMode:
RecordCullMode(extendedStateApi, commandBuffer);
break;
case DirtyFlags.FrontFace:
RecordFrontFace(extendedStateApi, commandBuffer);
break;
case DirtyFlags.DepthTestBool:
RecordDepthTestBool(extendedStateApi, commandBuffer);
break;
case DirtyFlags.DepthTestCompareOp:
RecordDepthTestCompareOp(extendedStateApi, commandBuffer);
break;
case DirtyFlags.StencilTestEnableAndStencilOp:
RecordStencilTestAndOp(extendedStateApi, commandBuffer);
break;
case DirtyFlags.LineWidth:
RecordLineWidth(api, commandBuffer);
break;
case DirtyFlags.RasterDiscard:
RecordRasterizationDiscard(extendedState2Api, commandBuffer);
break;
case DirtyFlags.LogicOp:
RecordLogicOp(extendedState2Api, commandBuffer);
break;
case DirtyFlags.PatchControlPoints:
RecordPatchControlPoints(extendedState2Api, commandBuffer);
break;
case DirtyFlags.PrimitiveRestart:
RecordPrimitiveRestartEnable(gd, commandBuffer);
break;
case DirtyFlags.PrimitiveTopology:
RecordPrimitiveTopology(extendedStateApi, commandBuffer);
break;
case DirtyFlags.DepthBiasEnable:
RecordDepthBiasEnable(extendedState2Api, commandBuffer);
break;
}
if (_dirty.HasFlag(DirtyFlags.FeedbackLoop) && gd.Capabilities.SupportsDynamicAttachmentFeedbackLoop)
{
RecordFeedbackLoop(gd.DynamicFeedbackLoopApi, commandBuffer);
dirtyFlags &= ~currentFlag;
}
_dirty = DirtyFlags.None;
@@ -162,15 +382,27 @@ namespace Ryujinx.Graphics.Vulkan
api.CmdSetDepthBias(commandBuffer, _depthBiasConstantFactor, _depthBiasClamp, _depthBiasSlopeFactor);
}
private void RecordScissor(Vk api, CommandBuffer commandBuffer)
private readonly void RecordDepthBiasEnable(ExtExtendedDynamicState2 gd, CommandBuffer commandBuffer)
{
gd.CmdSetDepthBiasEnable(commandBuffer, _depthBiasEnable);
}
private void RecordScissor(VulkanRenderer gd, CommandBuffer commandBuffer)
{
if (ScissorsCount != 0)
{
api.CmdSetScissor(commandBuffer, 0, (uint)ScissorsCount, _scissors.AsSpan());
if (gd.Capabilities.SupportsExtendedDynamicState)
{
gd.ExtendedDynamicStateApi.CmdSetScissorWithCount(commandBuffer, (uint)ScissorsCount, _scissors.AsSpan());
}
else
{
gd.Api.CmdSetScissor(commandBuffer, 0, (uint)ScissorsCount, _scissors.AsSpan());
}
}
}
private readonly void RecordStencilMasks(Vk api, CommandBuffer commandBuffer)
private readonly void RecordStencil(Vk api, CommandBuffer commandBuffer)
{
api.CmdSetStencilCompareMask(commandBuffer, StencilFaceFlags.FaceBackBit, _backCompareMask);
api.CmdSetStencilWriteMask(commandBuffer, StencilFaceFlags.FaceBackBit, _backWriteMask);
@@ -180,12 +412,107 @@ namespace Ryujinx.Graphics.Vulkan
api.CmdSetStencilReference(commandBuffer, StencilFaceFlags.FaceFrontBit, _frontReference);
}
private void RecordViewport(Vk api, CommandBuffer commandBuffer)
private readonly void RecordStencilTestAndOp(ExtExtendedDynamicState api, CommandBuffer commandBuffer)
{
if (ViewportsCount != 0)
api.CmdSetStencilTestEnable(commandBuffer, StencilTestEnable);
api.CmdSetStencilOp(commandBuffer, StencilFaceFlags.FaceBackBit, _backFailOp, _backPassOp, _backDepthFailOp, _backCompareOp);
api.CmdSetStencilOp(commandBuffer, StencilFaceFlags.FaceFrontBit, _frontFailOp, _frontPassOp, _frontDepthFailOp, _frontCompareOp);
}
private void RecordViewport(VulkanRenderer gd, CommandBuffer commandBuffer)
{
if (ViewportsCount == 0)
{
api.CmdSetViewport(commandBuffer, 0, ViewportsCount, Viewports.AsSpan());
return;
}
if (gd.Capabilities.SupportsExtendedDynamicState)
{
gd.ExtendedDynamicStateApi.CmdSetViewportWithCount(commandBuffer, ViewportsCount, Viewports.AsSpan());
}
else
{
gd.Api.CmdSetViewport(commandBuffer, 0, ViewportsCount, Viewports.AsSpan());
}
}
private readonly void RecordCullMode(ExtExtendedDynamicState api, CommandBuffer commandBuffer)
{
api.CmdSetCullMode(commandBuffer, CullMode);
}
private readonly void RecordFrontFace(ExtExtendedDynamicState api, CommandBuffer commandBuffer)
{
api.CmdSetFrontFace(commandBuffer, _frontFace);
}
private readonly void RecordDepthTestBool(ExtExtendedDynamicState api, CommandBuffer commandBuffer)
{
api.CmdSetDepthTestEnable(commandBuffer, DepthTestEnable);
api.CmdSetDepthWriteEnable(commandBuffer, DepthWriteEnable);
}
private readonly void RecordDepthTestCompareOp(ExtExtendedDynamicState api, CommandBuffer commandBuffer)
{
api.CmdSetDepthCompareOp(commandBuffer, _depthCompareOp);
}
private readonly void RecordRasterizationDiscard(ExtExtendedDynamicState2 extendedDynamicState2Api, CommandBuffer commandBuffer)
{
extendedDynamicState2Api.CmdSetRasterizerDiscardEnable(commandBuffer, _discard);
}
private readonly void RecordPrimitiveRestartEnable(VulkanRenderer gd, CommandBuffer commandBuffer)
{
bool primitiveRestartEnable = _primitiveRestartEnable;
bool topologySupportsRestart;
if (gd.Capabilities.SupportsPrimitiveTopologyListRestart)
{
topologySupportsRestart = gd.Capabilities.SupportsPrimitiveTopologyPatchListRestart ||
Topology != PrimitiveTopology.PatchList;
}
else
{
topologySupportsRestart = Topology == PrimitiveTopology.LineStrip ||
Topology == PrimitiveTopology.TriangleStrip ||
Topology == PrimitiveTopology.TriangleFan ||
Topology == PrimitiveTopology.LineStripWithAdjacency ||
Topology == PrimitiveTopology.TriangleStripWithAdjacency;
}
primitiveRestartEnable &= topologySupportsRestart;
// Cannot disable primitiveRestartEnable for these Topologies on MacOS.
if (gd.IsMoltenVk)
{
primitiveRestartEnable = true;
}
gd.ExtendedDynamicState2Api.CmdSetPrimitiveRestartEnable(commandBuffer, primitiveRestartEnable);
}
private readonly void RecordPrimitiveTopology(ExtExtendedDynamicState extendedDynamicStateApi, CommandBuffer commandBuffer)
{
extendedDynamicStateApi.CmdSetPrimitiveTopology(commandBuffer, Topology);
}
private readonly void RecordLogicOp(ExtExtendedDynamicState2 extendedDynamicState2Api, CommandBuffer commandBuffer)
{
extendedDynamicState2Api.CmdSetLogicOp(commandBuffer, _logicOp);
}
private readonly void RecordPatchControlPoints(ExtExtendedDynamicState2 extendedDynamicState2Api, CommandBuffer commandBuffer)
{
extendedDynamicState2Api.CmdSetPatchControlPoints(commandBuffer, _patchControlPoints);
}
private readonly void RecordLineWidth(Vk api, CommandBuffer commandBuffer)
{
api.CmdSetLineWidth(commandBuffer, _lineWidth);
}
private readonly void RecordFeedbackLoop(ExtAttachmentFeedbackLoopDynamicState api, CommandBuffer commandBuffer)

View File

@@ -9,11 +9,15 @@ namespace Ryujinx.Graphics.Vulkan
{
}
public void SetRenderTarget(TextureView view, uint width, uint height)
public void SetRenderTarget(TextureView view, uint width, uint height, bool signalChange = true)
{
CreateFramebuffer(view, width, height);
CreateRenderPass();
SignalStateChange();
if (signalChange)
{
SignalStateChange();
}
}
private void CreateFramebuffer(TextureView view, uint width, uint height)

File diff suppressed because it is too large Load Diff

View File

@@ -11,23 +11,17 @@ namespace Ryujinx.Graphics.Vulkan
{
public ulong Id0;
public ulong Id1;
public ulong Id2;
public ulong Id3;
public ulong Id4;
public ulong Id5;
public ulong Id6;
public ulong Id7;
public ulong Id8;
private readonly uint VertexAttributeDescriptionsCount => (byte)((Id5 >> 38) & 0xFF);
private readonly uint VertexBindingDescriptionsCount => (byte)((Id5 >> 46) & 0xFF);
private readonly uint ColorBlendAttachmentStateCount => (byte)((Id6 >> 8) & 0xFF);
private readonly bool HasDepthStencil => ((Id6 >> 63) & 0x1) != 0UL;
private readonly uint VertexAttributeDescriptionsCount => (byte)((Id0 >> 38) & 0xFF);
private readonly uint VertexBindingDescriptionsCount => (byte)((Id0 >> 46) & 0xFF);
private readonly uint ColorBlendAttachmentStateCount => (byte)((Id1 >> 8) & 0xFF);
private readonly bool HasDepthStencil => ((Id1 >> 63) & 0x1) != 0UL;
public Array32<VertexInputAttributeDescription> VertexAttributeDescriptions;
public Array33<VertexInputBindingDescription> VertexBindingDescriptions;
public Array32<VertexInputBindingDescription> VertexBindingDescriptions;
public Array8<PipelineColorBlendAttachmentState> ColorBlendAttachmentState;
public Array9<Format> AttachmentFormats;
public uint AttachmentIntegerFormatMask;
@@ -40,9 +34,7 @@ namespace Ryujinx.Graphics.Vulkan
public bool Equals(ref PipelineUid other)
{
if (!Unsafe.As<ulong, Vector256<byte>>(ref Id0).Equals(Unsafe.As<ulong, Vector256<byte>>(ref other.Id0)) ||
!Unsafe.As<ulong, Vector256<byte>>(ref Id4).Equals(Unsafe.As<ulong, Vector256<byte>>(ref other.Id4)) ||
!Unsafe.As<ulong, Vector128<byte>>(ref Id7).Equals(Unsafe.As<ulong, Vector128<byte>>(ref other.Id7)))
if (!Unsafe.As<ulong, Vector256<byte>>(ref Id0).Equals(Unsafe.As<ulong, Vector256<byte>>(ref other.Id0)))
{
return false;
}
@@ -80,12 +72,7 @@ namespace Ryujinx.Graphics.Vulkan
ulong hash64 = Id0 * 23 ^
Id1 * 23 ^
Id2 * 23 ^
Id3 * 23 ^
Id4 * 23 ^
Id5 * 23 ^
Id6 * 23 ^
Id7 * 23 ^
Id8 * 23;
Id3 * 23;
for (int i = 0; i < (int)VertexAttributeDescriptionsCount; i++)
{

View File

@@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
using PrimitiveTopology = Silk.NET.Vulkan.PrimitiveTopology;
namespace Ryujinx.Graphics.Vulkan
{
@@ -538,7 +539,7 @@ namespace Ryujinx.Graphics.Vulkan
public void CreateBackgroundComputePipeline()
{
PipelineState pipeline = new();
pipeline.Initialize();
pipeline.Initialize(_gd.Capabilities);
pipeline.Stages[0] = _shaders[0].GetInfo();
pipeline.StagesCount = 1;

View File

@@ -73,7 +73,10 @@ namespace Ryujinx.Graphics.Vulkan
_buffer = autoBuffer;
state.Internal.VertexBindingDescriptions[DescriptorIndex].Stride = (uint)stride;
if (!gd.Capabilities.SupportsExtendedDynamicState)
{
state.Internal.VertexBindingDescriptions[DescriptorIndex].Stride = (uint)stride;
}
}
return;
@@ -81,8 +84,11 @@ namespace Ryujinx.Graphics.Vulkan
autoBuffer = gd.BufferManager.GetBuffer(cbs.CommandBuffer, _handle, false, out int size);
// The original stride must be reapplied in case it was rewritten.
state.Internal.VertexBindingDescriptions[DescriptorIndex].Stride = (uint)_stride;
if (!gd.Capabilities.SupportsExtendedDynamicState)
{
// The original stride must be reapplied in case it was rewritten.
state.Internal.VertexBindingDescriptions[DescriptorIndex].Stride = (uint)_stride;
}
if (_offset >= size)
{

View File

@@ -51,7 +51,7 @@ namespace Ryujinx.Graphics.Vulkan
{
if (_count != 0)
{
if (_gd.Capabilities.SupportsExtendedDynamicState)
if (_gd.Capabilities.SupportsExtendedDynamicState && (_gd.SupportsMTL31 || !_gd.IsMoltenVk))
{
_gd.ExtendedDynamicStateApi.CmdBindVertexBuffers2(
cbs.CommandBuffer,

View File

@@ -23,6 +23,7 @@ namespace Ryujinx.Graphics.Vulkan
private static readonly string[] _desirableExtensions = {
ExtConditionalRendering.ExtensionName,
ExtExtendedDynamicState.ExtensionName,
ExtExtendedDynamicState2.ExtensionName,
ExtTransformFeedback.ExtensionName,
KhrDrawIndirectCount.ExtensionName,
KhrPushDescriptor.ExtensionName,
@@ -314,6 +315,17 @@ namespace Ryujinx.Graphics.Vulkan
features2.PNext = &supportedFeaturesCustomBorderColor;
}
PhysicalDeviceExtendedDynamicState2FeaturesEXT supportedFeaturesExtExtendedDynamicState2 = new()
{
SType = StructureType.PhysicalDeviceExtendedDynamicState2FeaturesExt,
PNext = features2.PNext,
};
if (physicalDevice.IsDeviceExtensionPresent(ExtExtendedDynamicState2.ExtensionName))
{
features2.PNext = &supportedFeaturesExtExtendedDynamicState2;
}
PhysicalDevicePrimitiveTopologyListRestartFeaturesEXT supportedFeaturesPrimitiveTopologyListRestart = new()
{
SType = StructureType.PhysicalDevicePrimitiveTopologyListRestartFeaturesExt,
@@ -416,6 +428,7 @@ namespace Ryujinx.Graphics.Vulkan
TessellationShader = supportedFeatures.TessellationShader,
VertexPipelineStoresAndAtomics = supportedFeatures.VertexPipelineStoresAndAtomics,
RobustBufferAccess = useRobustBufferAccess,
WideLines = supportedFeatures.WideLines,
SampleRateShading = supportedFeatures.SampleRateShading,
};
@@ -473,6 +486,20 @@ namespace Ryujinx.Graphics.Vulkan
pExtendedFeatures = &featuresExtendedDynamicState;
if (physicalDevice.IsDeviceExtensionPresent(ExtExtendedDynamicState2.ExtensionName))
{
var featuresExtendedDynamicState2 = new PhysicalDeviceExtendedDynamicState2FeaturesEXT()
{
SType = StructureType.PhysicalDeviceExtendedDynamicState2FeaturesExt,
PNext = pExtendedFeatures,
ExtendedDynamicState2 = supportedFeaturesExtExtendedDynamicState2.ExtendedDynamicState2,
ExtendedDynamicState2LogicOp = supportedFeaturesExtExtendedDynamicState2.ExtendedDynamicState2LogicOp,
ExtendedDynamicState2PatchControlPoints = supportedFeaturesExtExtendedDynamicState2.ExtendedDynamicState2PatchControlPoints,
};
pExtendedFeatures = &featuresExtendedDynamicState2;
}
var featuresVk11 = new PhysicalDeviceVulkan11Features
{
SType = StructureType.PhysicalDeviceVulkan11Features,

View File

@@ -39,6 +39,7 @@ namespace Ryujinx.Graphics.Vulkan
internal KhrSwapchain SwapchainApi { get; private set; }
internal ExtConditionalRendering ConditionalRenderingApi { get; private set; }
internal ExtExtendedDynamicState ExtendedDynamicStateApi { get; private set; }
internal ExtExtendedDynamicState2 ExtendedDynamicState2Api { get; private set; }
internal KhrPushDescriptor PushDescriptorApi { get; private set; }
internal ExtTransformFeedback TransformFeedbackApi { get; private set; }
internal KhrDrawIndirectCount DrawIndirectCountApi { get; private set; }
@@ -94,6 +95,7 @@ namespace Ryujinx.Graphics.Vulkan
internal bool IsIntelArc { get; private set; }
internal bool IsQualcommProprietary { get; private set; }
internal bool IsMoltenVk { get; private set; }
internal bool SupportsMTL31 { get; private set; }
internal bool IsTBDR { get; private set; }
internal bool IsSharedMemory { get; private set; }
@@ -119,6 +121,8 @@ namespace Ryujinx.Graphics.Vulkan
// Any device running on MacOS is using MoltenVK, even Intel and AMD vendors.
if (IsMoltenVk = OperatingSystem.IsMacOS())
MVKInitialization.Initialize();
SupportsMTL31 = OperatingSystem.IsMacOSVersionAtLeast(14);
}
public static VulkanRenderer Create(
@@ -141,6 +145,11 @@ namespace Ryujinx.Graphics.Vulkan
ExtendedDynamicStateApi = extendedDynamicStateApi;
}
if (Api.TryGetDeviceExtension(_instance.Instance, _device, out ExtExtendedDynamicState2 extendedDynamicState2Api))
{
ExtendedDynamicState2Api = extendedDynamicState2Api;
}
if (Api.TryGetDeviceExtension(_instance.Instance, _device, out KhrPushDescriptor pushDescriptorApi))
{
PushDescriptorApi = pushDescriptorApi;
@@ -235,6 +244,11 @@ namespace Ryujinx.Graphics.Vulkan
SType = StructureType.PhysicalDevicePrimitiveTopologyListRestartFeaturesExt,
};
PhysicalDeviceExtendedDynamicState2FeaturesEXT featuresExtendedDynamicState2 = new()
{
SType = StructureType.PhysicalDeviceExtendedDynamicState2FeaturesExt,
};
PhysicalDeviceRobustness2FeaturesEXT featuresRobustness2 = new()
{
SType = StructureType.PhysicalDeviceRobustness2FeaturesExt,
@@ -275,6 +289,12 @@ namespace Ryujinx.Graphics.Vulkan
features2.PNext = &featuresPrimitiveTopologyListRestart;
}
if (_physicalDevice.IsDeviceExtensionPresent(ExtExtendedDynamicState2.ExtensionName))
{
featuresExtendedDynamicState2.PNext = features2.PNext;
features2.PNext = &featuresExtendedDynamicState2;
}
if (_physicalDevice.IsDeviceExtensionPresent("VK_EXT_robustness2"))
{
featuresRobustness2.PNext = features2.PNext;
@@ -408,6 +428,10 @@ namespace Ryujinx.Graphics.Vulkan
properties.Limits.FramebufferDepthSampleCounts &
properties.Limits.FramebufferStencilSampleCounts;
// Temporarily disable this, can be added back at a later date, make it easy to re-enable.
// Disabled because currently causing Device Lost error on NVIDIA.
featuresExtendedDynamicState2.ExtendedDynamicState2PatchControlPoints = false;
Capabilities = new HardwareCapabilities(
_physicalDevice.IsDeviceExtensionPresent("VK_EXT_index_type_uint8"),
supportsCustomBorderColor,
@@ -424,6 +448,8 @@ namespace Ryujinx.Graphics.Vulkan
features2.Features.ShaderStorageImageMultisample,
_physicalDevice.IsDeviceExtensionPresent(ExtConditionalRendering.ExtensionName),
_physicalDevice.IsDeviceExtensionPresent(ExtExtendedDynamicState.ExtensionName),
featuresExtendedDynamicState2,
_physicalDevice.PhysicalDeviceProperties.Limits.MaxTessellationPatchSize,
features2.Features.MultiViewport && !(IsMoltenVk && Vendor == Vendor.Amd), // Workaround for AMD on MoltenVK issue
featuresRobustness2.NullDescriptor || IsMoltenVk,
supportsPushDescriptors && !IsMoltenVk,
@@ -439,6 +465,7 @@ namespace Ryujinx.Graphics.Vulkan
_physicalDevice.IsDeviceExtensionPresent("VK_NV_viewport_array2"),
_physicalDevice.IsDeviceExtensionPresent(ExtExternalMemoryHost.ExtensionName),
supportsDepthClipControl && featuresDepthClipControl.DepthClipControl,
_physicalDevice.PhysicalDeviceFeatures.WideLines,
supportsAttachmentFeedbackLoop && featuresAttachmentFeedbackLoop.AttachmentFeedbackLoopLayout,
supportsDynamicAttachmentFeedbackLoop && featuresDynamicAttachmentFeedbackLoop.AttachmentFeedbackLoopDynamicState,
propertiesSubgroup.SubgroupSize,
@@ -774,6 +801,10 @@ namespace Ryujinx.Graphics.Vulkan
supportsViewportSwizzle: false,
supportsIndirectParameters: true,
supportsDepthClipControl: Capabilities.SupportsDepthClipControl,
supportsExtendedDynamicState: Capabilities.SupportsExtendedDynamicState,
supportsExtendedDynamicState2: Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2,
supportsLogicOpDynamicState: Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2LogicOp,
supportsPatchControlPointsDynamicState: Capabilities.SupportsExtendedDynamicState2.ExtendedDynamicState2PatchControlPoints,
uniformBufferSetIndex: PipelineBase.UniformSetIndex,
storageBufferSetIndex: PipelineBase.StorageSetIndex,
textureSetIndex: PipelineBase.TextureSetIndex,

View File

@@ -26,10 +26,20 @@ namespace Ryujinx.HLE.HOS.Applets
{
_normalSession = normalSession;
_interactiveSession = interactiveSession;
// TODO(jduncanator): Parse PlayerSelectConfig from input data
_normalSession.Push(BuildResponse());
UserProfile selected = _system.Device.UIHandler.ShowPlayerSelectDialog();
if (selected == null)
{
_normalSession.Push(BuildResponse());
}
else if (selected.UserId == new UserId("00000000000000000000000000000080"))
{
_normalSession.Push(BuildGuestResponse());
}
else
{
_normalSession.Push(BuildResponse(selected));
}
AppletStateChanged?.Invoke(this, null);
_system.ReturnFocus();
@@ -37,16 +47,34 @@ namespace Ryujinx.HLE.HOS.Applets
return ResultCode.Success;
}
private byte[] BuildResponse()
private byte[] BuildResponse(UserProfile selectedUser)
{
UserProfile currentUser = _system.AccountManager.LastOpenedUser;
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
using BinaryWriter writer = new(stream);
writer.Write((ulong)PlayerSelectResult.Success);
currentUser.UserId.Write(writer);
selectedUser.UserId.Write(writer);
return stream.ToArray();
}
private byte[] BuildGuestResponse()
{
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
using BinaryWriter writer = new(stream);
writer.Write(new byte());
return stream.ToArray();
}
private byte[] BuildResponse()
{
using MemoryStream stream = MemoryStreamManager.Shared.GetStream();
using BinaryWriter writer = new(stream);
writer.Write((ulong)PlayerSelectResult.Failure);
return stream.ToArray();
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@@ -48,6 +48,7 @@
<EmbeddedResource Include="HOS\Applets\SoftwareKeyboard\Resources\Icon_BtnB.png" />
<EmbeddedResource Include="HOS\Applets\SoftwareKeyboard\Resources\Icon_KeyF6.png" />
<EmbeddedResource Include="HOS\Services\Account\Acc\DefaultUserImage.jpg" />
<EmbeddedResource Include="HOS\Services\Account\Acc\GuestUserImage.jpg" />
</ItemGroup>
</Project>

View File

@@ -1,4 +1,5 @@
using Ryujinx.HLE.HOS.Applets;
using Ryujinx.HLE.HOS.Services.Account.Acc;
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
namespace Ryujinx.HLE.UI
@@ -59,5 +60,11 @@ namespace Ryujinx.HLE.UI
/// Gets fonts and colors used by the host.
/// </summary>
IHostUITheme HostUITheme { get; }
/// <summary>
/// Displays the player select dialog and returns the selected profile.
/// </summary>
UserProfile ShowPlayerSelectDialog();
}
}

View File

@@ -489,7 +489,7 @@ namespace Ryujinx.Ava
Dispatcher.UIThread.InvokeAsync(() =>
{
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device.Processes.ActiveApplication, Program.Version);
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowTitleBar);
});
_viewModel.SetUiProgressHandlers(Device);
@@ -872,7 +872,7 @@ namespace Ryujinx.Ava
Device?.System.TogglePauseEmulation(false);
_viewModel.IsPaused = false;
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version);
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowTitleBar);
Logger.Info?.Print(LogClass.Emulation, "Emulation was resumed");
}
@@ -881,7 +881,7 @@ namespace Ryujinx.Ava
Device?.System.TogglePauseEmulation(true);
_viewModel.IsPaused = true;
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version, LocaleManager.Instance[LocaleKeys.Paused]);
_viewModel.Title = TitleHelper.ActiveApplicationTitle(Device?.Processes.ActiveApplication, Program.Version, !ConfigurationState.Instance.ShowTitleBar, LocaleManager.Instance[LocaleKeys.Paused]);
Logger.Info?.Print(LogClass.Emulation, "Emulation was paused");
}

File diff suppressed because it is too large Load Diff

View File

@@ -4,11 +4,11 @@ namespace Ryujinx.Ava.Common
{
public static class ThemeManager
{
public static event EventHandler ThemeChanged;
public static event Action ThemeChanged;
public static void OnThemeChanged()
{
ThemeChanged?.Invoke(null, EventArgs.Empty);
ThemeChanged?.Invoke();
}
}
}

View File

@@ -2,6 +2,7 @@ using DiscordRPC;
using Gommon;
using Humanizer;
using Humanizer.Localisation;
using Ryujinx.Ava.Utilities;
using Ryujinx.Ava.Utilities.AppLibrary;
using Ryujinx.Ava.Utilities.Configuration;
using Ryujinx.Common;
@@ -97,7 +98,7 @@ namespace Ryujinx.Ava
},
Details = TruncateToByteLength($"Playing {appMeta.Title}"),
State = appMeta.LastPlayed.HasValue && appMeta.TimePlayed.TotalSeconds > 5
? $"Total play time: {appMeta.TimePlayed.Humanize(2, false, maxUnit: TimeUnit.Hour)}"
? $"Total play time: {ValueFormatUtils.FormatTimeSpan(appMeta.TimePlayed)}"
: "Never played",
Timestamps = Timestamps.Now
});

View File

@@ -1,21 +0,0 @@
using System;
namespace Ryujinx.Headless
{
class StatusUpdatedEventArgs(
string vSyncMode,
string dockedMode,
string aspectRatio,
string gameStatus,
string fifoStatus,
string gpuName)
: EventArgs
{
public string VSyncMode = vSyncMode;
public string DockedMode = dockedMode;
public string AspectRatio = aspectRatio;
public string GameStatus = gameStatus;
public string FifoStatus = fifoStatus;
public string GpuName = gpuName;
}
}

View File

@@ -108,8 +108,7 @@ namespace Ryujinx.Headless
}
}
}
private readonly GraphicsDebugLevel _glLogLevel;
private SDL2OpenGLContext _openGLContext;
public OpenGLWindow(
@@ -121,7 +120,6 @@ namespace Ryujinx.Headless
bool ignoreControllerApplet)
: base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursorMode, ignoreControllerApplet)
{
_glLogLevel = glLogLevel;
}
public override SDL_WindowFlags WindowFlags => SDL_WindowFlags.SDL_WINDOW_OPENGL;
@@ -129,7 +127,7 @@ namespace Ryujinx.Headless
protected override void InitializeWindowRenderer()
{
// Ensure to not share this context with other contexts before this point.
SetupOpenGLAttributes(false, _glLogLevel);
SetupOpenGLAttributes(false, GlLogLevel);
nint context = SDL_GL_CreateContext(WindowHandle);
CheckResult(SDL_GL_SetSwapInterval(1));

View File

@@ -10,8 +10,6 @@ namespace Ryujinx.Headless
{
class VulkanWindow : WindowBase
{
private readonly GraphicsDebugLevel _glLogLevel;
public VulkanWindow(
InputManager inputManager,
GraphicsDebugLevel glLogLevel,
@@ -21,7 +19,6 @@ namespace Ryujinx.Headless
bool ignoreControllerApplet)
: base(inputManager, glLogLevel, aspectRatio, enableMouse, hideCursorMode, ignoreControllerApplet)
{
_glLogLevel = glLogLevel;
}
public override SDL_WindowFlags WindowFlags => SDL_WindowFlags.SDL_WINDOW_VULKAN;

View File

@@ -1,15 +1,15 @@
using Humanizer;
using LibHac.Tools.Fs;
using Ryujinx.Ava;
using Ryujinx.Ava.UI.Models;
using Ryujinx.Common;
using Ryujinx.Common.Configuration;
using Ryujinx.Common.Configuration.Hid;
using Ryujinx.Common.Logging;
using Ryujinx.Graphics.GAL;
using Ryujinx.Graphics.GAL.Multithreading;
using Ryujinx.Graphics.Gpu;
using Ryujinx.Graphics.OpenGL;
using Ryujinx.HLE.HOS.Applets;
using Ryujinx.HLE.HOS.Services.Account.Acc;
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
using Ryujinx.HLE.UI;
using Ryujinx.Input;
@@ -27,6 +27,7 @@ using static SDL2.SDL;
using AntiAliasing = Ryujinx.Common.Configuration.AntiAliasing;
using ScalingFilter = Ryujinx.Common.Configuration.ScalingFilter;
using Switch = Ryujinx.HLE.Switch;
using UserProfile = Ryujinx.HLE.HOS.Services.Account.Acc.UserProfile;
namespace Ryujinx.Headless
{
@@ -54,8 +55,6 @@ namespace Ryujinx.Headless
public Switch Device { get; private set; }
public IRenderer Renderer { get; private set; }
public event EventHandler<StatusUpdatedEventArgs> StatusUpdatedEvent;
protected nint WindowHandle { get; set; }
public IHostUITheme HostUITheme { get; }
@@ -73,7 +72,7 @@ namespace Ryujinx.Headless
protected SDL2MouseDriver MouseDriver;
private readonly InputManager _inputManager;
private readonly IKeyboard _keyboardInterface;
private readonly GraphicsDebugLevel _glLogLevel;
protected readonly GraphicsDebugLevel GlLogLevel;
private readonly Stopwatch _chrono;
private readonly long _ticksPerFrame;
private readonly CancellationTokenSource _gpuCancellationTokenSource;
@@ -105,7 +104,7 @@ namespace Ryujinx.Headless
NpadManager = _inputManager.CreateNpadManager();
TouchScreenManager = _inputManager.CreateTouchScreenManager();
_keyboardInterface = (IKeyboard)_inputManager.KeyboardDriver.GetGamepad("0");
_glLogLevel = glLogLevel;
GlLogLevel = glLogLevel;
_chrono = new Stopwatch();
_ticksPerFrame = Stopwatch.Frequency / TargetFps;
_gpuCancellationTokenSource = new CancellationTokenSource();
@@ -269,7 +268,7 @@ namespace Ryujinx.Headless
{
InitializeWindowRenderer();
Device.Gpu.Renderer.Initialize(_glLogLevel);
Device.Gpu.Renderer.Initialize(GlLogLevel);
InitializeRenderer();
@@ -309,21 +308,6 @@ namespace Ryujinx.Headless
if (_ticks >= _ticksPerFrame)
{
string dockedMode = Device.System.State.DockedMode ? "Docked" : "Handheld";
float scale = GraphicsConfig.ResScale;
if (scale != 1)
{
dockedMode += $" ({scale}x)";
}
StatusUpdatedEvent?.Invoke(this, new StatusUpdatedEventArgs(
Device.VSyncMode.ToString(),
dockedMode,
Device.Configuration.AspectRatio.ToText(),
$"{Device.Statistics.GetGameFrameRate():00.00} FPS ({Device.Statistics.GetGameFrameTime():00.00} ms)",
$"FIFO: {Device.Statistics.GetFifoPercent():0.00} %",
$"GPU: {_gpuDriverName}"));
_ticks = Math.Min(_ticks - _ticksPerFrame, _ticksPerFrame);
}
}
@@ -573,5 +557,10 @@ namespace Ryujinx.Headless
SDL2Driver.Instance.Dispose();
}
}
public UserProfile ShowPlayerSelectDialog()
{
return AccountSaveDataManager.GetLastUsedUser();
}
}
}

View File

@@ -72,8 +72,8 @@
<ItemGroup>
<ProjectReference Include="..\Ryujinx.Audio.Backends.SDL2\Ryujinx.Audio.Backends.SDL2.csproj" />
<ProjectReference Include="..\Ryujinx.Graphics.Vulkan\Ryujinx.Graphics.Vulkan.csproj" />
<ProjectReference Include="..\Ryujinx.Graphics.OpenGL\Ryujinx.Graphics.OpenGL.csproj" Condition="'$(RuntimeIdentifier)' != 'osx-x64' AND '$(RuntimeIdentifier)' != 'osx-arm64'" />
<ProjectReference Include="..\Ryujinx.Graphics.Metal\Ryujinx.Graphics.Metal.csproj" Condition="'$(RuntimeIdentifier)' != 'linux-x64' AND '$(RuntimeIdentifier)' != 'linux-arm64' AND '$(RuntimeIdentifier)' != 'win-x64'" />
<ProjectReference Include="..\Ryujinx.Graphics.OpenGL\Ryujinx.Graphics.OpenGL.csproj" />
<ProjectReference Include="..\Ryujinx.Graphics.Metal\Ryujinx.Graphics.Metal.csproj" />
<ProjectReference Include="..\Ryujinx.Input\Ryujinx.Input.csproj" />
<ProjectReference Include="..\Ryujinx.Input.SDL2\Ryujinx.Input.SDL2.csproj" />
<ProjectReference Include="..\Ryujinx.Audio.Backends.OpenAL\Ryujinx.Audio.Backends.OpenAL.csproj" />
@@ -173,4 +173,10 @@
<ItemGroup>
<Folder Include="Assets\Fonts\Mono\" />
</ItemGroup>
<ItemGroup>
<Compile Update="UI\Applet\UserSelectorDialog.axaml.cs">
<DependentUpon>UserSelectorDialog.axaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
</Project>

View File

@@ -1,17 +1,24 @@
using Avalonia.Controls;
using Avalonia.Threading;
using FluentAvalonia.UI.Controls;
using Gommon;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.Controls;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Ava.UI.ViewModels.Input;
using Ryujinx.Ava.UI.Windows;
using Ryujinx.Ava.Utilities.Configuration;
using Ryujinx.Common;
using Ryujinx.HLE;
using Ryujinx.HLE.HOS.Applets;
using Ryujinx.HLE.HOS.Applets.SoftwareKeyboard;
using Ryujinx.HLE.HOS.Services.Account.Acc;
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
using Ryujinx.HLE.UI;
using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading;
namespace Ryujinx.Ava.UI.Applet
@@ -253,5 +260,59 @@ namespace Ryujinx.Ava.UI.Applet
}
public IDynamicTextInputHandler CreateDynamicTextInputHandler() => new AvaloniaDynamicTextInputHandler(_parent);
public UserProfile ShowPlayerSelectDialog()
{
UserId selected = UserId.Null;
byte[] defaultGuestImage = EmbeddedResources.Read("Ryujinx.HLE/HOS/Services/Account/Acc/GuestUserImage.jpg");
UserProfile guest = new UserProfile(new UserId("00000000000000000000000000000080"), "Guest", defaultGuestImage);
ManualResetEvent dialogCloseEvent = new(false);
Dispatcher.UIThread.InvokeAsync(async () =>
{
ObservableCollection<BaseModel> profiles = [];
NavigationDialogHost nav = new();
_parent.AccountManager.GetAllUsers()
.OrderBy(x => x.Name)
.ForEach(profile => profiles.Add(new Models.UserProfile(profile, nav)));
profiles.Add(new Models.UserProfile(guest, nav));
UserSelectorDialogViewModel viewModel = new()
{
Profiles = profiles,
SelectedUserId = _parent.AccountManager.LastOpenedUser.UserId
};
UserSelectorDialog content = new(viewModel);
(selected, _) = await UserSelectorDialog.ShowInputDialog(content);
dialogCloseEvent.Set();
});
dialogCloseEvent.WaitOne();
UserProfile profile = _parent.AccountManager.LastOpenedUser;
if (selected == guest.UserId)
{
profile = guest;
}
else if (selected == UserId.Null)
{
profile = null;
}
else
{
foreach (UserProfile p in _parent.AccountManager.GetAllUsers())
{
if (p.UserId == selected)
{
profile = p;
break;
}
}
}
return profile;
}
}
}

View File

@@ -0,0 +1,121 @@
<UserControl
x:Class="Ryujinx.Ava.UI.Applet.UserSelectorDialog"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:helpers="clr-namespace:Ryujinx.Ava.UI.Helpers"
xmlns:models="clr-namespace:Ryujinx.Ava.UI.Models"
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
d:DesignHeight="450"
MinWidth="500"
d:DesignWidth="800"
mc:Ignorable="d"
Focusable="True"
x:DataType="viewModels:UserSelectorDialogViewModel">
<UserControl.Resources>
<helpers:BitmapArrayValueConverter x:Key="ByteImage" />
</UserControl.Resources>
<Design.DataContext>
<viewModels:UserSelectorDialogViewModel />
</Design.DataContext>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Border
CornerRadius="5"
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
BorderThickness="1">
<ListBox
MaxHeight="300"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
Background="Transparent"
ItemsSource="{Binding Profiles}"
SelectionChanged="ProfilesList_SelectionChanged">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel
HorizontalAlignment="Left"
VerticalAlignment="Center"
Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.Styles>
<Style Selector="ListBoxItem">
<Setter Property="Margin" Value="5 5 0 5" />
<Setter Property="CornerRadius" Value="5" />
</Style>
<Style Selector="Rectangle#SelectionIndicator">
<Setter Property="Opacity" Value="0" />
</Style>
</ListBox.Styles>
<ListBox.DataTemplates>
<DataTemplate
DataType="models:UserProfile">
<Grid
PointerEntered="Grid_PointerEntered"
PointerExited="Grid_OnPointerExited">
<Border
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
ClipToBounds="True"
CornerRadius="5"
Background="{Binding BackgroundColor}">
<StackPanel
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<Image
Width="96"
Height="96"
HorizontalAlignment="Stretch"
VerticalAlignment="Top"
Source="{Binding Image, Converter={StaticResource ByteImage}}" />
<TextBlock
HorizontalAlignment="Stretch"
MaxWidth="90"
Text="{Binding Name}"
TextAlignment="Center"
TextWrapping="Wrap"
TextTrimming="CharacterEllipsis"
MaxLines="2"
Margin="5" />
</StackPanel>
</Border>
</Grid>
</DataTemplate>
<DataTemplate
DataType="viewModels:BaseModel">
<Panel
Height="118"
Width="96">
<Panel.Styles>
<Style Selector="Panel">
<Setter Property="Background" Value="{DynamicResource ListBoxBackground}" />
</Style>
</Panel.Styles>
</Panel>
</DataTemplate>
</ListBox.DataTemplates>
</ListBox>
</Border>
<StackPanel
Grid.Row="1"
Margin="0 24 0 0"
HorizontalAlignment="Left"
Orientation="Horizontal"
Spacing="10">
</StackPanel>
</Grid>
</UserControl>

View File

@@ -0,0 +1,123 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using FluentAvalonia.UI.Controls;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.Controls;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Ava.UI.ViewModels.Input;
using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Services.Account.Acc;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using UserProfile = Ryujinx.Ava.UI.Models.UserProfile;
using UserProfileSft = Ryujinx.HLE.HOS.Services.Account.Acc.UserProfile;
namespace Ryujinx.Ava.UI.Applet
{
public partial class UserSelectorDialog : UserControl, INotifyPropertyChanged
{
public UserSelectorDialogViewModel ViewModel { get; set; }
public UserSelectorDialog(UserSelectorDialogViewModel viewModel)
{
InitializeComponent();
ViewModel = viewModel;
DataContext = ViewModel;
}
private void Grid_PointerEntered(object sender, PointerEventArgs e)
{
if (sender is Grid { DataContext: UserProfile profile })
{
profile.IsPointerOver = true;
}
}
private void Grid_OnPointerExited(object sender, PointerEventArgs e)
{
if (sender is Grid { DataContext: UserProfile profile })
{
profile.IsPointerOver = false;
}
}
private void ProfilesList_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (sender is ListBox listBox)
{
int selectedIndex = listBox.SelectedIndex;
if (selectedIndex >= 0 && selectedIndex < ViewModel.Profiles.Count)
{
if (ViewModel.Profiles[selectedIndex] is UserProfile userProfile)
{
ViewModel.SelectedUserId = userProfile.UserId;
Logger.Info?.Print(LogClass.UI, $"Selected user: {userProfile.UserId}");
ObservableCollection<BaseModel> newProfiles = [];
foreach (var item in ViewModel.Profiles)
{
if (item is UserProfile originalItem)
{
var profile = new UserProfileSft(originalItem.UserId, originalItem.Name, originalItem.Image);
if (profile.UserId == ViewModel.SelectedUserId)
{
profile.AccountState = AccountState.Open;
}
newProfiles.Add(new UserProfile(profile, new NavigationDialogHost()));
}
}
ViewModel.Profiles = newProfiles;
}
}
}
}
public static async Task<(UserId Id, bool Result)> ShowInputDialog(UserSelectorDialog content)
{
ContentDialog contentDialog = new()
{
Title = LocaleManager.Instance[LocaleKeys.UserProfileWindowTitle],
PrimaryButtonText = LocaleManager.Instance[LocaleKeys.Continue],
SecondaryButtonText = string.Empty,
CloseButtonText = LocaleManager.Instance[LocaleKeys.Cancel],
Content = content,
Padding = new Thickness(0)
};
UserId result = UserId.Null;
bool input = false;
void Handler(ContentDialog sender, ContentDialogClosedEventArgs eventArgs)
{
if (eventArgs.Result == ContentDialogResult.Primary)
{
if (contentDialog.Content is UserSelectorDialog view)
{
result = view.ViewModel.SelectedUserId;
input = true;
}
}
else
{
result = UserId.Null;
input = false;
}
}
contentDialog.Closed += Handler;
await ContentDialogHelper.ShowAsync(contentDialog);
return (result, input);
}
}
}

View File

@@ -0,0 +1,48 @@
using CommunityToolkit.Mvvm.Input;
using System;
using System.Threading.Tasks;
namespace Ryujinx.Ava.UI.Helpers
{
#nullable enable
public static class Commands
{
public static RelayCommand Create(Action action)
=> new(action);
public static RelayCommand CreateConditional(Action action, Func<bool> canExecute)
=> new(action, canExecute);
public static RelayCommand<T> CreateWithArg<T>(Action<T?> action)
=> new(action);
public static RelayCommand<T> CreateConditionalWithArg<T>(Action<T?> action, Predicate<T?> canExecute)
=> new(action, canExecute);
public static AsyncRelayCommand Create(Func<Task> action)
=> new(action, AsyncRelayCommandOptions.None);
public static AsyncRelayCommand CreateConcurrent(Func<Task> action)
=> new(action, AsyncRelayCommandOptions.AllowConcurrentExecutions);
public static AsyncRelayCommand CreateSilentFail(Func<Task> action)
=> new(action, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
public static AsyncRelayCommand<T> CreateWithArg<T>(Func<T?, Task> action)
=> new(action, AsyncRelayCommandOptions.None);
public static AsyncRelayCommand<T> CreateConcurrentWithArg<T>(Func<T?, Task> action)
=> new(action, AsyncRelayCommandOptions.AllowConcurrentExecutions);
public static AsyncRelayCommand<T> CreateSilentFailWithArg<T>(Func<T?, Task> action)
=> new(action, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
public static AsyncRelayCommand CreateConditional(Func<Task> action, Func<bool> canExecute)
=> new(action, canExecute, AsyncRelayCommandOptions.None);
public static AsyncRelayCommand CreateConcurrentConditional(Func<Task> action, Func<bool> canExecute)
=> new(action, canExecute, AsyncRelayCommandOptions.AllowConcurrentExecutions);
public static AsyncRelayCommand CreateSilentFailConditional(Func<Task> action, Func<bool> canExecute)
=> new(action, canExecute, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
public static AsyncRelayCommand<T> CreateConditionalWithArg<T>(Func<T?, Task> action, Predicate<T?> canExecute)
=> new(action, canExecute, AsyncRelayCommandOptions.None);
public static AsyncRelayCommand<T> CreateConcurrentConditionalWithArg<T>(Func<T?, Task> action, Predicate<T?> canExecute)
=> new(action, canExecute, AsyncRelayCommandOptions.AllowConcurrentExecutions);
public static AsyncRelayCommand<T> CreateSilentFailConditionalWithArg<T>(Func<T?, Task> action, Predicate<T?> canExecute)
=> new(action, canExecute, AsyncRelayCommandOptions.FlowExceptionsToTaskScheduler);
}
}

View File

@@ -22,5 +22,22 @@ namespace Ryujinx.Ava.UI.Models
FifoStatus = fifoStatus;
ShaderCount = shaderCount;
}
public override bool Equals(object obj)
{
if (obj is not StatusUpdatedEventArgs suea) return false;
return
VSyncMode == suea.VSyncMode &&
VolumeStatus == suea.VolumeStatus &&
DockedMode == suea.DockedMode &&
AspectRatio == suea.AspectRatio &&
GameStatus == suea.GameStatus &&
FifoStatus == suea.FifoStatus &&
ShaderCount == suea.ShaderCount;
}
public override int GetHashCode()
=> HashCode.Combine(VSyncMode, VolumeStatus, AspectRatio, DockedMode, FifoStatus, GameStatus, ShaderCount);
}
}

View File

@@ -27,7 +27,7 @@ namespace Ryujinx.Ava.UI.ViewModels
ThemeManager.ThemeChanged += ThemeManager_ThemeChanged;
}
private void ThemeManager_ThemeChanged(object sender, EventArgs e)
private void ThemeManager_ThemeChanged()
{
Dispatcher.UIThread.Post(() => UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle.Value));
}

View File

@@ -38,7 +38,6 @@ using Ryujinx.HLE.HOS.Services.Account.Acc;
using Ryujinx.HLE.HOS.Services.Nfc.AmiiboDecryption;
using Ryujinx.HLE.UI;
using Ryujinx.Input.HLE;
using Silk.NET.Vulkan;
using SkiaSharp;
using System;
using System.Collections.Generic;

View File

@@ -0,0 +1,14 @@
using CommunityToolkit.Mvvm.ComponentModel;
using Ryujinx.HLE.HOS.Services.Account.Acc;
using System.Collections.ObjectModel;
namespace Ryujinx.Ava.UI.ViewModels
{
public partial class UserSelectorDialogViewModel : BaseModel
{
[ObservableProperty] private UserId _selectedUserId;
[ObservableProperty] private ObservableCollection<BaseModel> _profiles = [];
}
}

View File

@@ -43,7 +43,13 @@ namespace Ryujinx.Ava.UI.Views.Main
PauseEmulationMenuItem.Command = new RelayCommand(() => ViewModel.AppHost?.Pause());
ResumeEmulationMenuItem.Command = new RelayCommand(() => ViewModel.AppHost?.Resume());
StopEmulationMenuItem.Command = new AsyncRelayCommand(() => ViewModel.AppHost?.ShowExitPrompt().OrCompleted());
CheatManagerMenuItem.Command = new AsyncRelayCommand(OpenCheatManagerForCurrentApp);
CheatManagerMenuItem.Command = new AsyncRelayCommand(async () =>
{
try
{
await OpenCheatManagerForCurrentApp();
} catch {}
});
InstallFileTypesMenuItem.Command = new AsyncRelayCommand(InstallFileTypes);
UninstallFileTypesMenuItem.Command = new AsyncRelayCommand(UninstallFileTypes);
XciTrimmerMenuItem.Command = new AsyncRelayCommand(() => XCITrimmerWindow.Show(ViewModel));
@@ -138,14 +144,14 @@ namespace Ryujinx.Ava.UI.Views.Main
ViewModel.LoadConfigurableHotKeys();
}
public static readonly AppletMetadata MiiApplet = new("miiEdit", 0x0100000000001009);
public AppletMetadata MiiApplet => new(ViewModel.ContentManager, "miiEdit", 0x0100000000001009);
public async Task OpenMiiApplet()
{
if (MiiApplet.CanStart(ViewModel.ContentManager, out var appData, out var nacpData))
{
await ViewModel.LoadApplication(appData, ViewModel.IsFullScreen || ViewModel.StartGamesInFullscreen, nacpData);
}
if (!MiiApplet.CanStart(out var appData, out var nacpData))
return;
await ViewModel.LoadApplication(appData, ViewModel.IsFullScreen || ViewModel.StartGamesInFullscreen, nacpData);
}
public async Task OpenCheatManagerForCurrentApp()

View File

@@ -32,6 +32,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Threading;
using System.Threading.Tasks;
@@ -136,6 +137,8 @@ namespace Ryujinx.Ava.UI.Windows
base.OnApplyTemplate(e);
NotificationHelper.SetNotificationManager(this);
Executor.ExecuteBackgroundAsync(ShowIntelMacWarningAsync);
}
private void OnScalingChanged(object sender, EventArgs e)
@@ -731,5 +734,20 @@ namespace Ryujinx.Ava.UI.Windows
(int)Symbol.Checkmark);
});
}
private static bool _intelMacWarningShown = !(OperatingSystem.IsMacOS() &&
(RuntimeInformation.OSArchitecture == Architecture.X64 ||
RuntimeInformation.OSArchitecture == Architecture.X86));
public static async Task ShowIntelMacWarningAsync()
{
if (_intelMacWarningShown) return;
await Dispatcher.UIThread.InvokeAsync(async () => await ContentDialogHelper.CreateWarningDialog(
"Intel Mac Warning",
"Intel Macs are not supported and will not work properly.\nIf you continue, do not come to our Discord asking for support;\nand do not report bugs on the GitHub. They will be closed."));
_intelMacWarningShown = true;
}
}
}

View File

@@ -54,5 +54,9 @@ namespace Ryujinx.Ava.Utilities
appControl = new BlitStruct<ApplicationControlProperty>(0);
return false;
}
public bool CanStart(out ApplicationData appData,
out BlitStruct<ApplicationControlProperty> appControl)
=> CanStart(null, out appData, out appControl);
}
}

View File

@@ -28,7 +28,9 @@ namespace Ryujinx.Ava.Utilities.Compat
public class CompatibilityCsv
{
static CompatibilityCsv()
static CompatibilityCsv() => Load();
public static void Load()
{
using Stream csvStream = Assembly.GetExecutingAssembly()
.GetManifestResourceStream("RyujinxGameCompatibilityList")!;
@@ -37,15 +39,31 @@ namespace Ryujinx.Ava.Utilities.Compat
using SepReader reader = Sep.Reader().From(csvStream);
ColumnIndices columnIndices = new(reader.Header.IndexOf);
Entries = reader
_entries = reader
.Enumerate(row => new CompatibilityEntry(ref columnIndices, row))
.OrderBy(it => it.GameName)
.ToArray();
Logger.Debug?.Print(LogClass.UI, "Compatibility CSV loaded.", "LoadCompatCsv");
Logger.Debug?.Print(LogClass.UI, "Compatibility CSV loaded.", "LoadCompatibility");
}
public static CompatibilityEntry[] Entries { get; private set; }
public static void Unload()
{
_entries = null;
}
private static CompatibilityEntry[] _entries;
public static CompatibilityEntry[] Entries
{
get
{
if (_entries == null)
Load();
return _entries;
}
}
}
public class CompatibilityEntry

View File

@@ -1,11 +1,8 @@
using Avalonia.Controls;
using Avalonia.Styling;
using FluentAvalonia.UI.Controls;
using nietras.SeparatedValues;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ava.UI.Helpers;
using System.IO;
using System.Reflection;
using System.Threading.Tasks;
namespace Ryujinx.Ava.Utilities.Compat
@@ -35,6 +32,8 @@ namespace Ryujinx.Ava.Utilities.Compat
contentDialog.Styles.Add(closeButtonParent);
await ContentDialogHelper.ShowAsync(contentDialog);
CompatibilityCsv.Unload();
}
public CompatibilityList()

View File

@@ -1,19 +1,18 @@
using CommunityToolkit.Mvvm.ComponentModel;
using ExCSS;
using Gommon;
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Ava.Utilities.AppLibrary;
using System.Collections.Generic;
using System.Linq;
namespace Ryujinx.Ava.Utilities.Compat
{
public partial class CompatibilityViewModel : ObservableObject
public class CompatibilityViewModel : BaseModel
{
[ObservableProperty] private bool _onlyShowOwnedGames = true;
private bool _onlyShowOwnedGames = true;
private IEnumerable<CompatibilityEntry> _currentEntries = CompatibilityCsv.Entries;
private readonly string[] _ownedGameTitleIds = [];
private readonly ApplicationLibrary _appLibrary;
private string[] _ownedGameTitleIds = [];
public IEnumerable<CompatibilityEntry> CurrentEntries => OnlyShowOwnedGames
? _currentEntries.Where(x =>
@@ -24,14 +23,23 @@ namespace Ryujinx.Ava.Utilities.Compat
public CompatibilityViewModel(ApplicationLibrary appLibrary)
{
_appLibrary = appLibrary;
appLibrary.ApplicationCountUpdated += (_, _)
=> _ownedGameTitleIds = appLibrary.Applications.Keys.Select(x => x.ToString("X16")).ToArray();
_ownedGameTitleIds = appLibrary.Applications.Keys.Select(x => x.ToString("X16")).ToArray();
}
PropertyChanged += (_, args) =>
public bool OnlyShowOwnedGames
{
get => _onlyShowOwnedGames;
set
{
if (args.PropertyName is nameof(OnlyShowOwnedGames))
OnPropertyChanged(nameof(CurrentEntries));
};
OnPropertyChanging();
OnPropertyChanging(nameof(CurrentEntries));
_onlyShowOwnedGames = value;
OnPropertyChanged();
OnPropertyChanged(nameof(CurrentEntries));
}
}
public void Search(string searchTerm)

View File

@@ -4,7 +4,7 @@ namespace Ryujinx.Ava.Utilities
{
public static class TitleHelper
{
public static string ActiveApplicationTitle(ProcessResult activeProcess, string applicationVersion, string pauseString = "")
public static string ActiveApplicationTitle(ProcessResult activeProcess, string applicationVersion, bool customTitlebar, string pauseString = "")
{
if (activeProcess == null)
return string.Empty;
@@ -14,7 +14,9 @@ namespace Ryujinx.Ava.Utilities
string titleIdSection = $" ({activeProcess.ProgramIdText.ToUpper()})";
string titleArchSection = activeProcess.Is64Bit ? " (64-bit)" : " (32-bit)";
string appTitle = $"Ryujinx {applicationVersion} -{titleNameSection}{titleVersionSection}{titleIdSection}{titleArchSection}";
string appTitle = customTitlebar
? $"Ryujinx {applicationVersion}\n{titleNameSection.Trim()}\n{titleVersionSection.Trim()}\n{titleIdSection.Trim()}{titleArchSection}"
: $"Ryujinx {applicationVersion} -{titleNameSection}{titleVersionSection}{titleIdSection}{titleArchSection}";
return !string.IsNullOrEmpty(pauseString)
? appTitle + $" ({pauseString})"