From bbbe12a534546be8a37b40f198e90f13d9c199d7 Mon Sep 17 00:00:00 2001 From: David Isztl Date: Sun, 5 Jul 2026 11:10:17 +0200 Subject: [PATCH] Merge branch 'PCSX2Master' --- .../macos/build-dependencies-universal.sh | 4 +- bin/resources/GameIndex.yaml | 241 ++++++++++++------ bin/resources/game_controller_db.txt | 1 + bin/resources/shaders/dx11/tfx.fx | 92 ++++--- bin/resources/shaders/vulkan/tfx.glsl | 32 ++- pcsx2-qt/QtHost.cpp | 2 +- pcsx2-qt/Translations/pcsx2-qt_en.ts | 14 +- pcsx2/Achievements.cpp | 2 +- pcsx2/DEV9/Win32/tap-win32.cpp | 6 +- pcsx2/GS/Renderers/Common/GSDevice.cpp | 117 ++++----- pcsx2/GS/Renderers/DX12/GSDevice12.cpp | 27 +- pcsx2/GS/Renderers/HW/GSRendererHW.cpp | 97 +++---- pcsx2/ShaderCacheVersion.h | 2 +- pcsx2/USB/usb-eyetoy/cam-windows.cpp | 15 +- updater/Windows/WindowsUpdater.cpp | 15 +- 15 files changed, 375 insertions(+), 292 deletions(-) diff --git a/.github/workflows/scripts/macos/build-dependencies-universal.sh b/.github/workflows/scripts/macos/build-dependencies-universal.sh index 1141dcc209..1cfc29bfd7 100755 --- a/.github/workflows/scripts/macos/build-dependencies-universal.sh +++ b/.github/workflows/scripts/macos/build-dependencies-universal.sh @@ -47,7 +47,7 @@ QT=6.11.1 QTAPNG=1.3.0 FREETYPE=2.14.3 -SDL=SDL3-3.4.10 +SDL=SDL3-3.4.12 HARFBUZZ=14.2.0 ZSTD=1.5.7 LZ4=1.10.0 @@ -93,7 +93,7 @@ b2bf6c6845ac175ed7f819145483ba4676f617aaa6a5012c8efee63c8bbac413 qtimageformats f1d3be3489f758efe1a8f12118a212febbe611aa670af32e0159fa3c1feab2a6 QtApng-$QTAPNG.tar.gz 36bc4f1cc413335368ee656c42afca65c5a3987e8768cc28cf11ba775e785a5f freetype-$FREETYPE.tar.xz -12b34280415ec8418c864408b93d008a20a6530687ee613d60bfbd20411f2785 $SDL.tar.gz +f07b958a9ac5020fb7a44cadb957f658b2149c3c8abb4f63145fac9303249db7 $SDL.tar.gz c652d5d94971031654ab3989891a490a895d3e3f2b71171c62692b28e94b1b93 harfbuzz-$HARFBUZZ.tar.gz eb33e51f49a15e023950cd7825ca74a4a2b43db8354825ac24fc1b7ee09e6fa3 zstd-$ZSTD.tar.gz 537512904744b35e232912055ccf8ec66d768639ff3abe5788d90d792ec5f48b lz4-$LZ4.tar.gz diff --git a/bin/resources/GameIndex.yaml b/bin/resources/GameIndex.yaml index 1c7e238dbe..996f599ab0 100644 --- a/bin/resources/GameIndex.yaml +++ b/bin/resources/GameIndex.yaml @@ -201,7 +201,6 @@ PAPX-90203: name-en: "Gran Turismo 2000 [Trial]" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. halfPixelOffset: 5 # Fixes edge bleed and lines. autoFlush: 1 # Fixes missing lens flare and intensity. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. @@ -228,7 +227,8 @@ PAPX-90207: name-en: "Gran Turismo 3 - A-Spec - Autobacs Gentei Replay Theater" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes edge bleed and lines. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PAPX-90208: name: "GRAN TURISMO 3 - A-Spec - リプレイシアター" @@ -236,7 +236,8 @@ PAPX-90208: name-en: "Gran Turismo 3 - A-Spec - Replay Theater" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes edge bleed and lines. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PAPX-90209: name: "GRAN TURISMO 3 - A-Spec - Netz TOYOTA - リプレイシアターディスク" @@ -244,7 +245,8 @@ PAPX-90209: name-en: "Gran Turismo 3 - A-Spec - Netz TOYOTA - Replay Theater Disc" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes edge bleed and lines. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PAPX-90210: name: "やっぱ RPGでしょ。 [オリジナルムービーディスク]" @@ -420,9 +422,8 @@ PAPX-90504: name-en: "Gran Turismo Concept - Airtrek Turbo Special Edition [Trial]" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PAPX-90505: name: "2002 夏のオススメソフト おためしDisc" @@ -449,14 +450,22 @@ PAPX-90507: name-en: "Official Demo Disc 2003" region: "NTSC-J" PAPX-90508: - name: "GRAN TURISMO 4 - LUPO CUP Training Version" - name-sort: "ぐらんつーりすも 4 るぽ かっぷ とれいにんぐ ばーじょん" - name-en: "GRAN TURISMO 4 - LUPO CUP Training Version" + name: "GRAN TURISMO Concept - LUPO CUP Training Version" + name-sort: "ぐらんつーりすも こんせぷと るぽ かっぷ とれいにんぐ ばーじょん" + name-en: "Gran Turismo Concept - LUPO CUP Training Version" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. + getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. +PAPX-90509: + name: "GRAN TURISMO Concept - LUPO CUP Training Version 2" + name-sort: "ぐらんつーりすも こんせぷと るぽ かっぷ とれいにんぐ ばーじょん 2" + name-en: "Gran Turismo Concept - LUPO CUP Training Version 2" + region: "NTSC-J" + gsHWFixes: + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PAPX-90511: name: "SIREN [体験版]" @@ -470,14 +479,12 @@ PAPX-90511: PAPX-90512: name: "GRAN TURISMO 4 - TOYOTA Prius [体験版]" name-sort: "ぐらんつーりすも 4 - とよた ぷりうす [たいけんばん]" - name-en: "GRAN TURISMO 4 - TOYOTA Prius [Trial]" + name-en: "Gran Turismo 4 - TOYOTA Prius [Trial]" region: "NTSC-J" - clampModes: - vuClampMode: 2 # Text in GT mode works. gsHWFixes: recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PAPX-90514: name: "冬のオススメソフト おためしDISC" @@ -531,6 +538,8 @@ PAPX-90523: name-sort: "ぐらんつーりすも 4 - おんらいんじっけんばーじょん" name-en: "Gran Turismo 4 - Online Test Version" region: "NTSC-J" + clampModes: + vuClampMode: 2 # Text in GT mode works. gsHWFixes: recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. @@ -680,20 +689,26 @@ PBPX-95501: PBPX-95502: name: "GRAN TURISMO 3 - A-Spec [本体同梱版]" name-sort: "ぐらんつーりすも 3 - A-Spec [ほんたいどうこんばん]" - name-en: "GRAN TURISMO 3 - A-Spec [PS2 Bundle]" + name-en: "Gran Turismo 3 - A-Spec [PS2 Bundle]" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + memcardFilters: + - "PBPX-95502" + - "SCPS-15009" PBPX-95503: name: "Gran Turismo 3 - A-Spec [PS2 Bundle]" region: "NTSC-U" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. memcardFilters: - "PBPX-95503" - "SCUS-97102" + - "SCUS-97512" PBPX-95506: name: "PlayStation 2 - Demo Disc 2001" region: "PAL-M5" @@ -752,18 +767,18 @@ PBPX-95523: region: "NTSC-J" gsHWFixes: recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. - # vuClampMode = 2 Text in GT mode works. PBPX-95524: name: "Gran Turismo 4 Prologue [PlayStation 2 Racing Pack]" region: "NTSC-C" compat: 5 gsHWFixes: recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. - # vuClampMode = 2 Text in GT mode works. PBPX-95525: name: "ファイナルファンタジーⅫ [本体同梱版]" name-sort: "ふぁいなるふぁんたじー 12 [ほんたいどうこんばん]" @@ -772,7 +787,7 @@ PBPX-95525: PBPX-95601: name: "GRAN TURISMO 4 [本体同梱版]" name-sort: "ぐらんつーりすも 4 [ほんたいどうこんばん]" - name-en: "GRAN TURISMO 4 [PS2 Bundle]" + name-en: "Gran Turismo 4 [PS2 Bundle]" region: "NTSC-J" compat: 5 clampModes: @@ -783,6 +798,7 @@ PBPX-95601: autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. memcardFilters: + - "PBPX-95502" - "SCAJ-20066" - "SCAJ-30006" - "SCAJ-30007" @@ -826,9 +842,11 @@ PCPX-96306: PCPX-96309: name: "GRAN TURISMO 3 Netz TOYOTA [Demo]" name-sort: "ぐらんつーりすも 3 ねっつ とよた [Demo]" - name-en: "GRAN TURISMO 3 Netz TOYOTA [Demo]" + name-en: "Gran Turismo 3 Netz TOYOTA [Demo]" region: "NTSC-J" gsHWFixes: + halfPixelOffset: 5 # Fixes edge bleed and lines. + autoFlush: 1 # Fixes missing lens flare and intensity. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PCPX-96310: name: "エクストリーム・レーシング SSX [体験版]" @@ -845,7 +863,8 @@ PCPX-96311: name-en: "Gran Turismo 3 Trial Disk Volume 1" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes edge bleed and lines. + autoFlush: 1 # Fixes missing lens flare and intensity. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PCPX-96312: name: "GRAN TURISMO 3 - A-Spec - [オートバックス店頭試遊ディスク]" @@ -853,7 +872,8 @@ PCPX-96312: name-en: "Gran Turismo 3 - A-Spec - Autobacs Tentou Shiyuu Disc" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes edge bleed and lines. + autoFlush: 1 # Fixes missing lens flare and intensity. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PCPX-96314: name: "スカイオデッセイ [体験版]" @@ -986,6 +1006,8 @@ PCPX-96609: name-en: "Gran Turismo 3 - A-Spec - Tentou Shiyuu Disc Vol. 2" region: "NTSC-J" gsHWFixes: + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PCPX-96610: name: "見る見る 2001年2月度受注号" @@ -1061,7 +1083,8 @@ PCPX-96624: name-en: "Gran Turismo - Concept 2001 Tokyo" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PCPX-96625: name: "プレプレ2 VOLUME.4" @@ -1109,14 +1132,13 @@ PCPX-96633: name-en: "Play-Pre 2 Volume 7 - 2003 April - CM Collection" region: "NTSC-J" PCPX-96634: - name: "GRAN TURISMO - SUBARU ドライビングシミュレーターVer." + name: "GRAN TURISMO - SUBARU ドライビングシミュレーターVersion" name-sort: "ぐらんつーりすも すばるどらいびんぐしみゅれーたーばーじょん" - name-en: "Gran Tourismo - SUBARU Driving Simulator ver." + name-en: "Gran Turismo - SUBARU Driving Simulator Version" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PCPX-96635: name: "プレプレ2 VOLUME.8" @@ -1151,7 +1173,7 @@ PCPX-96646: PCPX-96649: name: "GRAN TURISMO 4 [体験版]" name-sort: "ぐらんつーりすも 4 [たいけんばん]" - name-en: "Gran Tourismo 4 [Trial]" + name-en: "Gran Turismo 4 [Trial]" region: "NTSC-J" compat: 5 clampModes: @@ -1204,6 +1226,9 @@ PCPX-96660: clampModes: vuClampMode: 2 # Fixes SPS in TT Mode menu caused by the moving tooltips. gsHWFixes: + recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. PCPX-98017: name: "ラチェット&クランク4th ギリギリ銀河のギガバトル [体験版]" @@ -1668,9 +1693,11 @@ SCAJ-20066: compat: 5 gsHWFixes: recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. memcardFilters: + - "PBPX-95502" - "SCAJ-20066" - "SCAJ-30006" - "SCAJ-30007" @@ -2422,6 +2449,9 @@ SCAJ-20170: clampModes: vuClampMode: 2 # Fixes SPS in TT Mode menu caused by the moving tooltips. gsHWFixes: + recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCAJ-20171: name: "絶体絶命都市2 - 凍てついた記憶たち" @@ -2722,6 +2752,7 @@ SCAJ-30006: autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. memcardFilters: + - "PBPX-95502" - "SCAJ-20066" - "SCAJ-30006" - "SCAJ-30007" @@ -2756,6 +2787,7 @@ SCAJ-30008: autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. memcardFilters: + - "PBPX-95502" - "SCAJ-20066" - "SCAJ-30006" - "SCAJ-30007" @@ -3322,9 +3354,8 @@ SCED-51352: name: "Gran Turismo - Nissan Micra Edition [Demo]" region: "PAL-E" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCED-51359: name: "Official PlayStation 2 Magazine Demo 27" @@ -3891,9 +3922,9 @@ SCED-52455: region: "PAL-E" gsHWFixes: recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. - # vuClampMode = 2 Text in GT mode works. SCED-52461: name: "SingStar [Press Kit]" region: "PAL-E" @@ -4873,7 +4904,8 @@ SCES-50294: region: "PAL-M5" compat: 5 gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCES-50295: name: "Dark Cloud" @@ -5143,6 +5175,8 @@ SCES-50858: region: "PAL-M6" compat: 5 gsHWFixes: + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. memcardFilters: - "SCES-50858" @@ -5839,7 +5873,8 @@ SCES-52438: compat: 5 gsHWFixes: recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. memcardFilters: - "SCES-51719" @@ -6197,6 +6232,9 @@ SCES-53372: clampModes: vuClampMode: 2 # Fixes SPS in TT Mode menu caused by the moving tooltips. gsHWFixes: + recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCES-53397: name: "SingStar - Popworld Events Code" @@ -7444,6 +7482,8 @@ SCKA-20029: name: "Gran Turismo Concept - 2002 Tokyo-Seoul [PlayStation 2 BigHit Series]" # No listed Korean name on ReDump region: "NTSC-K" gsHWFixes: + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCKA-20030: name: "슬라이 쿠퍼 - 전설의 비법서를 찾아서 [PlayStation 2 BigHit Series]" @@ -8449,9 +8489,8 @@ SCPM-85301: name-en: "Gran Turismo Concept - Copen Special Edition [Demo]" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPM-85302: name: "みんなのGOLF オンライン" @@ -8786,8 +8825,12 @@ SCPS-15009: name-en: "Gran Turismo 3 - A-Spec" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + memcardFilters: + - "PBPX-95502" + - "SCPS-15009" SCPS-15010: name: "GRAN TURISMO Concept 2001 Tokyo" name-sort: "ぐらんつーりすも こんせぷと 2001 Tokyo" @@ -8795,7 +8838,8 @@ SCPS-15010: region: "NTSC-J" compat: 5 gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPS-15011: name: "EXTERMINATION" @@ -9135,9 +9179,11 @@ SCPS-15055: region: "NTSC-J" gsHWFixes: recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. memcardFilters: + - "PBPX-95502" - "SCAJ-20066" - "SCAJ-30006" - "SCAJ-30007" @@ -9607,6 +9653,9 @@ SCPS-15105: clampModes: vuClampMode: 2 # Fixes SPS in TT Mode menu caused by the moving tooltips. gsHWFixes: + recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPS-15106: name: "SIREN2" @@ -9773,6 +9822,7 @@ SCPS-17001: autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. memcardFilters: + - "PBPX-95502" - "SCAJ-20066" - "SCAJ-30006" - "SCAJ-30007" @@ -9800,6 +9850,7 @@ SCPS-17008: gsHWFixes: recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPS-17009: name: "NIKE/ GRAN TURISMO Limited Edition [9inch]" @@ -9809,6 +9860,7 @@ SCPS-17009: gsHWFixes: recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPS-17010: name: "NIKE/ GRAN TURISMO Limited Edition [10inch]" @@ -9818,6 +9870,7 @@ SCPS-17010: gsHWFixes: recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPS-17011: name: "NIKE/ GRAN TURISMO Limited Edition [11inch]" @@ -9827,6 +9880,7 @@ SCPS-17011: gsHWFixes: recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPS-17013: name: "ローグギャラクシー ディレクターズカット" @@ -9984,7 +10038,8 @@ SCPS-19208: name-en: "Gran Turismo - Concept 2001 Tokyo [PlayStation2 the Best]" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPS-19209: name: "ぼくのなつやすみ2 海の冒険篇 [PlayStation2 the Best]" @@ -10060,6 +10115,7 @@ SCPS-19252: autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. memcardFilters: + - "PBPX-95502" - "SCAJ-20066" - "SCAJ-30006" - "SCAJ-30007" @@ -10124,9 +10180,11 @@ SCPS-19304: region: "NTSC-J" gsHWFixes: recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. memcardFilters: + - "PBPX-95502" - "SCAJ-20066" - "SCAJ-30006" - "SCAJ-30007" @@ -10369,6 +10427,9 @@ SCPS-19324: clampModes: vuClampMode: 2 # Fixes SPS in TT Mode menu caused by the moving tooltips. gsHWFixes: + recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPS-19325: name: "サルゲッチュ ミリオンモンキーズ [PlayStation2 the Best]" @@ -10590,7 +10651,8 @@ SCPS-55005: name-en: "Gran Turismo - Concept 2001 Tokyo" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPS-55006: name: "ワイルドアームズ アドヴァンスドサード" @@ -10603,10 +10665,11 @@ SCPS-55006: SCPS-55007: name: "GRAN TURISMO 3 - A-Spec" name-sort: "ぐらんつーりすも 3 - A-Spec" - name-en: "GRAN TURISMO 3 - A-Spec" + name-en: "Gran Turismo 3 - A-Spec" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPS-55008: name: "サンダーストライカー" @@ -10939,6 +11002,8 @@ SCPS-55902: name-en: "Gran Turismo - Concept 2002 Tokyo-Geneva" region: "NTSC-J" gsHWFixes: + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPS-55903: name: "GRAN TURISMO - Concept 2002 Tokyo-Geneva" @@ -10946,6 +11011,8 @@ SCPS-55903: name-en: "Gran Turismo - Concept 2002 Tokyo-Geneva" region: "NTSC-J" gsHWFixes: + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPS-56001: name: "이코" @@ -10983,6 +11050,8 @@ SCPS-56005: name: "Gran Turismo Concept - 2002 Tokyo-Seoul" # No listed Korean name on ReDump region: "NTSC-K" gsHWFixes: + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPS-56006: name: "철권 4" @@ -11063,7 +11132,8 @@ SCPS-72001: name-en: "Gran Turismo 3 - A-Spec [MEGA HITS!]" region: "NTSC-J" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCPS-72002: name: "みんなのGOLF 3 [MEGA HITS!]" @@ -11103,7 +11173,9 @@ SCUS-90682: clampModes: vuClampMode: 2 # Text in GT mode works. gsHWFixes: + recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCUS-94346: name: "SingStar - Latino" @@ -11129,8 +11201,13 @@ SCUS-97102: region: "NTSC-U" compat: 5 gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. + memcardFilters: + - "PBPX-95503" + - "SCUS-97102" + - "SCUS-97512" SCUS-97104: name: "ATV Offroad Fury" region: "NTSC-U" @@ -11191,7 +11268,8 @@ SCUS-97115: name: "Gran Turismo 3 - A-Spec [Demo]" region: "NTSC-U" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCUS-97116: name: "Kiosk Disc 2.1" @@ -11626,7 +11704,8 @@ SCUS-97219: name: "Gran Turismo 3 - A-Spec - Nissan 350Z Edition" region: "NTSC-U" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. memcardFilters: - "SCUS-97219" @@ -11992,6 +12071,7 @@ SCUS-97328: autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. memcardFilters: # Allows car imports from GT3 or something. + - "PBPX-95503" - "SCUS-97328" - "SCUS-97436" - "SCUS-97102" @@ -12196,8 +12276,8 @@ SCUS-97384: region: "NTSC-U" gsHWFixes: recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. - halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. - autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCUS-97392: name: "NBA '06 featuring The Life Vol.1 [Demo]" @@ -12435,6 +12515,7 @@ SCUS-97436: autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. memcardFilters: + - "PBPX-95503" - "SCUS-97328" - "SCUS-97436" - "SCUS-97102" @@ -12782,6 +12863,9 @@ SCUS-97502: clampModes: vuClampMode: 2 # Fixes SPS in TT Mode menu caused by the moving tooltips. gsHWFixes: + recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCUS-97503: name: "MLB '06 - The Show [Demo]" @@ -12833,10 +12917,12 @@ SCUS-97512: name: "Gran Turismo 3 - A-Spec [Greatest Hits]" region: "NTSC-U" memcardFilters: - - "SCUS-97512" + - "PBPX-95503" - "SCUS-97102" + - "SCUS-97512" gsHWFixes: - recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. + halfPixelOffset: 5 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Partially fixes the sun occlusion and lens flare. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCUS-97513: name: "Ratchet & Clank 2 - Going Commando [Greatest Hits]" @@ -13043,7 +13129,9 @@ SCUS-97563: clampModes: vuClampMode: 2 # Text in GT mode works. gsHWFixes: + recommendedBlendingLevel: 3 # Improves banding in car showcase as well as car brightness and sheen. halfPixelOffset: 4 # Fixes weird edge shadows and depth bleed which happens on the edge as well. + autoFlush: 1 # Helps lens flare and sun occlusion somewhat but doesn't full fix it. getSkipCount: "GSC_PolyphonyDigitalGames" # Fixes post-processing. SCUS-97564: name: "Jampack Demo Disc Vol.15 [T-Rated]" @@ -18102,8 +18190,6 @@ SLES-51434: region: "PAL-M5" clampModes: vuClampMode: 2 # Fixes some lighting/shadow artefacts (most light sources like the Flashlight are unaffected). - gameFixes: - - SoftwareRendererFMVHack # Fixes blackscreen when FMV. gsHWFixes: minimumBlendingLevel: 4 # Fixes brightness menu transparancy effects and text. deinterlace: 9 # Fixes incorrect field order in FMVs. @@ -20969,6 +21055,9 @@ SLES-52584: name: "Burnout 3 - Takedown" region: "PAL-M4" compat: 5 + memcardFilters: # Used for storage of network information on the memory card. + - "SLES-52584" + - "PSCD-20001" clampModes: vuClampMode: 3 # Fixes buggy lighting in the garage. gsHWFixes: @@ -31619,8 +31708,6 @@ SLKA-25065: region: "NTSC-K" clampModes: vuClampMode: 2 # Fixes some lighting/shadow artefacts (most light sources like the Flashlight are unaffected). - gameFixes: - - SoftwareRendererFMVHack # Fixes blackscreen when FMV. gsHWFixes: minimumBlendingLevel: 4 # Fixes brightness menu transparancy effects and text. deinterlace: 9 # Fixes incorrect field order in FMVs. @@ -42896,8 +42983,6 @@ SLPM-65257: compat: 5 clampModes: vuClampMode: 2 # Fixes some lighting/shadow artefacts (most light sources like the Flashlight are unaffected). - gameFixes: - - SoftwareRendererFMVHack # Fixes blackscreen when FMV. gsHWFixes: minimumBlendingLevel: 4 # Fixes brightness menu transparancy effects and text. deinterlace: 9 # Fixes incorrect field order in FMVs. @@ -43567,6 +43652,9 @@ SLPM-65374: gsHWFixes: recommendedBlendingLevel: 5 # Alleviates color banding also the cockpit and missile shadows are darker if enabled. autoFlush: 2 # Corrects post-processing effect on jet exhausts. + memcardFilters: + - SLPM-65177 # Energy Airforce (previous title) + - SLPM-65374 # aimStrike SLPM-65375: name: "真・三國無双3 & 真・三國無双3 猛将伝 [ディスク 1] [プレミアムパック]" name-sort: "しんさんごくむそう3 & しんさんごくむそう3 もうしょうでん [でぃすく 1] [ぷれみあむぱっく]" @@ -44977,8 +45065,6 @@ SLPM-65622: region: "NTSC-J" clampModes: vuClampMode: 2 # Fixes some lighting/shadow artefacts (most light sources like the Flashlight are unaffected). - gameFixes: - - SoftwareRendererFMVHack # Fixes blackscreen when FMV. gsHWFixes: minimumBlendingLevel: 4 # Fixes brightness menu transparancy effects and text. deinterlace: 9 # Fixes incorrect field order in FMVs. @@ -47316,8 +47402,6 @@ SLPM-66018: region: "NTSC-J" clampModes: vuClampMode: 2 # Fixes some lighting/shadow artefacts (most light sources like the Flashlight are unaffected). - gameFixes: - - SoftwareRendererFMVHack # Fixes blackscreen when FMV. gsHWFixes: minimumBlendingLevel: 4 # Fixes brightness menu transparancy effects and text. deinterlace: 9 # Fixes incorrect field order in FMVs. @@ -52023,6 +52107,8 @@ SLPM-66748: gameFixes: - DMABusyHack - SoftwareRendererFMVHack # Vertical lines in FMV. + gsHWFixes: + roundSprite: 1 # Fixes misalignment of textures in the Pause Menu. SLPM-66749: name: "ウィザードリィ エクス2 ~無限の学徒~ [ワンダープライス]" name-sort: "うぃざーどりぃ えくす2 むげんのがくと [わんだーぷらいす]" @@ -53425,6 +53511,10 @@ SLPM-66994: gameFixes: - DMABusyHack - SoftwareRendererFMVHack # Vertical lines in FMV. + gsHWFixes: + roundSprite: 1 # Fixes misalignment of textures in the Pause Menu. + memcardFilters: + - SLPM-66748 # Original Version SLPM-66995: name: "beatmania Ⅱ DX 14 - Gold" name-sort: "びーとまにあ 2 DX 14 - Gold" @@ -67572,8 +67662,6 @@ SLUS-20622: compat: 5 clampModes: vuClampMode: 2 # Fixes some lighting/shadow artefacts (most light sources like the Flashlight are unaffected). - gameFixes: - - SoftwareRendererFMVHack # Fixes blackscreen when FMV. gsHWFixes: minimumBlendingLevel: 4 # Fixes brightness menu transparancy effects and text. deinterlace: 9 # Fixes incorrect field order in FMVs. @@ -70077,6 +70165,9 @@ SLUS-21050: name: "Burnout 3 - Takedown" region: "NTSC-U" compat: 5 + memcardFilters: # Used for storage of network information on the memory card. + - "SLUS-21050" + - "PSCD-10088" clampModes: vuClampMode: 3 # Fixes buggy lighting in the garage. gsHWFixes: diff --git a/bin/resources/game_controller_db.txt b/bin/resources/game_controller_db.txt index 8cbe7579a5..72ebb50015 100644 --- a/bin/resources/game_controller_db.txt +++ b/bin/resources/game_controller_db.txt @@ -1262,6 +1262,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2, 03000000c82d00001530000011010000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00001630000011010000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 03000000c82d00001730000011010000,8BitDo Ultimate C,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, +06000000c82d00000320000007010000,8BitDo Ultimate Wired Controller for Xbox,a:b0,b:b1,x:b2,y:b3,back:b6,guide:b8,start:b7,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Linux, 03000000c82d00000121000011010000,8BitDo Xbox One SN30 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000c82d00000121000000010000,8BitDo Xbox One SN30 Pro,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux, 05000000a00500003232000001000000,8BitDo Zero,a:b0,b:b1,back:b10,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b11,x:b3,y:b4,platform:Linux, diff --git a/bin/resources/shaders/dx11/tfx.fx b/bin/resources/shaders/dx11/tfx.fx index 0c0d4a291a..80962b378c 100644 --- a/bin/resources/shaders/dx11/tfx.fx +++ b/bin/resources/shaders/dx11/tfx.fx @@ -192,7 +192,7 @@ struct PS_INPUT #ifdef PIXEL_SHADER -struct PS_OUTPUT_REAL +struct PS_OUTPUT { #define NUM_RTS 0 @@ -231,20 +231,6 @@ struct PS_OUTPUT_REAL #undef NUM_RTS }; -struct PS_OUTPUT -{ -#if !PS_NO_COLOR - #if PS_DATE == 1 || PS_DATE == 2 - float c; - #else - float4 c0; - #if !PS_NO_COLOR1 - float4 c1; - #endif - #endif -#endif -}; - Texture2D Texture : register(t0); Texture2D Palette : register(t1); #if !PS_ROV_COLOR @@ -1326,13 +1312,17 @@ void ps_blend(inout float4 Color, inout float4 As_rgba, float2 pos_xy) #endif #if PS_ROV_COLOR || PS_ROV_DEPTH -#define DISCARD rov_discard = true + #define DISCARD { rov_discard_color = true; rov_discard_depth = true; } + #define DISCARD_COLOR rov_discard_color = true + #define DISCARD_DEPTH rov_discard_depth = true #else -#define DISCARD discard + #define DISCARD discard + #define DISCARD_COLOR o_col0 = RtLoad(input.p.xy) + #define DISCARD_DEPTH input.p.z = DepthLoad(input.p.xy) #endif #if (PS_RETURN_COLOR || PS_RETURN_DEPTH) -PS_OUTPUT_REAL ps_main(PS_INPUT input) +PS_OUTPUT ps_main(PS_INPUT input) #else void ps_main(PS_INPUT input) #endif @@ -1351,7 +1341,8 @@ void ps_main(PS_INPUT input) #endif #if PS_ROV_COLOR || PS_ROV_DEPTH - bool rov_discard = false; + bool rov_discard_color = false; + bool rov_discard_depth = false; #endif // Use ROV discard macro for since we cannot do @@ -1458,19 +1449,29 @@ if (bad) discard; #endif - PS_OUTPUT output; + // Output values +#if !PS_NO_COLOR + #if PS_DATE == 1 || PS_DATE == 2 + float o_col0; + #else + float4 o_col0; + #if !PS_NO_COLOR1 + float4 o_col1; + #endif + #endif +#endif // Get first primitive that will write a failling alpha value #if PS_DATE == 1 // DATM == 0 // Pixel with alpha equal to 1 will failed (128-255) - output.c = (C.a > 127.5f) ? float(input.primid) : float(0x7FFFFFFF); + o_col0 = (C.a > 127.5f) ? float(input.primid) : float(0x7FFFFFFF); #elif PS_DATE == 2 // DATM == 1 // Pixel with alpha equal to 0 will failed (0-127) - output.c = (C.a < 127.5f) ? float(input.primid) : float(0x7FFFFFFF); + o_col0 = (C.a < 127.5f) ? float(input.primid) : float(0x7FFFFFFF); #else // Not primid DATE setup @@ -1547,26 +1548,26 @@ if (bad) // Output color scaling #if !PS_NO_COLOR - output.c0.a = PS_RTA_CORRECTION ? C.a / 128.0f : C.a / 255.0f; - output.c0.rgb = PS_COLCLIP_HW ? float3(C.rgb / 65535.0f) : C.rgb / 255.0f; + o_col0.a = PS_RTA_CORRECTION ? C.a / 128.0f : C.a / 255.0f; + o_col0.rgb = PS_COLCLIP_HW ? float3(C.rgb / 65535.0f) : C.rgb / 255.0f; #if !PS_NO_COLOR1 - output.c1 = alpha_blend; + o_col1 = alpha_blend; #endif #endif // !PS_NO_COLOR // Alpha test with feedback #if PS_AFAIL == AFAIL_FB_ONLY if (!atst_pass) - input.p.z = DepthLoad(input.p.xy); + DISCARD_DEPTH; #elif PS_AFAIL == AFAIL_ZB_ONLY if (!atst_pass) - output.c0 = RtLoad(input.p.xy); + DISCARD_COLOR; #elif PS_AFAIL == AFAIL_RGB_ONLY || PS_AFAIL == AFAIL_RGB_ONLY_SW_Z if (!atst_pass) { - output.c0.a = RtLoad(input.p.xy).a; + o_col0.a = RtLoad(input.p.xy).a; // discard alpha #if PS_AFAIL == AFAIL_RGB_ONLY_SW_Z - input.p.z = DepthLoad(input.p.xy); + DISCARD_DEPTH; #endif } #endif @@ -1579,46 +1580,39 @@ if (bad) #if PS_AA1 == PS_AA1_TRIANGLE_SW_Z if (!bool(input.interior)) - input.p.z = DepthLoad(input.p.xy); // No depth update for triangle edges. + DISCARD_DEPTH; // No depth update for triangle edges. #endif #if (PS_RETURN_COLOR || PS_RETURN_DEPTH) - // Output struct with the actual system values output semantics. - PS_OUTPUT_REAL output_real; + PS_OUTPUT output; #endif // Color write back #if PS_RETURN_COLOR - #if PS_DATE == 1 || PS_DATE == 2 - output_real.c = output.c; - #else - output_real.c0 = output.c0; - #if !PS_NO_COLOR1 - output_real.c1 = output.c1; - #endif + output.c0 = o_col0; + #if !PS_NO_COLOR1 + output.c1 = o_col1; #endif #elif PS_RETURN_COLOR_ROV - output.c0 = (rov_discard | (FbMask == 0xFFu)) ? RtLoad(input.p.xy) : output.c0; - - RtWrite(input.p.xy, output.c0); + o_col0 = (FbMask == 0xFFu) ? RtLoad(input.p.xy) : o_col0; // channel masking + if (!rov_discard_color) + RtWrite(input.p.xy, o_col0); #endif // Depth write back #if PS_RETURN_DEPTH - output_real.depth = input.p.z; + output.depth = input.p.z; #if SW_DEPTH && PS_NO_COLOR1 && PS_DEPTH_FEEDBACK_SUPPORT == 2 // Output color clone for feedback. - output_real.depth_color = input.p.z; + output.depth_color = input.p.z; #endif #elif PS_RETURN_DEPTH_ROV - #if SW_DEPTH - input.p.z = rov_discard ? DepthLoad(input.p.xy) : input.p.z; - #endif - DepthWrite(input.p.xy, input.p.z); + if (!rov_discard_depth) + DepthWrite(input.p.xy, input.p.z); #endif #if (PS_RETURN_COLOR || PS_RETURN_DEPTH) - return output_real; + return output; #endif } diff --git a/bin/resources/shaders/vulkan/tfx.glsl b/bin/resources/shaders/vulkan/tfx.glsl index dba4f71e71..a1adbb2d91 100644 --- a/bin/resources/shaders/vulkan/tfx.glsl +++ b/bin/resources/shaders/vulkan/tfx.glsl @@ -1720,9 +1720,13 @@ layout(early_fragment_tests) in; #endif #if PS_ROV_COLOR || PS_ROV_DEPTH -#define DISCARD rov_discard = true + #define DISCARD { rov_discard_color = true; rov_discard_depth = true; } + #define DISCARD_COLOR rov_discard_color = true + #define DISCARD_DEPTH rov_discard_depth = true #else -#define DISCARD discard + #define DISCARD discard + #define DISCARD_COLOR o_col0 = sample_from_rt() + #define DISCARD_DEPTH input_z = sample_from_depth() #endif void main() @@ -1747,7 +1751,8 @@ void main() #endif #if PS_ROV_COLOR || PS_ROV_DEPTH - bool rov_discard = gl_HelperInvocation; + bool rov_discard_color = gl_HelperInvocation; + bool rov_discard_depth = gl_HelperInvocation; #endif #if PS_ZTST == ZTST_GEQUAL @@ -1940,16 +1945,16 @@ void main() // Alpha test with feedback #if PS_AFAIL == AFAIL_FB_ONLY if (!atst_pass) - input_z = sample_from_depth(); + DISCARD_DEPTH; #elif PS_AFAIL == AFAIL_ZB_ONLY if (!atst_pass) - o_col0 = sample_from_rt(); + DISCARD_COLOR; #elif (PS_AFAIL == AFAIL_RGB_ONLY || PS_AFAIL == AFAIL_RGB_ONLY_SW_Z) if (!atst_pass) { - o_col0.a = sample_from_rt().a; + o_col0.a = sample_from_rt().a; // discard alpha #if PS_AFAIL == AFAIL_RGB_ONLY_SW_Z - input_z = sample_from_depth(); + DISCARD_DEPTH; #endif } #endif @@ -1961,24 +1966,23 @@ void main() #if PS_AA1 == PS_AA1_TRIANGLE_SW_Z if (!bool(vsIn.interior)) - input_z = sample_from_depth(); // No depth update for triangle edges. + DISCARD_DEPTH; // No depth update for triangle edges. #endif // Writing back color (result already written to o_col0 for non-ROV) #if PS_RETURN_COLOR_ROV - bvec4 discard_channels = bvec4(uvec4(rov_discard) | uvec4(equal(FbMask, uvec4(0xFFu)))); - o_col0 = mix(o_col0, sample_from_rt(), discard_channels); + o_col0 = mix(o_col0, sample_from_rt(), equal(FbMask, uvec4(0xFFu))); // channel masking - imageStore(RtImageRov, ivec2(gl_FragCoord.xy), o_col0); + if (!rov_discard_color) + imageStore(RtImageRov, ivec2(gl_FragCoord.xy), o_col0); #endif // Writing back depth #if PS_RETURN_DEPTH gl_FragDepth = input_z; #elif PS_RETURN_DEPTH_ROV - input_z = rov_discard ? sample_from_depth() : input_z; - - imageStore(DepthImageRov, ivec2(gl_FragCoord.xy), vec4(input_z, 0, 0, 1.0f)); + if (!rov_discard_depth) + imageStore(DepthImageRov, ivec2(gl_FragCoord.xy), vec4(input_z, 0, 0, 1.0f)); #endif #if PS_ROV_COLOR || PS_ROV_DEPTH diff --git a/pcsx2-qt/QtHost.cpp b/pcsx2-qt/QtHost.cpp index a97cd2a1a7..183b4fd6a1 100644 --- a/pcsx2-qt/QtHost.cpp +++ b/pcsx2-qt/QtHost.cpp @@ -1146,7 +1146,7 @@ void Host::OnAchievementsLoginRequested(Achievements::LoginRequestReason reason) void Host::OnAchievementsLoginSuccess(const char* username, u32 points, u32 sc_points, u32 unread_messages) { const QString message = - qApp->translate("QtHost", "RA: Logged in as %1 (%2 pts, softcore: %3 pts). %4 unread messages.") + qApp->translate("QtHost", "RA: Logged in as %1 (%2 pts, Casual: %3 pts). %4 unread messages.") .arg(QString::fromUtf8(username)) .arg(points) .arg(sc_points) diff --git a/pcsx2-qt/Translations/pcsx2-qt_en.ts b/pcsx2-qt/Translations/pcsx2-qt_en.ts index e6952bb5ab..19c1ae75cc 100644 --- a/pcsx2-qt/Translations/pcsx2-qt_en.ts +++ b/pcsx2-qt/Translations/pcsx2-qt_en.ts @@ -707,12 +707,6 @@ Login token generated on %2. Hardcore mode is now disabled. - - - Score: {0} pts (softcore: {1} pts) -Unread messages: {2} - - Confirm Hardcore Mode @@ -924,6 +918,12 @@ Leaderboard Position: {1} of {2} Rank + + + Score: {0} pts (Casual: {1} pts) +Unread messages: {2} + + Missable @@ -22586,7 +22586,7 @@ Ejecting {2} and replacing it with {3}. - RA: Logged in as %1 (%2 pts, softcore: %3 pts). %4 unread messages. + RA: Logged in as %1 (%2 pts, Casual: %3 pts). %4 unread messages. diff --git a/pcsx2/Achievements.cpp b/pcsx2/Achievements.cpp index fc9e165b58..09d7ccf56a 100644 --- a/pcsx2/Achievements.cpp +++ b/pcsx2/Achievements.cpp @@ -1915,7 +1915,7 @@ void Achievements::ShowLoginSuccess(const rc_client_t* client) //: Summary for login notification. std::string title = user->display_name; - std::string summary = fmt::format(TRANSLATE_FS("Achievements", "Score: {0} pts (softcore: {1} pts)\nUnread messages: {2}"), user->score, + std::string summary = fmt::format(TRANSLATE_FS("Achievements", "Score: {0} pts (Casual: {1} pts)\nUnread messages: {2}"), user->score, user->score_softcore, user->num_unread_messages); MTGS::RunOnGSThread([title = std::move(title), summary = std::move(summary), badge_path = std::move(badge_path)]() { diff --git a/pcsx2/DEV9/Win32/tap-win32.cpp b/pcsx2/DEV9/Win32/tap-win32.cpp index 908cd66d31..a91063b1f4 100644 --- a/pcsx2/DEV9/Win32/tap-win32.cpp +++ b/pcsx2/DEV9/Win32/tap-win32.cpp @@ -376,9 +376,11 @@ bool TAPGetWin32Adapter(const std::string& name, PIP_ADAPTER_ADDRESSES adapter, HRESULT cohr = CoInitializeEx(nullptr, COINIT_MULTITHREADED); if (cohr == RPC_E_CHANGED_MODE) cohr = CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); - if (!SUCCEEDED(cohr)) + if (FAILED(cohr)) return false; + wil::unique_couninitialize_call uninit; + PIP_ADAPTER_ADDRESSES bridgeAdapter = nullptr; //Create Instance of INetCfg @@ -472,8 +474,6 @@ bool TAPGetWin32Adapter(const std::string& name, PIP_ADAPTER_ADDRESSES adapter, } } - CoUninitialize(); - if (bridgeAdapter != nullptr) { *adapter = *bridgeAdapter; diff --git a/pcsx2/GS/Renderers/Common/GSDevice.cpp b/pcsx2/GS/Renderers/Common/GSDevice.cpp index 68dea1d177..c7f54d0791 100644 --- a/pcsx2/GS/Renderers/Common/GSDevice.cpp +++ b/pcsx2/GS/Renderers/Common/GSDevice.cpp @@ -502,68 +502,67 @@ void GSDevice::UpdateImGuiTextures() case ImTextureStatus_Destroyed: continue; case ImTextureStatus_WantCreate: - { - GSTexture* gs_tex = g_gs_device->CreateTexture(im_tex->Width, im_tex->Height, 1, GSTexture::Format::Color); - if (!gs_tex) - pxFailRel("Failed to create ImGui texture"); - - im_tex->SetTexID(reinterpret_cast(gs_tex->GetNativeHandle())); - im_tex->BackendUserData = gs_tex; - [[fallthrough]]; - } - case ImTextureStatus_WantUpdates: - { - // If we fell through from WantCreate, then we are uploading the full size - // Otherwise, we are just updating the specified region - // clange-format off - const int upload_x = (im_tex->Status == ImTextureStatus_WantCreate) ? 0 : im_tex->UpdateRect.x; - const int upload_y = (im_tex->Status == ImTextureStatus_WantCreate) ? 0 : im_tex->UpdateRect.y; - const int upload_w = (im_tex->Status == ImTextureStatus_WantCreate) ? im_tex->Width : im_tex->UpdateRect.w; - const int upload_h = (im_tex->Status == ImTextureStatus_WantCreate) ? im_tex->Height : im_tex->UpdateRect.h; - const int upload_pitch = upload_w * im_tex->BytesPerPixel; - // clange-format on - - const GSVector4i rect{ - upload_x, - upload_y, - upload_x + upload_w, - upload_y + upload_h, - }; - - GSTexture* gs_tex = static_cast(im_tex->BackendUserData); - GSTexture::GSMap map; - if (gs_tex->Map(map, &rect)) + if (GSTexture* gs_tex = g_gs_device->CreateTexture(im_tex->Width, im_tex->Height, 1, GSTexture::Format::Color)) { - for (int y = 0; y < upload_h; y++) - std::memcpy(map.bits + map.pitch * y, im_tex->GetPixelsAt(rect.x, rect.y + y), upload_pitch); - - gs_tex->Unmap(); + im_tex->SetTexID(reinterpret_cast(gs_tex->GetNativeHandle())); + im_tex->BackendUserData = gs_tex; } else { - for (int y = 0; y < upload_h; y++) - gs_tex->Update({rect.left, rect.top + y, rect.right, rect.top + y + 1}, - im_tex->GetPixelsAt(rect.x, rect.y + y), upload_pitch); - } - - im_tex->Status = ImTextureStatus_OK; - break; - } - case ImTextureStatus_WantDestroy: - { - GSTexture* gs_tex = static_cast(im_tex->BackendUserData); - if (gs_tex == nullptr) + pxFailRel("Failed to create ImGui texture"); break; + } + [[fallthrough]]; + case ImTextureStatus_WantUpdates: + if (GSTexture* gs_tex = static_cast(im_tex->BackendUserData)) + { + // If we fell through from WantCreate, then we are uploading the full size + // Otherwise, we are just updating the specified region + // clange-format off + const int upload_x = (im_tex->Status == ImTextureStatus_WantCreate) ? 0 : im_tex->UpdateRect.x; + const int upload_y = (im_tex->Status == ImTextureStatus_WantCreate) ? 0 : im_tex->UpdateRect.y; + const int upload_w = (im_tex->Status == ImTextureStatus_WantCreate) ? im_tex->Width : im_tex->UpdateRect.w; + const int upload_h = (im_tex->Status == ImTextureStatus_WantCreate) ? im_tex->Height : im_tex->UpdateRect.h; + const int upload_pitch = upload_w * im_tex->BytesPerPixel; + // clange-format on - // While it's unlikely we're going to reuse the same size as imgui for rendering, - // imgui may request a new atlas of the same size if old font sizes are evicted. - Recycle(gs_tex); + const GSVector4i rect{ + upload_x, + upload_y, + upload_x + upload_w, + upload_y + upload_h, + }; - im_tex->SetTexID(ImTextureID_Invalid); - im_tex->BackendUserData = nullptr; - im_tex->Status = ImTextureStatus_Destroyed; + GSTexture::GSMap map; + if (gs_tex->Map(map, &rect)) + { + for (int y = 0; y < upload_h; y++) + std::memcpy(map.bits + map.pitch * y, im_tex->GetPixelsAt(rect.x, rect.y + y), upload_pitch); + + gs_tex->Unmap(); + } + else + { + for (int y = 0; y < upload_h; y++) + gs_tex->Update({rect.left, rect.top + y, rect.right, rect.top + y + 1}, + im_tex->GetPixelsAt(rect.x, rect.y + y), upload_pitch); + } + + im_tex->Status = ImTextureStatus_OK; + } + break; + case ImTextureStatus_WantDestroy: + if (GSTexture* gs_tex = static_cast(im_tex->BackendUserData)) + { + // While it's unlikely we're going to reuse the same size as imgui for rendering, + // imgui may request a new atlas of the same size if old font sizes are evicted. + Recycle(gs_tex); + + im_tex->SetTexID(ImTextureID_Invalid); + im_tex->BackendUserData = nullptr; + im_tex->Status = ImTextureStatus_Destroyed; + } break; - } default: pxAssert(false); break; @@ -1113,10 +1112,12 @@ void GSDevice::BeginDSAsRT(GSTexture* ds, const GSVector4i& drawarea) // Create a temporary RT and copy the area needed for the draw. const int w = ds->GetWidth(); const int h = ds->GetHeight(); - m_ds_as_rt = g_gs_device->CreateFeedbackTarget(w, h, GSTexture::Format::DepthColor, false, true); - const GSVector4 dRect(drawarea); - const GSVector4 sRect(dRect.x / w, dRect.y / h, dRect.z / w, dRect.w / h); - StretchRectAuto(ds, sRect, m_ds_as_rt, dRect, Nearest); + if (m_ds_as_rt = g_gs_device->CreateFeedbackTarget(w, h, GSTexture::Format::DepthColor, false, true)) + { + const GSVector4 dRect(drawarea); + const GSVector4 sRect(dRect.x / w, dRect.y / h, dRect.z / w, dRect.w / h); + StretchRectAuto(ds, sRect, m_ds_as_rt, dRect, Nearest); + } } void GSDevice::EndDSAsRT() diff --git a/pcsx2/GS/Renderers/DX12/GSDevice12.cpp b/pcsx2/GS/Renderers/DX12/GSDevice12.cpp index eb7fcc285c..965dc82026 100644 --- a/pcsx2/GS/Renderers/DX12/GSDevice12.cpp +++ b/pcsx2/GS/Renderers/DX12/GSDevice12.cpp @@ -4529,22 +4529,19 @@ void GSDevice12::RenderHW(GSHWDrawConfig& config) (draw_ds && static_cast(draw_ds)->GetSRVDescriptor() == m_tfx_textures[0]))) PSSetShaderResource(TEXTURE_TEXTURE, nullptr, false); - if (InRenderPass() && (m_current_render_target == draw_rt || m_current_depth_target == draw_ds)) + // Avoid restarting the render pass just to switch from rt+depth to rt and vice versa. + // Keep the depth even if doing colclip hw draws, because the next draw will probably re-enable depth. + if (InRenderPass() && !(draw_rt || draw_rt_rov) && draw_ds && m_current_render_target && config.tex != m_current_render_target && + m_current_render_target->GetSize() == draw_ds->GetSize()) { - // avoid restarting the render pass just to switch from rt+depth to rt and vice versa - // keep the depth even if doing colclip hw draws, because the next draw will probably re-enable depth - if (!(draw_rt || draw_rt_rov) && m_current_render_target && config.tex != m_current_render_target && - draw_ds && m_current_render_target->GetSize() == draw_ds->GetSize()) - { - draw_rt = m_current_render_target; - m_pipeline_selector.rt = true; - } - else if (!(draw_ds || draw_ds_rov) && m_current_depth_target && config.tex != m_current_depth_target && - draw_rt && m_current_depth_target->GetSize() == draw_rt->GetSize()) - { - draw_ds = m_current_depth_target; - m_pipeline_selector.ds = true; - } + draw_rt = m_current_render_target; + m_pipeline_selector.rt = true; + } + else if (InRenderPass() && !(draw_ds || draw_ds_rov) && draw_rt && m_current_depth_target && config.tex != m_current_depth_target && + m_current_depth_target->GetSize() == draw_rt->GetSize()) + { + draw_ds = m_current_depth_target; + m_pipeline_selector.ds = true; } GSTexture12* draw_ds_as_rt = static_cast(m_ds_as_rt); diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index 02eb203edd..4ab585cbed 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -7533,7 +7533,11 @@ __fi void GSRendererHW::GetForcedROVUsage(bool& rov_color, bool& rov_depth) // Separate flag for DATE since they are many methods and the interaction with ROV is not clear. const bool date = m_cached_ctx.TEST.DATE; - if (rov_color && (m_conf.ps.HasShaderDiscard() || m_conf.ps.HasDepthOutput() || date)) + // Alpha test might require depth feedback once we configure ROV. + const bool atst_needs_depth = m_cached_ctx.TEST.ATE && + (m_cached_ctx.TEST.AFAIL == AFAIL_FB_ONLY || m_cached_ctx.TEST.AFAIL == AFAIL_RGB_ONLY); + + if (rov_color && (m_conf.ps.HasShaderDiscard() || m_conf.ps.HasDepthOutput() || date || atst_needs_depth)) { GL_INS("ROV: Color ROV with shader discard/depth write forces depth ROV"); rov_depth = true; @@ -7798,60 +7802,61 @@ void GSRendererHW::ConvertTextureTypeROVSingle(GSTextureCache::Target* tgt, bool GSTexture* old_tex = depth ? m_conf.ds : m_conf.rt; - GSTexture::Usage usage = shader_write ? GSTexture::ShaderWriteTarget : GSTexture::FeedbackTarget; - GSTexture* new_tex = depth ? + const GSTexture::Usage usage = shader_write ? GSTexture::ShaderWriteTarget : GSTexture::FeedbackTarget; + if (GSTexture* new_tex = depth ? (shader_write ? g_gs_device->FetchSurface(usage, old_tex->GetSize(), 1, GSTexture::Format::DepthColor, false, true) : g_gs_device->CreateDepthStencil(old_tex->GetSize(), false, true)) : - g_gs_device->FetchSurface(usage, old_tex->GetSize(), 1, GSTexture::Format::Color, false, true); - - switch (old_tex->GetState()) + g_gs_device->FetchSurface(usage, old_tex->GetSize(), 1, GSTexture::Format::Color, false, true)) { - case GSTexture::State::Cleared: - if (depth) - g_gs_device->ClearDepth(new_tex, old_tex->GetClearDepth()); - else - g_gs_device->ClearRenderTarget(new_tex, old_tex->GetClearColor()); - break; - case GSTexture::State::Invalidated: - g_gs_device->InvalidateRenderTarget(new_tex); - break; - case GSTexture::State::Dirty: - g_gs_device->StretchRectAuto(old_tex, new_tex, Nearest); + switch (old_tex->GetState()) + { + case GSTexture::State::Cleared: + if (depth) + g_gs_device->ClearDepth(new_tex, old_tex->GetClearDepth()); + else + g_gs_device->ClearRenderTarget(new_tex, old_tex->GetClearColor()); + break; + case GSTexture::State::Invalidated: + g_gs_device->InvalidateRenderTarget(new_tex); + break; + case GSTexture::State::Dirty: + g_gs_device->StretchRectAuto(old_tex, new_tex, Nearest); - // Count stats as part of both standard and ROV. - g_perfmon.Put(GSPerfMon::TextureCopiesROV, 1.0); - g_perfmon.Put(GSPerfMon::DrawCallsROV, 1.0); - break; - default: - pxAssert(false); - break; - } + // Count stats as part of both standard and ROV. + g_perfmon.Put(GSPerfMon::TextureCopiesROV, 1.0); + g_perfmon.Put(GSPerfMon::DrawCallsROV, 1.0); + break; + default: + pxAssert(false); + break; + } #if PCSX2_DEVBUILD - new_tex->SetDebugName(tgt->m_texture->GetDebugName()); + new_tex->SetDebugName(tgt->m_texture->GetDebugName()); #endif - if (tgt->m_texture == old_tex) - { - GL_CACHE("HW: Replaced texture for %s @ 0x%04x", depth ? "DS" : "RT", tgt->m_TEX0.TBP0); - tgt->m_texture = new_tex; - } - else - { - // Must be the temporary Z. - pxAssert(depth && g_texture_cache->GetTemporaryZ() == old_tex); - GL_CACHE("HW: Replaced texture for temporary Z @ 0x%04x", g_texture_cache->GetTemporaryZInfo().ZBP); - g_texture_cache->SetTemporaryZ(new_tex); - } + if (tgt->m_texture == old_tex) + { + GL_CACHE("HW: Replaced texture for %s @ 0x%04x", depth ? "DS" : "RT", tgt->m_TEX0.TBP0); + tgt->m_texture = new_tex; + } + else + { + // Must be the temporary Z. + pxAssert(depth && g_texture_cache->GetTemporaryZ() == old_tex); + GL_CACHE("HW: Replaced texture for temporary Z @ 0x%04x", g_texture_cache->GetTemporaryZInfo().ZBP); + g_texture_cache->SetTemporaryZ(new_tex); + } - // Fixup the backend config. - if (depth) - m_conf.ds = new_tex; - else - m_conf.rt = new_tex; + // Fixup the backend config. + if (depth) + m_conf.ds = new_tex; + else + m_conf.rt = new_tex; - g_gs_device->Recycle(old_tex); + g_gs_device->Recycle(old_tex); + } } void GSRendererHW::ConvertTextureTypeROV(GSTextureCache::Target* rt, GSTextureCache::Target* ds) @@ -10500,9 +10505,7 @@ bool GSRendererHW::OI_BlitFMV(GSTextureCache::Target* _rt, GSTextureCache::Sourc r_texture.w -= offset; const int new_height = std::max(r_texture.w, th); - GSTexture* temp_tex = g_gs_device->CreateTexture(tw, new_height, 1, tex->m_texture->GetFormat(), true); - - if (temp_tex) + if (GSTexture* temp_tex = g_gs_device->CreateTexture(tw, new_height, 1, tex->m_texture->GetFormat(), true)) { if (GSTexture* rt = g_gs_device->CreateFeedbackTarget(tw, new_height, GSTexture::Format::Color)) { diff --git a/pcsx2/ShaderCacheVersion.h b/pcsx2/ShaderCacheVersion.h index 9be77e89ab..f767c68783 100644 --- a/pcsx2/ShaderCacheVersion.h +++ b/pcsx2/ShaderCacheVersion.h @@ -3,4 +3,4 @@ /// Version number for GS and other shaders. Increment whenever any of the contents of the /// shaders change, to invalidate the cache. -static constexpr u32 SHADER_CACHE_VERSION = 105; // Last changed in PR 14465 +static constexpr u32 SHADER_CACHE_VERSION = 106; // Last changed in PR 14643 diff --git a/pcsx2/USB/usb-eyetoy/cam-windows.cpp b/pcsx2/USB/usb-eyetoy/cam-windows.cpp index e9b306058f..6d24fc3d12 100644 --- a/pcsx2/USB/usb-eyetoy/cam-windows.cpp +++ b/pcsx2/USB/usb-eyetoy/cam-windows.cpp @@ -13,6 +13,7 @@ #include "USB/USB.h" #include +#include #ifdef __clang__ #pragma clang diagnostic push @@ -57,16 +58,15 @@ namespace usb_eyetoy { std::vector> devList; - ICreateDevEnum* pCreateDevEnum = nullptr; - HRESULT hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pCreateDevEnum)); - if (FAILED(hr)) + wil::com_ptr_nothrow pCreateDevEnum = wil::CoCreateInstanceNoThrow(CLSID_SystemDeviceEnum); + if (!pCreateDevEnum) { Console.Warning("Camera: Error Creating Device Enumerator"); return devList; } wil::com_ptr_nothrow pEnum; - hr = pCreateDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnum, 0); + HRESULT hr = pCreateDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnum, 0); if (hr != S_OK) { Console.Warning("Camera: You have no video capture hardware"); @@ -97,8 +97,6 @@ namespace usb_eyetoy } } - CoUninitialize(); - return devList; } @@ -136,9 +134,8 @@ namespace usb_eyetoy } // enumerate all video capture devices - ICreateDevEnum* pCreateDevEnum = nullptr; - hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pCreateDevEnum)); - if (FAILED(hr)) + wil::com_ptr_nothrow pCreateDevEnum = wil::CoCreateInstanceNoThrow(CLSID_SystemDeviceEnum); + if (!pCreateDevEnum) { Console.Warning("Camera: Error Creating Device Enumerator"); return -1; diff --git a/updater/Windows/WindowsUpdater.cpp b/updater/Windows/WindowsUpdater.cpp index ad4a8027e2..d78b94c985 100644 --- a/updater/Windows/WindowsUpdater.cpp +++ b/updater/Windows/WindowsUpdater.cpp @@ -6,7 +6,6 @@ #include "common/FileSystem.h" #include "common/Console.h" -#include "common/ScopedGuard.h" #include "common/StringUtil.h" #include "common/ProgressCallback.h" #include "common/RedtapeWilCom.h" @@ -18,6 +17,7 @@ #include #include +#include #include #pragma comment(lib, "synchronization.lib") @@ -76,7 +76,7 @@ private: wil::com_ptr_nothrow m_taskbar_list; int m_last_progress_percent = -1; - bool m_com_initialized = false; + wil::unique_couninitialize_call m_com_initialized{false}; static inline const UINT s_uTBBC = RegisterWindowMessageW(L"TaskbarButtonCreated"); static constexpr UINT WMAPP_SETTASKBARPROGRESS = WM_USER+0; @@ -192,7 +192,7 @@ bool Win32ProgressCallback::Create() class_registered = true; } - m_com_initialized = SUCCEEDED(CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED)); + m_com_initialized = wil::CoInitializeEx_failfast(COINIT_APARTMENTTHREADED); m_window_hwnd = CreateWindowExW(WS_EX_CLIENTEDGE, CLASS_NAME, L"Win32ProgressCallback", WS_OVERLAPPEDWINDOW & ~WS_MAXIMIZEBOX, CW_USEDEFAULT, @@ -222,8 +222,7 @@ void Win32ProgressCallback::Destroy() m_progress_hwnd = {}; } - if (m_com_initialized) - CoUninitialize(); + m_com_initialized.reset(); } void Win32ProgressCallback::PumpMessages() @@ -420,11 +419,7 @@ int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi { Win32ProgressCallback progress; - const bool com_initialized = SUCCEEDED(CoInitializeEx(nullptr, COINIT_MULTITHREADED)); - const ScopedGuard com_guard = [com_initialized]() { - if (com_initialized) - CoUninitialize(); - }; + wil::unique_couninitialize_call uninit = wil::CoInitializeEx_failfast(COINIT_MULTITHREADED); int argc = 0; wil::unique_hlocal_ptr argv(CommandLineToArgvW(GetCommandLineW(), &argc));