mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Add fastmem arena setting
Just for debugging.
This commit is contained in:
@ -38,6 +38,7 @@ const Info<PowerPC::CPUCore> MAIN_CPU_CORE{{System::Main, "Core", "CPUCore"},
|
||||
PowerPC::DefaultCPUCore()};
|
||||
const Info<bool> MAIN_JIT_FOLLOW_BRANCH{{System::Main, "Core", "JITFollowBranch"}, true};
|
||||
const Info<bool> MAIN_FASTMEM{{System::Main, "Core", "Fastmem"}, true};
|
||||
const Info<bool> MAIN_FASTMEM_ARENA{{System::Main, "Core", "FastmemArena"}, true};
|
||||
const Info<bool> MAIN_ACCURATE_CPU_CACHE{{System::Main, "Core", "AccurateCPUCache"}, false};
|
||||
const Info<bool> MAIN_DSP_HLE{{System::Main, "Core", "DSPHLE"}, true};
|
||||
const Info<int> MAIN_MAX_FALLBACK{{System::Main, "Core", "MaxFallback"}, 100};
|
||||
|
@ -56,6 +56,7 @@ extern const Info<bool> MAIN_SKIP_IPL;
|
||||
extern const Info<PowerPC::CPUCore> MAIN_CPU_CORE;
|
||||
extern const Info<bool> MAIN_JIT_FOLLOW_BRANCH;
|
||||
extern const Info<bool> MAIN_FASTMEM;
|
||||
extern const Info<bool> MAIN_FASTMEM_ARENA;
|
||||
extern const Info<bool> MAIN_ACCURATE_CPU_CACHE;
|
||||
// Should really be in the DSP section, but we're kind of stuck with bad decisions made in the past.
|
||||
extern const Info<bool> MAIN_DSP_HLE;
|
||||
|
@ -251,8 +251,7 @@ bool Jit64::BackPatch(SContext* ctx)
|
||||
|
||||
void Jit64::Init()
|
||||
{
|
||||
auto& memory = m_system.GetMemory();
|
||||
jo.fastmem_arena = memory.InitFastmemArena();
|
||||
InitFastmemArena();
|
||||
|
||||
RefreshConfig();
|
||||
|
||||
|
@ -47,8 +47,7 @@ JitArm64::~JitArm64() = default;
|
||||
|
||||
void JitArm64::Init()
|
||||
{
|
||||
auto& memory = m_system.GetMemory();
|
||||
jo.fastmem_arena = memory.InitFastmemArena();
|
||||
InitFastmemArena();
|
||||
|
||||
RefreshConfig();
|
||||
|
||||
|
@ -140,6 +140,12 @@ void JitBase::RefreshConfig()
|
||||
jo.div_by_zero_exceptions = m_enable_div_by_zero_exceptions;
|
||||
}
|
||||
|
||||
void JitBase::InitFastmemArena()
|
||||
{
|
||||
auto& memory = m_system.GetMemory();
|
||||
jo.fastmem_arena = Config::Get(Config::MAIN_FASTMEM_ARENA) && memory.InitFastmemArena();
|
||||
}
|
||||
|
||||
void JitBase::InitBLROptimization()
|
||||
{
|
||||
m_enable_blr_optimization =
|
||||
|
@ -166,6 +166,8 @@ protected:
|
||||
bool DoesConfigNeedRefresh();
|
||||
void RefreshConfig();
|
||||
|
||||
void InitFastmemArena();
|
||||
|
||||
void InitBLROptimization();
|
||||
void ProtectStack();
|
||||
void UnprotectStack();
|
||||
|
@ -139,6 +139,7 @@ void MenuBar::OnEmulationStateChanged(Core::State state)
|
||||
m_jit_interpreter_core->setEnabled(running);
|
||||
m_jit_block_linking->setEnabled(!running);
|
||||
m_jit_disable_cache->setEnabled(!running);
|
||||
m_jit_disable_fastmem_arena->setEnabled(!running);
|
||||
m_jit_clear_cache->setEnabled(running);
|
||||
m_jit_log_coverage->setEnabled(!running);
|
||||
m_jit_search_instruction->setEnabled(running);
|
||||
@ -847,6 +848,12 @@ void MenuBar::AddJITMenu()
|
||||
connect(m_jit_disable_fastmem, &QAction::toggled,
|
||||
[](bool enabled) { Config::SetBaseOrCurrent(Config::MAIN_FASTMEM, !enabled); });
|
||||
|
||||
m_jit_disable_fastmem_arena = m_jit->addAction(tr("Disable Fastmem Arena"));
|
||||
m_jit_disable_fastmem_arena->setCheckable(true);
|
||||
m_jit_disable_fastmem_arena->setChecked(!Config::Get(Config::MAIN_FASTMEM_ARENA));
|
||||
connect(m_jit_disable_fastmem_arena, &QAction::toggled,
|
||||
[](bool enabled) { Config::SetBaseOrCurrent(Config::MAIN_FASTMEM_ARENA, !enabled); });
|
||||
|
||||
m_jit_clear_cache = m_jit->addAction(tr("Clear Cache"), this, &MenuBar::ClearCache);
|
||||
|
||||
m_jit->addSeparator();
|
||||
|
@ -264,6 +264,7 @@ private:
|
||||
QAction* m_jit_block_linking;
|
||||
QAction* m_jit_disable_cache;
|
||||
QAction* m_jit_disable_fastmem;
|
||||
QAction* m_jit_disable_fastmem_arena;
|
||||
QAction* m_jit_clear_cache;
|
||||
QAction* m_jit_log_coverage;
|
||||
QAction* m_jit_search_instruction;
|
||||
|
Reference in New Issue
Block a user