Compare commits

...

49 Commits

Author SHA1 Message Date
Ty
e4af1c4244 [ci-skip] 2.4 Release 2025-06-29 15:47:12 -04:00
JordanTheToaster
7c26ac5578 GameDB: Various fixes 2025-06-29 21:07:07 +02:00
JordanTheToaster
2948d50b0d GameDB: Shadow Hearts fixes 2025-06-29 10:32:13 +02:00
lightningterror
48fefddcb2 GS/HW: Fix -Wunused-variable warnings. 2025-06-29 10:17:57 +02:00
lightningterror
f4d8af2f0d GS/GL: Don't re enable blend after SetupDATE.
Redundant calls, blending will be enabled if needed.
2025-06-29 10:17:57 +02:00
lightningterror
afa3108623 GS/DX11: Adjust blend/depth stencil state.
OMSetDepthStencilState:
If state is nullptr, new state is also nullptr but stencil ref changes no need to set a new OMSetDepthStencilState.

OMSetBlendState:
If state is nullptr, new state is also nullptr but blend factor changes no need to set a new OMSetBlendState.
2025-06-29 10:17:57 +02:00
lightningterror
6fcfddf19a GS/GL/DX11: Resolve potential rtv/srv conflict for primid date.
primid_texture texture was already bound to rtv, so we either need to unbind it first from rtv, or we can bind it to srv after rtv bind has been changed.

Note: DX11 is fine since gpu state will be updated when DrawIndexedPrimitive is executed but it's nice to keep code parity and visual a visual state
what the pipeline order should do.
2025-06-29 10:17:57 +02:00
lightningterror
6d2f442cbd GS/DX11: Backports the avoid framebuffer optimization from GL.
Unlike OpenGL, we don't need to worry about adding extra barriers here
since we already do fb copies so rt tex won't be bound as an rtv and srv
at the same time, we also check for conflicts beforehand.
2025-06-29 10:17:57 +02:00
PCSX2 Bot
e8260e7191 [ci skip] Qt: Update Base Translation. 2025-06-28 20:04:49 -04:00
Ty
48a4367a2c New translations pcsx2-qt_en.ts (Spanish, Latin America)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
edd3540f34 New translations pcsx2-qt_en.ts (Guarani)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
111c32c5ed New translations pcsx2-qt_en.ts (Quechua)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
af22ca3ae0 New translations pcsx2-qt_en.ts (Hindi)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
5e2caa326c New translations pcsx2-qt_en.ts (Latvian)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
50f9f60341 New translations pcsx2-qt_en.ts (Croatian)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
65f61b143a New translations pcsx2-qt_en.ts (Persian)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
10f4892b7e New translations pcsx2-qt_en.ts (Indonesian)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
f71d518f75 New translations pcsx2-qt_en.ts (Portuguese, Brazilian)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
c5b11fe484 New translations pcsx2-qt_en.ts (Vietnamese)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
068fd04f15 New translations pcsx2-qt_en.ts (Chinese Traditional)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
a461750b55 New translations pcsx2-qt_en.ts (Chinese Simplified)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
291df6a0e4 New translations pcsx2-qt_en.ts (Ukrainian)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
8afeb4ea61 New translations pcsx2-qt_en.ts (Turkish)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
b30f246900 New translations pcsx2-qt_en.ts (Swedish)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
7fd042b197 New translations pcsx2-qt_en.ts (Serbian (Cyrillic))
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
b6b3e364f2 New translations pcsx2-qt_en.ts (Russian)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
70e5f18971 New translations pcsx2-qt_en.ts (Portuguese)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
1fb35593d5 New translations pcsx2-qt_en.ts (Polish)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
b1b9c32644 New translations pcsx2-qt_en.ts (Norwegian)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
8eeed7d42c New translations pcsx2-qt_en.ts (Dutch)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
584493d945 New translations pcsx2-qt_en.ts (Lithuanian)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
da8e551e77 New translations pcsx2-qt_en.ts (Korean)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
a717930d5a New translations pcsx2-qt_en.ts (Georgian)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
abc000f614 New translations pcsx2-qt_en.ts (Japanese)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
cd51f1def3 New translations pcsx2-qt_en.ts (Italian)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
f5573cf0ab New translations pcsx2-qt_en.ts (Hungarian)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
1d036a4897 New translations pcsx2-qt_en.ts (Hebrew)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
f9eced6244 New translations pcsx2-qt_en.ts (Finnish)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
90a7253c66 New translations pcsx2-qt_en.ts (Greek)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
31e065f83a New translations pcsx2-qt_en.ts (German)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
571f443339 New translations pcsx2-qt_en.ts (Danish)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
4a4157919c New translations pcsx2-qt_en.ts (Czech)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
e73aa0e81b New translations pcsx2-qt_en.ts (Catalan)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
2343246315 New translations pcsx2-qt_en.ts (Bulgarian)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
e5f41ce175 New translations pcsx2-qt_en.ts (Arabic)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
8184f2eaa9 New translations pcsx2-qt_en.ts (Afrikaans)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
e0bb465945 New translations pcsx2-qt_en.ts (Spanish)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
55749a63eb New translations pcsx2-qt_en.ts (French)
[ci skip]
2025-06-28 13:31:32 -04:00
Ty
aa1b8db3ea New translations pcsx2-qt_en.ts (Romanian)
[ci skip]
2025-06-28 13:31:32 -04:00
46 changed files with 173377 additions and 132232 deletions

View File

@@ -20736,6 +20736,9 @@ SLES-52676:
SLES-52678:
name: "Viewtiful Joe"
region: "PAL-M5"
gsHWFixes:
halfPixelOffset: 5 # Fixes post processing alignment.
nativeScaling: 2 # Aligns post processing.
SLES-52680:
name: "Intellivision Lives - The History of Video Gaming"
region: "PAL-E"
@@ -22974,6 +22977,9 @@ SLES-53452:
SLES-53457:
name: "Evil Dead - Regeneration"
region: "PAL-E"
gsHWFixes:
halfPixelOffset: 5 # Fixes post processing alignment.
nativeScaling: 1 # Aligns post processing.
SLES-53458:
name: "Shin Megami Tensei - Digital Devil Saga"
region: "PAL-E"
@@ -26239,20 +26245,35 @@ SLES-54448:
name: "World Series of Poker - Tournament of Champions"
region: "PAL-E"
SLES-54449:
name: "Chicken Little - Ace in Action"
name: "Disney's Chicken Little - Ace in Action"
region: "PAL-E"
gsHWFixes:
halfPixelOffset: 5 # Fixes post processing alignment.
nativeScaling: 1 # Aligns post processing.
SLES-54450:
name: "Chicken Little - Aventures Intergalactiques"
name: "Disney Chicken Little - Aventures Intergalactiques"
region: "PAL-F"
gsHWFixes:
halfPixelOffset: 5 # Fixes post processing alignment.
nativeScaling: 1 # Aligns post processing.
SLES-54451:
name: "Himmel und Huhn - Ace in Action"
name: "Disneys Himmel und Huhn - Ace in Action"
region: "PAL-G"
gsHWFixes:
halfPixelOffset: 5 # Fixes post processing alignment.
nativeScaling: 1 # Aligns post processing.
SLES-54452:
name: "Disney Chicken Little - As en Acción"
region: "PAL-S"
gsHWFixes:
halfPixelOffset: 5 # Fixes post processing alignment.
nativeScaling: 1 # Aligns post processing.
SLES-54453:
name: "Chicken Little - Asso Spaziale!"
name: "Disney Chicken Little - Asso Spaziale!"
region: "PAL-I"
gsHWFixes:
halfPixelOffset: 5 # Fixes post processing alignment.
nativeScaling: 1 # Aligns post processing.
SLES-54454:
name: "Disgaea 2 - Cursed Memories"
region: "PAL-E"
@@ -27042,7 +27063,8 @@ SLES-54711:
region: "PAL-E"
compat: 5
gsHWFixes:
roundSprite: 2 # Fixes font artifacts and reduces text box artifacts.
halfPixelOffset: 5 # Fixes shadow positioning.
nativeScaling: 2 # Aligns post processing and bloom.
SLES-54712:
name: "Action Man A.T.O.M. - Alpha Teens on Machines"
region: "PAL-PL"
@@ -30129,14 +30151,16 @@ SLES-82030:
name: "Shadow Hearts - Covenant [Disc 1 of 2]"
region: "PAL-M3"
gsHWFixes:
halfPixelOffset: 4 # Fixes shadow positioning.
halfPixelOffset: 5 # Fixes shadow positioning.
autoFlush: 2 # Makes the shadow monsters appear.
nativeScaling: 2 # Aligns post processing and bloom.
SLES-82031:
name: "Shadow Hearts - Covenant [Disc 2 of 2]"
region: "PAL-M3"
gsHWFixes:
halfPixelOffset: 4 # Fixes shadow positioning.
halfPixelOffset: 5 # Fixes shadow positioning.
autoFlush: 2 # Makes the shadow monsters appear.
nativeScaling: 2 # Aligns post processing and bloom.
memcardFilters:
- "SLES-82030"
SLES-82032:
@@ -31394,8 +31418,12 @@ SLKA-25219:
gsHWFixes:
maximumBlendingLevel: 0 # Fixes unnecessary load on the GPU.
SLKA-25220:
name: "Viewtiful Joe - A New Hope"
name: "뷰티플 죠 새로운 희망"
name-en: "Viewtiful Joe - A New Hope"
region: "NTSC-K"
gsHWFixes:
halfPixelOffset: 5 # Fixes post processing alignment.
nativeScaling: 2 # Aligns post processing.
SLKA-25221:
name: "Busin 0 - Wizardry Alternative Neo"
region: "NTSC-K"
@@ -31768,8 +31796,12 @@ SLKA-25305:
name: "Taito Memories - Gekan"
region: "NTSC-K"
SLKA-25306:
name: "Evil Dead - Regeneration"
name: "이블데드 - 리제너레이션"
name-en: "Evil Dead - Regeneration"
region: "NTSC-K"
gsHWFixes:
halfPixelOffset: 5 # Fixes post processing alignment.
nativeScaling: 1 # Aligns post processing.
SLKA-25307:
name: "Dragon Ball Z - Sparking!"
region: "NTSC-K"
@@ -32439,8 +32471,12 @@ SLKA-25451:
name: "WWE SmackDown! vs. Raw 2008"
region: "NTSC-K"
SLKA-25452:
name: "Viewtiful Joe - A New Hope"
name: "뷰티플 죠 새로운 희망"
name-en: "Viewtiful Joe - A New Hope [BigHit Series]"
region: "NTSC-K"
gsHWFixes:
halfPixelOffset: 5 # Fixes post processing alignment.
nativeScaling: 2 # Aligns post processing.
SLKA-25453:
name: "Shin Onimusha - Dawn of Dreams [Disc 1 of 2]"
region: "NTSC-K"
@@ -34651,8 +34687,9 @@ SLPM-60214:
name-en: "Shadow Hearts II [Trial]"
region: "NTSC-J"
gsHWFixes:
halfPixelOffset: 4 # Fixes shadow positioning.
halfPixelOffset: 5 # Fixes shadow positioning.
autoFlush: 2 # Makes the shadow monsters appear.
nativeScaling: 2 # Aligns post processing and bloom.
SLPM-60215:
name: "電撃PS2 / 電撃PlayStation D63"
name-sort: "でんげき PS2 でんげきPlayStation D63"
@@ -34685,8 +34722,9 @@ SLPM-60219:
name-en: "Shadow Hearts II [Appendix Version]"
region: "NTSC-J"
gsHWFixes:
halfPixelOffset: 4 # Fixes shadow positioning.
halfPixelOffset: 5 # Fixes shadow positioning.
autoFlush: 2 # Makes the shadow monsters appear.
nativeScaling: 2 # Aligns post processing and bloom.
SLPM-60220:
name: "はじめの一歩2 VICTORIOUS ROAD [体験版]"
name-sort: "はじめのいっぽ2 VICTORIOUS ROAD [たいけんばん]"
@@ -34703,8 +34741,9 @@ SLPM-60226:
name-en: "Shadow Hearts II [Trial]"
region: "NTSC-J"
gsHWFixes:
halfPixelOffset: 4 # Fixes shadow positioning.
halfPixelOffset: 5 # Fixes shadow positioning.
autoFlush: 2 # Makes the shadow monsters appear.
nativeScaling: 2 # Aligns post processing and bloom.
SLPM-60228:
name: "街道バトル2 CHAIN REACTION [体験版]"
name-sort: "かいどうばとる2 CHAIN REACTION [たいけんばん]"
@@ -34884,6 +34923,9 @@ SLPM-60264:
name-sort: "しゃどうはーつ ふろむ・ざ・にゅー・わーるど [たいけんばん]"
name-en: "Shadow Hearts - From the New World [Trial]"
region: "NTSC-J"
gsHWFixes:
halfPixelOffset: 5 # Fixes shadow positioning.
nativeScaling: 2 # Aligns post processing and bloom.
SLPM-60265:
name: "スチームボーイ [体験版]"
name-sort: "すちーむぼーい [たいけんばん]"
@@ -43943,6 +43985,9 @@ SLPM-65699:
name-en: "Viewtiful Joe - Aratanaru Kibo"
region: "NTSC-J"
compat: 5
gsHWFixes:
halfPixelOffset: 5 # Fixes post processing alignment.
nativeScaling: 2 # Aligns post processing.
SLPM-65700:
name: "剣豪3"
name-sort: "けんごう3"
@@ -46100,7 +46145,8 @@ SLPM-66070:
name-en: "Shadow Hearts - From the New World [PREMIUM BOX]"
region: "NTSC-J"
gsHWFixes:
roundSprite: 2 # Fixes font artifacts and reduces text box artifacts.
halfPixelOffset: 5 # Fixes shadow positioning.
nativeScaling: 2 # Aligns post processing and bloom.
SLPM-66071:
name: "シャドウハーツ フロム・ザ・ニュー・ワールド"
name-sort: "しゃどうはーつ ふろむ・ざ・にゅー・わーるど"
@@ -46108,7 +46154,8 @@ SLPM-66071:
region: "NTSC-J"
compat: 5
gsHWFixes:
roundSprite: 2 # Fixes font artifacts and reduces text box artifacts.
halfPixelOffset: 5 # Fixes shadow positioning.
nativeScaling: 2 # Aligns post processing and bloom.
SLPM-66072:
name: "ファイトナイト ラウンド2"
name-sort: "ふぁいとないと らうんど2"
@@ -57617,16 +57664,18 @@ SLPS-25317:
name-en: "Shadow Hearts II [Deluxe Pack] [Disc 1 of 2]"
region: "NTSC-J"
gsHWFixes:
halfPixelOffset: 4 # Fixes shadow positioning.
halfPixelOffset: 5 # Fixes shadow positioning.
autoFlush: 2 # Makes the shadow monsters appear.
nativeScaling: 2 # Aligns post processing and bloom.
SLPS-25318:
name: "シャドウハーツⅡ [DXパック] [ディスク2/2]"
name-sort: "しゃどうはーつ2 [DXぱっく] [でぃすく2/2]"
name-en: "Shadow Hearts II [Deluxe Pack] [Disc 2 of 2]"
region: "NTSC-J"
gsHWFixes:
halfPixelOffset: 4 # Fixes shadow positioning.
halfPixelOffset: 5 # Fixes shadow positioning.
autoFlush: 2 # Makes the shadow monsters appear.
nativeScaling: 2 # Aligns post processing and bloom.
memcardFilters:
- "SLPS-25317"
SLPS-25319:
@@ -57704,16 +57753,18 @@ SLPS-25334:
name-en: "Shadow Hearts II [Standard Edition] [Disc 1 of 2]"
region: "NTSC-J"
gsHWFixes:
halfPixelOffset: 4 # Fixes shadow positioning.
halfPixelOffset: 5 # Fixes shadow positioning.
autoFlush: 2 # Makes the shadow monsters appear.
nativeScaling: 2 # Aligns post processing and bloom.
SLPS-25335:
name: "シャドウハーツⅡ [通常版] [ディスク2/2]"
name-sort: "しゃどうはーつ2 [つうじょうばん] [でぃすく2/2]"
name-en: "Shadow Hearts II [Standard Edition] [Disc 2 of 2]"
region: "NTSC-J"
gsHWFixes:
halfPixelOffset: 4 # Fixes shadow positioning.
halfPixelOffset: 5 # Fixes shadow positioning.
autoFlush: 2 # Makes the shadow monsters appear.
nativeScaling: 2 # Aligns post processing and bloom.
memcardFilters:
- "SLPS-25334"
SLPS-25336:
@@ -61980,16 +62031,18 @@ SLPS-73214:
name-en: "Shadow Hearts II [Director's Cut] [PlayStation2 the Best] [Disc 1 of 2]"
region: "NTSC-J"
gsHWFixes:
halfPixelOffset: 4 # Fixes shadow positioning.
halfPixelOffset: 5 # Fixes shadow positioning.
autoFlush: 2 # Makes the shadow monsters appear.
nativeScaling: 2 # Aligns post processing and bloom.
SLPS-73215:
name: "シャドウハーツⅡ ディレクターズカット [PlayStation2 the Best] [ディスク2/2]"
name-sort: "しゃどうはーつ2 でぃれくたーずかっと [PlayStation2 the Best] [でぃすく2/2]"
name-en: "Shadow Hearts II [Director's Cut] [PlayStation2 the Best] [Disc 2 of 2]"
region: "NTSC-J"
gsHWFixes:
halfPixelOffset: 4 # Fixes shadow positioning.
halfPixelOffset: 5 # Fixes shadow positioning.
autoFlush: 2 # Makes the shadow monsters appear.
nativeScaling: 2 # Aligns post processing and bloom.
memcardFilters:
- "SLPS-73214"
SLPS-73216:
@@ -67469,6 +67522,9 @@ SLUS-20951:
name: "Viewtiful Joe"
region: "NTSC-U"
compat: 5
gsHWFixes:
halfPixelOffset: 5 # Fixes post processing alignment.
nativeScaling: 2 # Aligns post processing.
SLUS-20952:
name: "Tak 2 - The Staff of Dreams"
region: "NTSC-U"
@@ -68077,8 +68133,9 @@ SLUS-21041:
region: "NTSC-U"
compat: 5
gsHWFixes:
halfPixelOffset: 4 # Fixes shadow positioning.
halfPixelOffset: 5 # Fixes shadow positioning.
autoFlush: 2 # Makes the shadow monsters appear.
nativeScaling: 2 # Aligns post processing and bloom.
SLUS-21042:
name: "Darkwatch"
region: "NTSC-U"
@@ -68094,8 +68151,9 @@ SLUS-21044:
region: "NTSC-U"
compat: 5
gsHWFixes:
halfPixelOffset: 4 # Fixes shadow positioning.
halfPixelOffset: 5 # Fixes shadow positioning.
autoFlush: 2 # Makes the shadow monsters appear.
nativeScaling: 2 # Aligns post processing and bloom.
memcardFilters:
- "SLUS-21041"
SLUS-21045:
@@ -68116,6 +68174,9 @@ SLUS-21048:
name: "Evil Dead - Regeneration"
region: "NTSC-U"
compat: 5
gsHWFixes:
halfPixelOffset: 5 # Fixes post processing alignment.
nativeScaling: 1 # Aligns post processing.
SLUS-21049:
name: "Outlaw Volleyball Remixed"
region: "NTSC-U"
@@ -69921,7 +69982,8 @@ SLUS-21326:
region: "NTSC-U"
compat: 5
gsHWFixes:
roundSprite: 2 # Fixes font artifacts and reduces text box artifacts.
halfPixelOffset: 5 # Fixes shadow positioning.
nativeScaling: 2 # Aligns post processing and bloom.
SLUS-21327:
name: "Atelier Iris 2 - The Azoth of Destiny"
region: "NTSC-U"
@@ -70595,6 +70657,9 @@ SLUS-21419:
SLUS-21420:
name: "Disney's Chicken Little - Ace in Action"
region: "NTSC-U"
gsHWFixes:
halfPixelOffset: 5 # Fixes post processing alignment.
nativeScaling: 1 # Aligns post processing.
SLUS-21421:
name: "Spy Hunter - Nowhere to Run"
region: "NTSC-U"

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -551,9 +551,18 @@ void GSDevice11::Destroy()
m_rs.reset();
if (m_state.rt_view)
{
m_state.rt_view->Release();
m_state.rt_view = nullptr;
}
m_state.cached_rt_view = nullptr;
if (m_state.dsv)
{
m_state.dsv->Release();
m_state.dsv = nullptr;
}
m_state.cached_dsv = nullptr;
m_shader_cache.Close();
@@ -950,11 +959,13 @@ GSDevice::PresentResult GSDevice11::BeginPresent(bool frame_skip)
m_state.rt_view->Release();
m_state.rt_view = m_swap_chain_rtv.get();
m_state.rt_view->AddRef();
m_state.cached_rt_view = nullptr;
if (m_state.dsv)
{
m_state.dsv->Release();
m_state.dsv = nullptr;
}
m_state.cached_dsv = nullptr;
g_perfmon.Put(GSPerfMon::RenderPasses, 1);
@@ -2432,7 +2443,7 @@ void GSDevice11::PSUnbindConflictingSRVs(GSTexture* tex1, GSTexture* tex2)
void GSDevice11::OMSetDepthStencilState(ID3D11DepthStencilState* dss, u8 sref)
{
if (m_state.dss != dss || m_state.sref != sref)
if (m_state.dss != dss || (dss && m_state.sref != sref))
{
m_state.dss = dss;
m_state.sref = sref;
@@ -2443,7 +2454,7 @@ void GSDevice11::OMSetDepthStencilState(ID3D11DepthStencilState* dss, u8 sref)
void GSDevice11::OMSetBlendState(ID3D11BlendState* bs, u8 bf)
{
if (m_state.bs != bs || m_state.bf != bf)
if (m_state.bs != bs || (bs && m_state.bf != bf))
{
m_state.bs = bs;
m_state.bf = bf;
@@ -2480,6 +2491,7 @@ void GSDevice11::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector
if (rtv)
rtv->AddRef();
m_state.rt_view = rtv;
m_state.cached_rt_view = rt;
}
if (m_state.dsv != dsv)
{
@@ -2488,6 +2500,7 @@ void GSDevice11::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector
if (dsv)
dsv->AddRef();
m_state.dsv = dsv;
m_state.cached_dsv = ds;
}
if (changed)
m_ctx->OMSetRenderTargets(1, &rtv, dsv);
@@ -2728,11 +2741,31 @@ void GSDevice11::RenderHW(GSHWDrawConfig& config)
config.ps.date = 3;
config.alpha_second_pass.ps.date = 3;
SetupPS(config.ps, nullptr, config.sampler);
PSSetShaderResource(3, primid_texture);
}
// Avoid changing framebuffer just to switch from rt+depth to rt and vice versa.
GSTexture* draw_rt = colclip_rt ? colclip_rt : config.rt;
GSTexture* draw_ds = config.ds;
// Make sure no tex is bound as both rtv and srv at the same time.
// All conflicts should've been taken care of by PSUnbindConflictingSRVs.
// It is fine to do the optimiation when on slot 0 tex is fb, tex is ds, and slot 2 sw blend as they are copies bound to srv.
if (!draw_rt && draw_ds && m_state.rt_view && m_state.cached_rt_view && m_state.rt_view == *(GSTexture11*)m_state.cached_rt_view &&
m_state.cached_dsv == draw_ds && config.tex != m_state.cached_rt_view && m_state.cached_rt_view->GetSize() == draw_ds->GetSize())
{
draw_rt = m_state.cached_rt_view;
}
else if (!draw_ds && draw_rt && m_state.dsv && m_state.cached_dsv && m_state.dsv == *(GSTexture11*)m_state.cached_dsv &&
m_state.cached_rt_view == draw_rt && config.tex != m_state.cached_dsv && m_state.cached_dsv->GetSize() == draw_rt->GetSize())
{
draw_ds = m_state.cached_dsv;
}
OMSetRenderTargets(draw_rt, draw_ds, &config.scissor);
if (primid_texture)
PSSetShaderResource(3, primid_texture);
SetupOM(config.depth, OMBlendSelector(config.colormask, config.blend), config.blend.constant);
OMSetRenderTargets(colclip_rt ? colclip_rt : config.rt, config.ds, &config.scissor);
DrawIndexedPrimitive();
if (config.blend_multi_pass.enable)

View File

@@ -159,6 +159,8 @@ private:
u8 bf;
ID3D11RenderTargetView* rt_view;
ID3D11DepthStencilView* dsv;
GSTexture* cached_rt_view;
GSTexture* cached_dsv;
} m_state;
std::array<std::array<wil::com_ptr_nothrow<ID3D11Query>, 3>, NUM_TIMESTAMP_QUERIES> m_timestamp_queries = {};

View File

@@ -2360,7 +2360,6 @@ void GSRendererHW::Draw()
const u32 fm_mask = GSLocalMemory::m_psm[m_cached_ctx.FRAME.PSM].fmsk;
// Note required to compute TryAlphaTest below. So do it now.
const GSDrawingEnvironment& env = *m_draw_env;
const GSLocalMemory::psm_t& tex_psm = GSLocalMemory::m_psm[m_cached_ctx.TEX0.PSM];
if (PRIM->TME && tex_psm.pal > 0)
{
@@ -3694,8 +3693,6 @@ void GSRendererHW::Draw()
// Size here should match whichever is biggest, since that's probably what's going to happen with it further down.
const int new_height = std::min(2048, std::max(t_size.y, static_cast<int>(vertical_size))) * ds->m_scale;
const int new_width = std::min(2048, std::max(t_size.x, static_cast<int>(horizontal_size))) * ds->m_scale;
const int height_diff = new_height - (ds->m_unscaled_size.y * ds->m_scale);
const int width_diff = new_width - (ds->m_unscaled_size.x * ds->m_scale);
if (GSTexture* tex = g_gs_device->CreateDepthStencil(new_width, new_height, GSTexture::Format::DepthStencil, true))
{

View File

@@ -1911,7 +1911,7 @@ void GSDeviceOGL::SetupDATE(GSTexture* rt, GSTexture* ds, const GSVertexPT1* ver
OMSetRenderTargets(nullptr, ds, &GLState::scissor);
{
const GLint clear_color = 0;
constexpr GLint clear_color = 0;
glClearBufferiv(GL_STENCIL, 0, &clear_color);
}
m_convert.ps[SetDATMShader(datm)].Bind();
@@ -1919,10 +1919,8 @@ void GSDeviceOGL::SetupDATE(GSTexture* rt, GSTexture* ds, const GSVertexPT1* ver
// om
OMSetDepthStencilState(m_date.dss);
if (GLState::blend)
{
glDisable(GL_BLEND);
}
OMSetBlendState(false);
OMSetColorMaskState();
// ia
@@ -1930,18 +1928,12 @@ void GSDeviceOGL::SetupDATE(GSTexture* rt, GSTexture* ds, const GSVertexPT1* ver
IASetVertexBuffer(vertices, 4);
IASetPrimitiveTopology(GL_TRIANGLE_STRIP);
// Texture
PSSetShaderResource(0, rt);
PSSetSamplerState(m_convert.pt);
DrawPrimitive();
if (GLState::blend)
{
glEnable(GL_BLEND);
}
}
void GSDeviceOGL::IASetVAO(GLuint vao)
@@ -2628,7 +2620,6 @@ void GSDeviceOGL::RenderHW(GSHWDrawConfig& config)
psel.ps.date = 3;
config.alpha_second_pass.ps.date = 3;
SetupPipeline(psel);
PSSetShaderResource(3, primid_texture);
}
if (config.blend.IsEffective(config.colormask))
@@ -2658,6 +2649,10 @@ void GSDeviceOGL::RenderHW(GSHWDrawConfig& config)
}
OMSetRenderTargets(draw_rt, draw_ds, &config.scissor);
if (primid_texture)
PSSetShaderResource(3, primid_texture);
OMSetColorMaskState(config.colormask);
SetupOM(config.depth);