Compare commits

...

6 Commits

Author SHA1 Message Date
KamFretoZ
0f09b8df77 BPM: GPU CLUT to FSUI 2025-03-26 10:54:55 -04:00
PCSX2 Bot
23c495b939 [ci skip] Qt: Update Base Translation. 2025-03-25 18:14:23 +01:00
PCSX2 Bot
2ac0420903 [ci skip] PAD: Update to latest controller database. 2025-03-25 18:14:06 +01:00
TellowKrinkle
aae070f826 GS:MTL: Avoid WC memory on Ryzen hackintoshes 2025-03-25 11:38:24 -04:00
chaoticgd
6ad825d1e0 Debugger: Fix Visual Studio filters 2025-03-24 20:00:35 -05:00
TellowKrinkle
7910506b3c GS:HW: Avoid using blend + fbfetch for AFAIL RGB_ONLY 2025-03-22 15:47:37 -05:00
11 changed files with 199 additions and 129 deletions

View File

@@ -610,6 +610,7 @@
03000000921200004547000000000000,Retro Bit Sega Genesis Controller Adapter,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,lefttrigger:b7,rightshoulder:b5,righttrigger:b2,start:b6,x:b3,y:b4,platform:Windows,
03000000790000001100000000000000,Retro Controller,a:b1,b:b2,back:b8,dpdown:+a4,dpleft:-a3,dpright:+a3,dpup:-a4,leftshoulder:b6,lefttrigger:b7,rightshoulder:b4,righttrigger:b5,start:b9,x:b0,y:b3,platform:Windows,
03000000830500006020000000000000,Retro Controller,a:b0,b:b1,back:b6,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b8,righttrigger:b9,start:b7,x:b2,y:b3,platform:Windows,
03000000632500007805000000000000,Retro Fighters Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
0300000003040000c197000000000000,Retrode Adapter,a:b0,b:b4,back:b2,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b3,x:b1,y:b5,platform:Windows,
03000000bd12000013d0000000000000,Retrolink Sega Saturn Classic Controller,a:b0,b:b1,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b5,lefttrigger:b6,rightshoulder:b2,righttrigger:b7,start:b8,x:b3,y:b4,platform:Windows,
03000000bd12000015d0000000000000,Retrolink SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Windows,
@@ -757,8 +758,8 @@
03000000ff1100004133000000000000,USB Controller,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a4,righty:a2,start:b9,x:b3,y:b0,platform:Windows,
03000000632500002305000000000000,USB Vibration Joystick,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b3,y:b0,platform:Windows,
03000000882800000305000000000000,V5 Game Pad,a:b0,b:b1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b7,rightx:a2,righty:a3,x:b2,y:b3,platform:Windows,
03000000790000001a18000000000000,Venom,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000790000001b18000000000000,Venom Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,x:b0,y:b3,platform:Windows,
03000000790000001a18000000000000,Venom PS4 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Windows,
03000000790000001b18000000000000,Venom PS4 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows,
030000006f0e00000302000000000000,Victrix PS4 Pro Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
030000006f0e00000702000000000000,Victrix PS4 Pro Fightstick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,touchpad:b13,x:b0,y:b3,platform:Windows,
0300000034120000adbe000000000000,vJoy Device,a:b0,b:b1,back:b15,dpdown:b6,dpleft:b7,dpright:b8,dpup:b5,guide:b16,leftshoulder:b9,leftstick:b13,lefttrigger:b11,leftx:a0,lefty:a1,rightshoulder:b10,rightstick:b14,righttrigger:b12,rightx:a3,righty:a4,start:b4,x:b2,y:b3,platform:Windows,
@@ -1288,7 +1289,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000451300000010000010010000,Genius Maxfire Grandias 12,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux,
190000004b4800000010000000010000,GO-Advance Controller,a:b1,b:b0,back:b10,dpdown:b7,dpleft:b8,dpright:b9,dpup:b6,leftshoulder:b4,lefttrigger:b12,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:b13,start:b15,x:b2,y:b3,platform:Linux,
190000004b4800000010000001010000,GO-Advance Controller,a:b1,b:b0,back:b12,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,leftshoulder:b4,leftstick:b13,lefttrigger:b14,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b16,righttrigger:b15,start:b17,x:b2,y:b3,platform:Linux,
190000004b4800000011000000010000,GO-Super Controller,a:b1,b:b0,back:b12,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b16,leftshoulder:b4,leftstick:b14,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b15,righttrigger:b7,rightx:a2,righty:a3,start:b13,x:b2,y:b3,platform:Linux,
190000004b4800000011000000010000,GO-Super Gamepad,a:b0,b:b1,back:b12,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b16,leftshoulder:b4,leftstick:b14,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b15,righttrigger:b7,rightx:a2,righty:a3,start:b13,x:b3,y:b2,platform:Linux,
03000000f0250000c183000010010000,Goodbetterbest Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000d11800000094000011010000,Google Stadia Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
05000000d11800000094000000010000,Google Stadia Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a4,rightx:a2,righty:a3,start:b7,x:b2,y:b3,platform:Linux,
@@ -1425,6 +1426,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
030000005e040000d102000003020000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000dd02000003020000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000ea02000008040000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000ea0200000f050000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
060000005e040000120b000009050000,Microsoft Xbox One,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,misc1:b11,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000e302000003020000,Microsoft Xbox One Elite,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
030000005e040000000b000007040000,Microsoft Xbox One Elite 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,paddle1:b12,paddle2:b14,paddle3:b13,paddle4:b15,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux,
@@ -1718,6 +1720,8 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000100800000300000010010000,USB Gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,
03000000790000000600000007010000,USB gamepad,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a3,righty:a4,start:b9,x:b3,y:b0,platform:Linux,
03000000790000001100000000010000,USB Gamepad,a:b2,b:b1,back:b8,dpdown:a0,dpleft:a1,dpright:a2,dpup:a4,start:b9,platform:Linux,
03000000790000001a18000011010000,Venom PS4 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b0,y:b3,platform:Linux,
03000000790000001b18000011010000,Venom PS4 Arcade Joystick,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Linux,
030000006f0e00000302000011010000,Victrix Pro Fightstick PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
030000006f0e00000702000011010000,Victrix Pro Fightstick PS4,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,start:b9,touchpad:b13,x:b0,y:b3,platform:Linux,
05000000ac0500003232000001000000,VR Box Controller,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b2,y:b3,platform:Linux,

View File

@@ -25,7 +25,8 @@
#define SW_AD_TO_HW (PS_BLEND_C == 1 && PS_A_MASKED)
#define PS_PRIMID_INIT (PS_DATE == 1 || PS_DATE == 2)
#define NEEDS_RT_EARLY (PS_TEX_IS_FB == 1 || PS_DATE >= 5)
#define NEEDS_RT (NEEDS_RT_EARLY || (!PS_PRIMID_INIT && (PS_FBMASK || SW_BLEND_NEEDS_RT || SW_AD_TO_HW)))
#define NEEDS_RT_FOR_AFAIL (PS_AFAIL == 3 && PS_NO_COLOR1)
#define NEEDS_RT (NEEDS_RT_EARLY || NEEDS_RT_FOR_AFAIL || (!PS_PRIMID_INIT && (PS_FBMASK || SW_BLEND_NEEDS_RT || SW_AD_TO_HW)))
#define NEEDS_TEX (PS_TFX != 4)
layout(std140, binding = 0) uniform cb21
@@ -1114,7 +1115,7 @@ void ps_main()
ps_fbmask(C);
#if PS_AFAIL == 3 // RGB_ONLY
#if PS_AFAIL == 3 && !PS_NO_COLOR1 // RGB_ONLY
// Use alpha blend factor to determine whether to update A.
alpha_blend.a = float(atst_pass);
#endif
@@ -1130,6 +1131,10 @@ void ps_main()
#else
SV_Target0.rgb = C.rgb / 255.0f;
#endif
#if PS_AFAIL == 3 && !PS_NO_COLOR1 // RGB_ONLY, no dual src blend
if (!atst_pass)
SV_Target0.a = sample_from_rt().a;
#endif
#if !PS_NO_COLOR1
SV_Target1 = alpha_blend;
#endif

View File

@@ -299,8 +299,9 @@ void main()
#define SW_BLEND (PS_BLEND_A || PS_BLEND_B || PS_BLEND_D)
#define SW_BLEND_NEEDS_RT (SW_BLEND && (PS_BLEND_A == 1 || PS_BLEND_B == 1 || PS_BLEND_C == 1 || PS_BLEND_D == 1))
#define SW_AD_TO_HW (PS_BLEND_C == 1 && PS_A_MASKED)
#define AFAIL_NEEDS_RT (PS_AFAIL == 3 && PS_NO_COLOR1)
#define PS_FEEDBACK_LOOP_IS_NEEDED (PS_TEX_IS_FB == 1 || PS_FBMASK || SW_BLEND_NEEDS_RT || SW_AD_TO_HW || (PS_DATE >= 5))
#define PS_FEEDBACK_LOOP_IS_NEEDED (PS_TEX_IS_FB == 1 || AFAIL_NEEDS_RT || PS_FBMASK || SW_BLEND_NEEDS_RT || SW_AD_TO_HW || (PS_DATE >= 5))
#define NEEDS_TEX (PS_TFX != 4)
@@ -1381,7 +1382,7 @@ void main()
ps_fbmask(C);
#if PS_AFAIL == 3 // RGB_ONLY
#if PS_AFAIL == 3 && !PS_NO_COLOR1 // RGB_ONLY
// Use alpha blend factor to determine whether to update A.
alpha_blend.a = float(atst_pass);
#endif
@@ -1400,6 +1401,10 @@ void main()
#if !PS_NO_COLOR1
o_col1 = alpha_blend;
#endif
#if PS_AFAIL == 3 && PS_NO_COLOR1 // RGB_ONLY, no dual src blend
if (!atst_pass)
o_col0.a = sample_from_rt().a;
#endif
#endif
#if PS_ZCLAMP

View File

@@ -5898,12 +5898,12 @@ Do you want to overwrite?</source>
<context>
<name>ExpressionParser</name>
<message>
<location filename="../../pcsx2/DebugTools/DebugInterface.cpp" line="1348"/>
<location filename="../../pcsx2/DebugTools/DebugInterface.cpp" line="1353"/>
<source>Invalid memory access size %d.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../pcsx2/DebugTools/DebugInterface.cpp" line="1354"/>
<location filename="../../pcsx2/DebugTools/DebugInterface.cpp" line="1359"/>
<source>Invalid memory access (unaligned).</source>
<translation type="unfinished"></translation>
</message>

View File

@@ -22,15 +22,21 @@
<Filter Include="Debugger">
<UniqueIdentifier>{ddb40cc4-9996-4ade-b647-eb549063553c}</UniqueIdentifier>
</Filter>
<Filter Include="Debugger\Models">
<UniqueIdentifier>{f4084ca0-d9d5-4584-b9d2-063db9f67de2}</UniqueIdentifier>
</Filter>
<Filter Include="Translations">
<UniqueIdentifier>{ad04f939-64a0-4039-97aa-a38b8aa46855}</UniqueIdentifier>
</Filter>
<Filter Include="Debugger\SymbolTree">
<UniqueIdentifier>{a622b871-62ae-4b70-b9b2-6ee30ce7fa7a}</UniqueIdentifier>
</Filter>
<Filter Include="Debugger\Breakpoints">
<UniqueIdentifier>{694f359a-dd3c-4e05-b000-684acb0fe0b0}</UniqueIdentifier>
</Filter>
<Filter Include="Debugger\Docking">
<UniqueIdentifier>{669ad4fe-0b5a-4722-946c-9e0742cebbca}</UniqueIdentifier>
</Filter>
<Filter Include="Debugger\Memory">
<UniqueIdentifier>{63790c94-0680-417d-926c-a8b74118f80f}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\pcsx2\windows\PCSX2.rc" />
@@ -302,51 +308,6 @@
<ClCompile Include="Debugger\ThreadWidget.cpp">
<Filter>Debugger</Filter>
</ClCompile>
<ClCompile Include="Debugger\Breakpoints\BreakpointDialog.cpp">
<Filter>Debugger\Breakpoints</Filter>
</ClCompile>
<ClCompile Include="Debugger\Breakpoints\BreakpointModel.cpp">
<Filter>Debugger\Breakpoints</Filter>
</ClCompile>
<ClCompile Include="Debugger\Breakpoints\BreakpointWidget.cpp">
<Filter>Debugger\Breakpoints</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\DockLayout.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\DockManager.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\DockTables.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\DockUtils.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\DockViews.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\DropIndicators.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\LayoutEditorDialog.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\NoLayoutsWidget.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Memory\MemorySearchWidget.cpp">
<Filter>Debugger\Memory</Filter>
</ClCompile>
<ClCompile Include="Debugger\Memory\MemoryViewWidget.cpp">
<Filter>Debugger\Memory</Filter>
</ClCompile>
<ClCompile Include="Debugger\Memory\SavedAddressesModel.cpp">
<Filter>Debugger\Memory</Filter>
</ClCompile>
<ClCompile Include="Debugger\Memory\SavedAddressesWidget.cpp">
<Filter>Debugger\Memory</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Debugger\moc_AnalysisOptionsDialog.cpp">
<Filter>moc</Filter>
</ClCompile>
@@ -461,6 +422,72 @@
<Filter>Debugger\SymbolTree</Filter>
</ClCompile>
<ClCompile Include="VCRuntimeChecker.cpp" />
<ClCompile Include="Debugger\Breakpoints\BreakpointDialog.cpp">
<Filter>Debugger\Breakpoints</Filter>
</ClCompile>
<ClCompile Include="Debugger\Breakpoints\BreakpointModel.cpp">
<Filter>Debugger\Breakpoints</Filter>
</ClCompile>
<ClCompile Include="Debugger\Breakpoints\BreakpointWidget.cpp">
<Filter>Debugger\Breakpoints</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\DockLayout.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\DockManager.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\DockTables.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\DockUtils.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\DockViews.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\DropIndicators.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Memory\SavedAddressesModel.cpp">
<Filter>Debugger\Memory</Filter>
</ClCompile>
<ClCompile Include="Debugger\Memory\SavedAddressesWidget.cpp">
<Filter>Debugger\Memory</Filter>
</ClCompile>
<ClCompile Include="Debugger\Memory\MemorySearchWidget.cpp">
<Filter>Debugger\Memory</Filter>
</ClCompile>
<ClCompile Include="Debugger\Memory\MemoryViewWidget.cpp">
<Filter>Debugger\Memory</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\LayoutEditorDialog.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="Debugger\Docking\NoLayoutsWidget.cpp">
<Filter>Debugger\Docking</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_NewSymbolDialogs.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeDelegates.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeLocation.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeModel.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeNode.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_SymbolTreeWidgets.cpp">
<Filter>moc</Filter>
</ClCompile>
<ClCompile Include="$(IntDir)Debugger\SymbolTree\moc_TypeString.cpp">
<Filter>moc</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Manifest Include="..\pcsx2\windows\PCSX2.manifest">
@@ -483,27 +510,6 @@
<ClInclude Include="Debugger\DebuggerSettingsManager.h">
<Filter>Debugger</Filter>
</ClInclude>
<ClInclude Include="Debugger\SymbolTree\NewSymbolDialogs.h">
<Filter>Debugger\SymbolTree</Filter>
</ClInclude>
<ClInclude Include="Debugger\SymbolTree\SymbolTreeDelegates.h">
<Filter>Debugger\SymbolTree</Filter>
</ClInclude>
<ClInclude Include="Debugger\SymbolTree\SymbolTreeLocation.h">
<Filter>Debugger\SymbolTree</Filter>
</ClInclude>
<ClInclude Include="Debugger\SymbolTree\SymbolTreeModel.h">
<Filter>Debugger\SymbolTree</Filter>
</ClInclude>
<ClInclude Include="Debugger\SymbolTree\SymbolTreeNode.h">
<Filter>Debugger\SymbolTree</Filter>
</ClInclude>
<ClInclude Include="Debugger\SymbolTree\SymbolTreeWidgets.h">
<Filter>Debugger\SymbolTree</Filter>
</ClInclude>
<ClInclude Include="Debugger\SymbolTree\TypeString.h">
<Filter>Debugger\SymbolTree</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<QtMoc Include="MainWindow.h" />
@@ -640,6 +646,16 @@
<QtMoc Include="Debugger\ThreadWidget.h">
<Filter>Debugger</Filter>
</QtMoc>
<QtMoc Include="ColorPickerButton.h" />
<QtMoc Include="SetupWizardDialog.h" />
<QtMoc Include="Settings\GameCheatSettingsWidget.h">
<Filter>Settings</Filter>
</QtMoc>
<QtMoc Include="Settings\GamePatchSettingsWidget.h">
<Filter>Settings</Filter>
</QtMoc>
<QtMoc Include="LogWindow.h" />
<QtMoc Include="Debugger\SymbolTree\TypeString.h" />
<QtMoc Include="Debugger\Breakpoints\BreakpointDialog.h">
<Filter>Debugger\Breakpoints</Filter>
</QtMoc>
@@ -667,17 +683,20 @@
<QtMoc Include="Debugger\Docking\DropIndicators.h">
<Filter>Debugger\Docking</Filter>
</QtMoc>
<QtMoc Include="Debugger\Docking\LayoutEditorDialog.h">
<Filter>Debugger\Docking</Filter>
<QtMoc Include="Debugger\SymbolTree\SymbolTreeWidgets.h">
<Filter>Debugger\SymbolTree</Filter>
</QtMoc>
<QtMoc Include="Debugger\Docking\NoLayoutsWidget.h">
<Filter>Debugger\Docking</Filter>
<QtMoc Include="Debugger\SymbolTree\SymbolTreeDelegates.h">
<Filter>Debugger\SymbolTree</Filter>
</QtMoc>
<QtMoc Include="Debugger\Memory\MemorySearchWidget.h">
<Filter>Debugger\Memory</Filter>
<QtMoc Include="Debugger\SymbolTree\SymbolTreeLocation.h">
<Filter>Debugger\SymbolTree</Filter>
</QtMoc>
<QtMoc Include="Debugger\Memory\MemoryViewWidget.h">
<Filter>Debugger\Memory</Filter>
<QtMoc Include="Debugger\SymbolTree\SymbolTreeModel.h">
<Filter>Debugger\SymbolTree</Filter>
</QtMoc>
<QtMoc Include="Debugger\SymbolTree\SymbolTreeNode.h">
<Filter>Debugger\SymbolTree</Filter>
</QtMoc>
<QtMoc Include="Debugger\Memory\SavedAddressesModel.h">
<Filter>Debugger\Memory</Filter>
@@ -685,15 +704,21 @@
<QtMoc Include="Debugger\Memory\SavedAddressesWidget.h">
<Filter>Debugger\Memory</Filter>
</QtMoc>
<QtMoc Include="ColorPickerButton.h" />
<QtMoc Include="SetupWizardDialog.h" />
<QtMoc Include="Settings\GameCheatSettingsWidget.h">
<Filter>Settings</Filter>
<QtMoc Include="Debugger\Memory\MemorySearchWidget.h">
<Filter>Debugger\Memory</Filter>
</QtMoc>
<QtMoc Include="Settings\GamePatchSettingsWidget.h">
<Filter>Settings</Filter>
<QtMoc Include="Debugger\Memory\MemoryViewWidget.h">
<Filter>Debugger\Memory</Filter>
</QtMoc>
<QtMoc Include="Debugger\Docking\LayoutEditorDialog.h">
<Filter>Debugger\Docking</Filter>
</QtMoc>
<QtMoc Include="Debugger\Docking\NoLayoutsWidget.h">
<Filter>Debugger\Docking</Filter>
</QtMoc>
<QtMoc Include="Debugger\SymbolTree\NewSymbolDialogs.h">
<Filter>Debugger\SymbolTree</Filter>
</QtMoc>
<QtMoc Include="LogWindow.h" />
</ItemGroup>
<ItemGroup>
<QtResource Include="resources\resources.qrc">
@@ -815,27 +840,6 @@
<QtUi Include="Debugger\RegisterWidget.ui">
<Filter>Debugger</Filter>
</QtUi>
<QtUi Include="Debugger\Breakpoints\BreakpointDialog.ui">
<Filter>Debugger\Breakpoints</Filter>
</QtUi>
<QtUi Include="Debugger\Breakpoints\BreakpointWidget.ui">
<Filter>Debugger\Breakpoints</Filter>
</QtUi>
<QtUi Include="Debugger\Docking\LayoutEditorDialog.ui">
<Filter>Debugger\Docking</Filter>
</QtUi>
<QtUi Include="Debugger\Docking\NoLayoutsWidget.ui">
<Filter>Debugger\Docking</Filter>
</QtUi>
<QtUi Include="Debugger\Memory\MemorySearchWidget.ui">
<Filter>Debugger\Memory</Filter>
</QtUi>
<QtUi Include="Debugger\Memory\MemoryViewWidget.ui">
<Filter>Debugger\Memory</Filter>
</QtUi>
<QtUi Include="Debugger\Memory\SavedAddressesWidget.ui">
<Filter>Debugger\Memory</Filter>
</QtUi>
<QtUi Include="Settings\ControllerLEDSettingsDialog.ui">
<Filter>Settings</Filter>
</QtUi>
@@ -885,6 +889,27 @@
<QtUi Include="Settings\AudioStretchSettingsDialog.ui">
<Filter>Settings</Filter>
</QtUi>
<QtUi Include="Debugger\Breakpoints\BreakpointDialog.ui">
<Filter>Debugger\Breakpoints</Filter>
</QtUi>
<QtUi Include="Debugger\Breakpoints\BreakpointWidget.ui">
<Filter>Debugger\Breakpoints</Filter>
</QtUi>
<QtUi Include="Debugger\Memory\SavedAddressesWidget.ui">
<Filter>Debugger\Memory</Filter>
</QtUi>
<QtUi Include="Debugger\Memory\MemoryViewWidget.ui">
<Filter>Debugger\Memory</Filter>
</QtUi>
<QtUi Include="Debugger\Memory\MemorySearchWidget.ui">
<Filter>Debugger\Memory</Filter>
</QtUi>
<QtUi Include="Debugger\Docking\LayoutEditorDialog.ui">
<Filter>Debugger\Docking</Filter>
</QtUi>
<QtUi Include="Debugger\Docking\NoLayoutsWidget.ui">
<Filter>Debugger\Docking</Filter>
</QtUi>
</ItemGroup>
<ItemGroup>
<None Include="Settings\FolderSettingsWidget.ui">
@@ -908,4 +933,4 @@
<Filter>Translations</Filter>
</QtTs>
</ItemGroup>
</Project>
</Project>

View File

@@ -6240,23 +6240,32 @@ __ri void GSRendererHW::DrawPrims(GSTextureCache::Target* rt, GSTextureCache::Ta
// Blending might be off, ensure it's enabled.
// We write the alpha pass/fail to SRC1_ALPHA, which is used to update A.
m_conf.ps.afail = AFAIL_RGB_ONLY;
m_conf.ps.no_color1 = false;
if (!m_conf.blend.enable)
if ((features.framebuffer_fetch && m_conf.require_one_barrier) || m_conf.require_full_barrier)
{
m_conf.blend = GSHWDrawConfig::BlendState(true, GSDevice::CONST_ONE, GSDevice::CONST_ZERO,
GSDevice::OP_ADD, GSDevice::SRC1_ALPHA, GSDevice::INV_SRC1_ALPHA, false, 0);
// We're reading the rt anyways, use it for AFAIL
// This ensures we don't attempt to use fbfetch + blend, which breaks Intel GPUs on Metal
// Setting afail to RGB_ONLY without enabling color1 will enable this mode in the shader, so nothing more to do here.
}
else
{
if (m_conf.blend_multi_pass.enable)
m_conf.ps.no_color1 = false;
if (!m_conf.blend.enable)
{
m_conf.blend_multi_pass.blend.src_factor_alpha = GSDevice::SRC1_ALPHA;
m_conf.blend_multi_pass.blend.dst_factor_alpha = GSDevice::INV_SRC1_ALPHA;
m_conf.blend = GSHWDrawConfig::BlendState(true, GSDevice::CONST_ONE, GSDevice::CONST_ZERO,
GSDevice::OP_ADD, GSDevice::SRC1_ALPHA, GSDevice::INV_SRC1_ALPHA, false, 0);
}
else
{
m_conf.blend.src_factor_alpha = GSDevice::SRC1_ALPHA;
m_conf.blend.dst_factor_alpha = GSDevice::INV_SRC1_ALPHA;
if (m_conf.blend_multi_pass.enable)
{
m_conf.blend_multi_pass.blend.src_factor_alpha = GSDevice::SRC1_ALPHA;
m_conf.blend_multi_pass.blend.dst_factor_alpha = GSDevice::INV_SRC1_ALPHA;
}
else
{
m_conf.blend.src_factor_alpha = GSDevice::SRC1_ALPHA;
m_conf.blend.dst_factor_alpha = GSDevice::INV_SRC1_ALPHA;
}
}
}

View File

@@ -219,6 +219,7 @@ public:
MRCOwned<id<MTLFence>> m_draw_sync_fence;
MRCOwned<MTLFunctionConstantValues*> m_fn_constants;
MRCOwned<MTLVertexDescriptor*> m_hw_vertex;
MTLResourceOptions m_resource_options_shared_wc;
// Previously in MetalHostDisplay.
MRCOwned<NSView*> m_view;

View File

@@ -10,6 +10,7 @@
#include "common/Console.h"
#include "common/HostSys.h"
#include "cpuinfo.h"
#include "imgui.h"
#ifdef __APPLE__
@@ -90,6 +91,12 @@ GSDeviceMTL::GSDeviceMTL()
, m_dev(nil)
{
m_backref->second = this;
m_resource_options_shared_wc = MTLResourceStorageModeShared | MTLResourceCPUCacheModeWriteCombined;
#ifdef _M_X86
// WC memory doesn't work properly on AMD hackintoshes, and ends up being horribly slow even when only writing
if (cpuinfo_get_core(0)->vendor == cpuinfo_vendor_amd)
m_resource_options_shared_wc = MTLResourceStorageModeShared;
#endif
}
GSDeviceMTL::~GSDeviceMTL()
@@ -107,7 +114,7 @@ GSDeviceMTL::Map GSDeviceMTL::Allocate(UploadBuffer& buffer, size_t amt)
size_t newsize = std::max<size_t>(buffer.usage.Size() * 2, 4096);
while (newsize < amt)
newsize *= 2;
MTLResourceOptions options = MTLResourceStorageModeShared | MTLResourceCPUCacheModeWriteCombined;
MTLResourceOptions options = m_resource_options_shared_wc;
buffer.mtlbuffer = MRCTransfer([m_dev.dev newBufferWithLength:newsize options:options]);
pxAssertRel(buffer.mtlbuffer, "Failed to allocate MTLBuffer (out of memory?)");
buffer.buffer = [buffer.mtlbuffer contents];
@@ -148,7 +155,7 @@ GSDeviceMTL::Map GSDeviceMTL::Allocate(BufferPair& buffer, size_t amt)
size_t newsize = std::max<size_t>(buffer.usage.Size() * 2, 4096);
while (newsize < amt)
newsize *= 2;
MTLResourceOptions options = MTLResourceStorageModeShared | MTLResourceCPUCacheModeWriteCombined;
MTLResourceOptions options = m_resource_options_shared_wc;
buffer.cpubuffer = MRCTransfer([m_dev.dev newBufferWithLength:newsize options:options]);
pxAssertRel(buffer.cpubuffer, "Failed to allocate MTLBuffer (out of memory?)");
buffer.buffer = [buffer.cpubuffer contents];
@@ -1277,7 +1284,7 @@ void GSDeviceMTL::UpdateTexture(id<MTLTexture> texture, u32 x, u32 y, u32 width,
id<MTLCommandBuffer> cmdbuf = [m_queue commandBuffer];
id<MTLBlitCommandEncoder> enc = [cmdbuf blitCommandEncoder];
size_t bytes = data_stride * height;
MRCOwned<id<MTLBuffer>> buf = MRCTransfer([m_dev.dev newBufferWithLength:bytes options:MTLResourceStorageModeShared | MTLResourceCPUCacheModeWriteCombined]);
MRCOwned<id<MTLBuffer>> buf = MRCTransfer([m_dev.dev newBufferWithLength:bytes options:m_resource_options_shared_wc]);
memcpy([buf contents], data, bytes);
[enc copyFromBuffer:buf
sourceOffset:0

View File

@@ -97,7 +97,8 @@ constant bool SW_BLEND = (PS_BLEND_A != PS_BLEND_B) || PS_BLEND_D;
constant bool SW_AD_TO_HW = (PS_BLEND_C == 1 && PS_A_MASKED);
constant bool NEEDS_RT_FOR_BLEND = (((PS_BLEND_A != PS_BLEND_B) && (PS_BLEND_A == 1 || PS_BLEND_B == 1 || PS_BLEND_C == 1)) || PS_BLEND_D == 1 || SW_AD_TO_HW);
constant bool NEEDS_RT_EARLY = PS_TEX_IS_FB || PS_DATE >= 5;
constant bool NEEDS_RT = NEEDS_RT_EARLY || (!PS_PRIM_CHECKING_INIT && (PS_FBMASK || NEEDS_RT_FOR_BLEND));
constant bool NEEDS_RT_FOR_AFAIL = PS_AFAIL == 3 && PS_NO_COLOR1;
constant bool NEEDS_RT = NEEDS_RT_FOR_AFAIL || NEEDS_RT_EARLY || (!PS_PRIM_CHECKING_INIT && (PS_FBMASK || NEEDS_RT_FOR_BLEND));
constant bool PS_COLOR0 = !PS_NO_COLOR;
constant bool PS_COLOR1 = !PS_NO_COLOR1;
@@ -1202,8 +1203,12 @@ struct PSMain
alpha_blend.a = float(atst_pass);
if (PS_COLOR0)
{
out.c0.a = PS_RTA_CORRECTION ? C.a / 128.f : C.a / 255.f;
out.c0.rgb = PS_HDR ? float3(C.rgb / 65535.f) : C.rgb / 255.f;
if (PS_AFAIL == 3 && !PS_COLOR1 && !atst_pass) // Doing RGB_ONLY without COLOR1
out.c0.a = current_color.a;
}
if (PS_COLOR1)
out.c1 = alpha_blend;
if (PS_ZCLAMP)

View File

@@ -4091,6 +4091,12 @@ void FullscreenUI::DrawGraphicsSettingsPage(SettingsInterface* bsi, bool show_ad
FSUI_NSTR("Enabled (All Primitives)"),
};
static constexpr const char* s_gpu_clut_options[] = {
FSUI_NSTR("Disabled (Default)"),
FSUI_NSTR("Enabled (Exact Match)"),
FSUI_NSTR("Enabled (Check Inside Target)"),
};
DrawIntListSetting(bsi, FSUI_CSTR("CPU Sprite Render Size"),
FSUI_CSTR("Uses software renderer to draw texture decompression-like sprites."), "EmuCore/GS",
"UserHacks_CPUSpriteRenderBW", 0, s_cpu_sprite_render_bw_options, std::size(s_cpu_sprite_render_bw_options), true);
@@ -4100,6 +4106,9 @@ void FullscreenUI::DrawGraphicsSettingsPage(SettingsInterface* bsi, bool show_ad
DrawIntListSetting(bsi, FSUI_CSTR("Software CLUT Render"),
FSUI_CSTR("Uses software renderer to draw texture CLUT points/sprites."), "EmuCore/GS", "UserHacks_CPUCLUTRender", 0,
s_cpu_clut_render_options, std::size(s_cpu_clut_render_options), true);
DrawIntListSetting(bsi, FSUI_CSTR("GPU Target CLUT"),
FSUI_CSTR("Try to detect when a game is drawing its own color palette and then renders it on the GPU with special handling."), "EmuCore/GS", "UserHacks_GPUTargetCLUTMode",
0, s_gpu_clut_options, std::size(s_gpu_clut_options), true, 0, manual_hw_fixes);
DrawIntSpinBoxSetting(bsi, FSUI_CSTR("Skip Draw Start"), FSUI_CSTR("Object range to skip drawing."), "EmuCore/GS",
"UserHacks_SkipDraw_Start", 0, 0, 5000, 1);
DrawIntSpinBoxSetting(bsi, FSUI_CSTR("Skip Draw End"), FSUI_CSTR("Object range to skip drawing."), "EmuCore/GS",

View File

@@ -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 = 59;
static constexpr u32 SHADER_CACHE_VERSION = 60;