[video_core] Add option to control the DMA precision level at runtime #304
5 changed files with 40 additions and 4 deletions
|
@ -427,6 +427,16 @@ struct Values {
|
|||
Specialization::Default,
|
||||
true,
|
||||
true};
|
||||
SwitchableSetting<DmaAccuracy, true> dma_accuracy{linkage,
|
||||
DmaAccuracy::Default,
|
||||
DmaAccuracy::Normal,
|
||||
DmaAccuracy::High,
|
||||
DmaAccuracy::Extreme,
|
||||
MaranBr marked this conversation as resolved
|
||||
"dma_accuracy",
|
||||
Category::RendererAdvanced,
|
||||
Specialization::Default,
|
||||
true,
|
||||
true};
|
||||
GpuAccuracy current_gpu_accuracy{GpuAccuracy::High};
|
||||
SwitchableSetting<AnisotropyMode, true> max_anisotropy{linkage,
|
||||
#ifdef ANDROID
|
||||
|
|
|
@ -136,6 +136,8 @@ ENUM(ShaderBackend, Glsl, Glasm, SpirV);
|
|||
|
||||
ENUM(GpuAccuracy, Normal, High, Extreme);
|
||||
|
||||
ENUM(DmaAccuracy, Default, Normal, High, Extreme);
|
||||
|
||||
ENUM(CpuBackend, Dynarmic, Nce);
|
||||
|
||||
ENUM(CpuAccuracy, Auto, Accurate, Unsafe, Paranoid);
|
||||
|
|
|
@ -102,17 +102,29 @@ bool DmaPusher::Step() {
|
|||
ProcessCommands(headers);
|
||||
};
|
||||
|
||||
if (Settings::IsGPULevelExtreme()) {
|
||||
if (Settings::values.current_gpu_accuracy == DmaAccuracy::Extreme) {
|
||||
safe_process();
|
||||
} else if (Settings::IsGPULevelHigh()) {
|
||||
} else if (Settings::values.current_gpu_accuracy == DmaAccuracy::High) {
|
||||
if (dma_state.method >= MacroRegistersStart) {
|
||||
unsafe_process();
|
||||
} else {
|
||||
safe_process();
|
||||
}
|
||||
} else {
|
||||
} else if (Settings::values.current_gpu_accuracy == DmaAccuracy::Normal) {
|
||||
unsafe_process();
|
||||
}
|
||||
} else if (Settings::values.current_gpu_accuracy == DmaAccuracy::Default) {
|
||||
if (Settings::IsGPULevelExtreme()) {
|
||||
safe_process();
|
||||
} else if (Settings::IsGPULevelHigh()) {
|
||||
if (dma_state.method >= MacroRegistersStart) {
|
||||
unsafe_process();
|
||||
} else {
|
||||
safe_process();
|
||||
}
|
||||
} else {
|
||||
unsafe_process();
|
||||
}
|
||||
}
|
||||
|
||||
if (dma_pushbuffer_subindex >= command_list.command_lists.size()) {
|
||||
// We've gone through the current list, remove it from the queue
|
||||
|
|
|
@ -294,6 +294,10 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent)
|
|||
"accuracy.\nExtreme should only be used for debugging.\nThis option can "
|
||||
"be changed while playing.\nSome games may require booting on high to render "
|
||||
"properly."));
|
||||
INSERT(Settings,
|
||||
dma_accuracy,
|
||||
tr("DMA Level:"),
|
||||
tr("Adjusts the DMA precision level. Higher precision may fix some games, but it can also directly impact performance in some cases.\nIf unsure, leave it at Default."));
|
||||
INSERT(Settings,
|
||||
use_asynchronous_shaders,
|
||||
tr("Use asynchronous shader building (Hack)"),
|
||||
|
@ -522,6 +526,13 @@ std::unique_ptr<ComboboxTranslationMap> ComboboxEnumeration(QWidget* parent)
|
|||
PAIR(GpuAccuracy, High, tr("High")),
|
||||
PAIR(GpuAccuracy, Extreme, tr("Extreme")),
|
||||
}});
|
||||
translations->insert({Settings::EnumMetadata<Settings::DmaAccuracy>::Index(),
|
||||
{
|
||||
PAIR(DmaAccuracy, Default, tr("Default")),
|
||||
PAIR(DmaAccuracy, Normal, tr("Normal")),
|
||||
PAIR(DmaAccuracy, High, tr("High")),
|
||||
PAIR(DmaAccuracy, Extreme, tr("Extreme")),
|
||||
}});
|
||||
translations->insert(
|
||||
{Settings::EnumMetadata<Settings::CpuAccuracy>::Index(),
|
||||
{
|
||||
|
|
|
@ -270,6 +270,7 @@ Q_DECLARE_METATYPE(UISettings::GameDir*);
|
|||
// These metatype declarations cannot be in common/settings.h because core is devoid of QT
|
||||
Q_DECLARE_METATYPE(Settings::CpuAccuracy);
|
||||
Q_DECLARE_METATYPE(Settings::GpuAccuracy);
|
||||
Q_DECLARE_METATYPE(Settings::DmaAccuracy);
|
||||
Q_DECLARE_METATYPE(Settings::FullscreenMode);
|
||||
Q_DECLARE_METATYPE(Settings::NvdecEmulation);
|
||||
Q_DECLARE_METATYPE(Settings::ResolutionSetup);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue
remove the high since for ranged settings you only need upper and lower bound