Compare commits

..

4 Commits

Author SHA1 Message Date
lightningterror
bd9dcbe441 GS/D3D: Default to DX12 on older GCN amd cards. 2026-01-06 20:09:04 +01:00
PCSX2 Bot
2a1f29c641 [ci skip] Qt: Update Base Translation. 2026-01-06 20:08:18 +01:00
TheLastRar
38883e8df4 GS/DX12: Use cmdlist parameter for read depth transitions 2026-01-06 20:08:02 +01:00
PCSX2 Bot
f971040912 [ci skip] PAD: Update to latest controller database. 2026-01-06 20:07:43 +01:00
10 changed files with 1215 additions and 1262 deletions

View File

@@ -245,7 +245,8 @@
03000000b62500000100000000000000,Gametel GT004 01,a:b3,b:b0,dpdown:b10,dpleft:b9,dpright:b8,dpup:b11,leftshoulder:b4,rightshoulder:b5,start:b7,x:b1,y:b2,platform:Windows,
030000008f0e00001411000000000000,Gamo2 Divaller,a:b1,b:b2,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:b0,y:b3,platform:Windows,
03000000120c0000a857000000000000,Gator Claw,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,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:Windows,
03000000c9110000f055000000000000,GC100XF,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:Windows,
03000000c21100000791000000000000,Be1 GC101 Controller 1.03,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,
03000000c9110000f055000000000000,Be1 GC100XF Controller,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:Windows,
030000008305000009a0000000000000,Genius,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:Windows,
030000008305000031b0000000000000,Genius Maxfire Blaze 3,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:Windows,
03000000451300000010000000000000,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:Windows,

File diff suppressed because it is too large Load Diff

View File

@@ -11,8 +11,6 @@
std::vector<BreakPoint> CBreakPoints::breakPoints_;
u32 CBreakPoints::breakSkipFirstAtEE_ = 0;
u32 CBreakPoints::breakSkipFirstAtIop_ = 0;
bool CBreakPoints::pendingClearSkipFirstAtEE_ = false;
bool CBreakPoints::pendingClearSkipFirstAtIop_ = false;
std::vector<MemCheck> CBreakPoints::memChecks_;
std::vector<MemCheck*> CBreakPoints::cleanupMemChecks_;
bool CBreakPoints::breakpointTriggered_ = false;
@@ -393,12 +391,10 @@ void CBreakPoints::SetSkipFirst(BreakPointCpu cpu, u32 pc)
if (cpu == BREAKPOINT_EE)
{
breakSkipFirstAtEE_ = standardizeBreakpointAddress(pc);
pendingClearSkipFirstAtEE_ = false;
}
else if (cpu == BREAKPOINT_IOP)
{
breakSkipFirstAtIop_ = pc;
pendingClearSkipFirstAtIop_ = false;
}
}
@@ -411,29 +407,10 @@ u32 CBreakPoints::CheckSkipFirst(BreakPointCpu cpu, u32 cmpPc)
return 0;
}
void CBreakPoints::ClearSkipFirst(BreakPointCpu cpu)
void CBreakPoints::ClearSkipFirst()
{
if((cpu & BREAKPOINT_EE) != 0)
pendingClearSkipFirstAtEE_ = true;
else if ((cpu & BREAKPOINT_IOP) != 0)
pendingClearSkipFirstAtIop_ = true;
if(cpu == BREAKPOINT_IOP_AND_EE)
CommitClearSkipFirst(BREAKPOINT_IOP_AND_EE);
}
void CBreakPoints::CommitClearSkipFirst(BreakPointCpu cpu)
{
if((cpu & BREAKPOINT_EE) != 0 && pendingClearSkipFirstAtEE_)
{
pendingClearSkipFirstAtEE_ = false;
breakSkipFirstAtEE_ = 0;
}
else if ((cpu & BREAKPOINT_IOP) != 0 && pendingClearSkipFirstAtIop_)
{
pendingClearSkipFirstAtIop_ = true;
breakSkipFirstAtIop_ = 0;
}
breakSkipFirstAtEE_ = 0;
breakSkipFirstAtIop_ = 0;
}
const std::vector<MemCheck> CBreakPoints::GetMemCheckRanges()

View File

@@ -135,8 +135,7 @@ public:
static void SetSkipFirst(BreakPointCpu cpu, u32 pc);
static u32 CheckSkipFirst(BreakPointCpu cpu, u32 pc);
static void ClearSkipFirst(BreakPointCpu cpu = BREAKPOINT_IOP_AND_EE);
static void CommitClearSkipFirst(BreakPointCpu cpu);
static void ClearSkipFirst();
// Includes uncached addresses.
static const std::vector<MemCheck> GetMemCheckRanges();
@@ -170,9 +169,9 @@ private:
static std::vector<BreakPoint> breakPoints_;
static u32 breakSkipFirstAtEE_;
static bool pendingClearSkipFirstAtEE_;
static u64 breakSkipFirstTicksEE_;
static u32 breakSkipFirstAtIop_;
static bool pendingClearSkipFirstAtIop_;
static u64 breakSkipFirstTicksIop_;
static bool breakpointTriggered_;
static BreakPointCpu breakpointTriggeredCpu_;

View File

@@ -439,7 +439,9 @@ GSRendererType D3D::GetPreferredRenderer()
if (!feature_level.has_value())
return GSRendererType::DX11;
else if (feature_level == D3D_FEATURE_LEVEL_12_0)
return check_vulkan_supported() ? GSRendererType::VK : GSRendererType::DX11;
return check_vulkan_supported() ? GSRendererType::VK : GSRendererType::DX12;
else if (feature_level == D3D_FEATURE_LEVEL_11_1)
return GSRendererType::DX12;
else
return GSRendererType::DX11;
}

View File

@@ -738,7 +738,7 @@ void GSTexture12::TransitionToState(ID3D12GraphicsCommandList* cmdlist, D3D12_RE
{D3D12_RESOURCE_BARRIER_TYPE_TRANSITION, D3D12_RESOURCE_BARRIER_FLAG_NONE,
{{m_resource.get(), 1, m_resource_state, D3D12_RESOURCE_STATE_DEPTH_WRITE}}},
};
GSDevice12::GetInstance()->GetCommandList()->ResourceBarrier(m_resource_state == D3D12_RESOURCE_STATE_DEPTH_WRITE ? 1 : 2, barriers);
cmdlist->ResourceBarrier(m_resource_state == D3D12_RESOURCE_STATE_DEPTH_WRITE ? 1 : 2, barriers);
}
else if (m_resource_state == (D3D12_RESOURCE_STATE_DEPTH_READ | D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE))
{
@@ -749,7 +749,7 @@ void GSTexture12::TransitionToState(ID3D12GraphicsCommandList* cmdlist, D3D12_RE
{D3D12_RESOURCE_BARRIER_TYPE_TRANSITION, D3D12_RESOURCE_BARRIER_FLAG_NONE,
{{m_resource.get(), 1, D3D12_RESOURCE_STATE_DEPTH_WRITE, state}}},
};
GSDevice12::GetInstance()->GetCommandList()->ResourceBarrier(state == D3D12_RESOURCE_STATE_DEPTH_WRITE ? 1 : 2, barriers);
cmdlist->ResourceBarrier(state == D3D12_RESOURCE_STATE_DEPTH_WRITE ? 1 : 2, barriers);
}
else
{

View File

@@ -67,10 +67,7 @@ void intBreakpoint(bool memcheck)
{
const u32 pc = cpuRegs.pc;
if (CBreakPoints::CheckSkipFirst(BREAKPOINT_EE, pc) != 0)
{
CBreakPoints::ClearSkipFirst(BREAKPOINT_EE);
return;
}
if (!memcheck)
{
@@ -164,8 +161,6 @@ static void execI()
intBreakpoint(false);
intCheckMemcheck();
CBreakPoints::CommitClearSkipFirst(BREAKPOINT_EE);
#endif
const u32 pc = cpuRegs.pc;

View File

@@ -120,10 +120,7 @@ void psxBreakpoint(bool memcheck)
{
u32 pc = psxRegs.pc;
if (CBreakPoints::CheckSkipFirst(BREAKPOINT_IOP, pc) != 0)
{
CBreakPoints::ClearSkipFirst(BREAKPOINT_IOP);
return;
}
if (!memcheck)
{
@@ -211,8 +208,6 @@ static __fi void execI()
psxBreakpoint(false);
psxCheckMemcheck();
CBreakPoints::CommitClearSkipFirst(BREAKPOINT_IOP);
#endif
// Inject IRX hack

View File

@@ -1259,10 +1259,7 @@ static bool psxDynarecCheckBreakpoint()
{
u32 pc = psxRegs.pc;
if (CBreakPoints::CheckSkipFirst(BREAKPOINT_IOP, pc) == pc)
{
CBreakPoints::ClearSkipFirst(BREAKPOINT_IOP);
return false;
}
int bpFlags = psxIsBreakpointNeeded(pc);
bool hit = false;
@@ -1302,10 +1299,8 @@ static bool psxDynarecMemcheck(size_t i)
auto mc = CBreakPoints::GetMemChecks(BREAKPOINT_IOP)[i];
if (CBreakPoints::CheckSkipFirst(BREAKPOINT_IOP, pc) == pc)
{
CBreakPoints::ClearSkipFirst(BREAKPOINT_IOP);
return false;
}
if (mc.hasCond)
{
if (!mc.cond.Evaluate())
@@ -1378,7 +1373,7 @@ static void psxRecMemcheck(u32 op, u32 bits, bool store)
}
}
static bool psxEncodeBreakpoint()
static void psxEncodeBreakpoint()
{
if (psxIsBreakpointNeeded(psxpc) != 0)
{
@@ -1386,17 +1381,14 @@ static bool psxEncodeBreakpoint()
xFastCall((void*)psxDynarecCheckBreakpoint);
xTEST(al, al);
xJNZ(iopExitRecompiledCode);
return true;
}
return false;
}
static bool psxEncodeMemcheck()
static void psxEncodeMemcheck()
{
int needed = psxIsMemcheckNeeded(psxpc);
if (needed == 0)
return false;
return;
u32 op = iopMemRead32(needed == 2 ? psxpc + 4 : psxpc);
const R5900::OPCODE& opcode = R5900::GetInstruction(op);
@@ -1417,7 +1409,6 @@ static bool psxEncodeMemcheck()
psxRecMemcheck(op, 64, store);
break;
}
return true;
}
void psxRecompileNextInstruction(bool delayslot, bool swapped_delayslot)
@@ -1446,10 +1437,12 @@ void psxRecompileNextInstruction(bool delayslot, bool swapped_delayslot)
EEINST* old_inst_info = g_pCurInstInfo;
s_recompilingDelaySlot = delayslot;
// add breakpoint
if (!delayslot)
{
if(psxEncodeBreakpoint() || psxEncodeMemcheck())
xFastCall((void*)CBreakPoints::CommitClearSkipFirst, BREAKPOINT_IOP);
// Broken on x64
psxEncodeBreakpoint();
psxEncodeMemcheck();
}
else
{

View File

@@ -1498,10 +1498,7 @@ void dynarecCheckBreakpoint()
{
u32 pc = cpuRegs.pc;
if (CBreakPoints::CheckSkipFirst(BREAKPOINT_EE, pc) != 0)
{
CBreakPoints::ClearSkipFirst(BREAKPOINT_EE);
return;
}
const int bpFlags = isBreakpointNeeded(pc);
bool hit = false;
@@ -1535,10 +1532,7 @@ void dynarecMemcheck(size_t i)
const u32 op = memRead32(cpuRegs.pc);
const OPCODE& opcode = GetInstruction(op);
if (CBreakPoints::CheckSkipFirst(BREAKPOINT_EE, pc) != 0)
{
CBreakPoints::ClearSkipFirst(BREAKPOINT_EE);
return;
}
auto mc = CBreakPoints::GetMemChecks(BREAKPOINT_EE)[i];
@@ -1612,22 +1606,20 @@ void recMemcheck(u32 op, u32 bits, bool store)
}
}
bool encodeBreakpoint()
void encodeBreakpoint()
{
if (isBreakpointNeeded(pc) != 0)
{
iFlushCall(FLUSH_EVERYTHING | FLUSH_PC);
xFastCall((void*)dynarecCheckBreakpoint);
return true;
}
return false;
}
bool encodeMemcheck()
void encodeMemcheck()
{
const int needed = isMemcheckNeeded(pc);
if (needed == 0)
return false;
return;
const u32 op = memRead32(needed == 2 ? pc + 4 : pc);
const OPCODE& opcode = GetInstruction(op);
@@ -1651,7 +1643,6 @@ bool encodeMemcheck()
recMemcheck(op, 128, store);
break;
}
return true;
}
void recompileNextInstruction(bool delayslot, bool swapped_delay_slot)
@@ -1662,8 +1653,8 @@ void recompileNextInstruction(bool delayslot, bool swapped_delay_slot)
// add breakpoint
if (!delayslot)
{
if(encodeBreakpoint() || encodeMemcheck())
xFastCall((void*)CBreakPoints::CommitClearSkipFirst, BREAKPOINT_EE);
encodeBreakpoint();
encodeMemcheck();
}
else
{