[video_core] Simplify DMA options (#525)

This simplifies DMA options in a clearer and more objective way.

Co-authored-by: PavelBARABANOV <pavelbarabanov94@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/525
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
Co-authored-by: MaranBr <maranbr@outlook.com>
Co-committed-by: MaranBr <maranbr@outlook.com>
This commit is contained in:
MaranBr 2025-09-16 18:42:48 +02:00 committed by crueter
parent 80dfc3d76f
commit 19036c59b5
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
31 changed files with 122 additions and 153 deletions

View file

@ -154,11 +154,19 @@ bool IsGPULevelHigh() {
values.current_gpu_accuracy == GpuAccuracy::High;
}
bool IsDMALevelDefault() {
return values.dma_accuracy.GetValue() == DmaAccuracy::Default;
}
bool IsDMALevelSafe() {
return values.dma_accuracy.GetValue() == DmaAccuracy::Safe;
}
bool IsFastmemEnabled() {
if (values.cpu_debug_mode) {
return static_cast<bool>(values.cpuopt_fastmem);
}
if (Settings::values.cpu_accuracy.GetValue() == Settings::CpuAccuracy::Unsafe) {
if (values.cpu_accuracy.GetValue() == CpuAccuracy::Unsafe) {
return static_cast<bool>(values.cpuopt_unsafe_host_mmu);
}
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__sun__)

View file

@ -443,7 +443,7 @@ struct Values {
SwitchableSetting<DmaAccuracy, true> dma_accuracy{linkage,
DmaAccuracy::Default,
DmaAccuracy::Default,
DmaAccuracy::Extreme,
DmaAccuracy::Safe,
"dma_accuracy",
Category::RendererAdvanced,
Specialization::Default,
@ -783,6 +783,9 @@ void UpdateGPUAccuracy();
bool IsGPULevelExtreme();
bool IsGPULevelHigh();
bool IsDMALevelDefault();
bool IsDMALevelSafe();
bool IsFastmemEnabled();
void SetNceEnabled(bool is_64bit);
bool IsNceEnabled();

View file

@ -136,7 +136,7 @@ ENUM(ShaderBackend, Glsl, Glasm, SpirV);
ENUM(GpuAccuracy, Normal, High, Extreme);
ENUM(DmaAccuracy, Default, Normal, High, Extreme);
ENUM(DmaAccuracy, Default, Unsafe, Safe);
ENUM(CpuBackend, Dynarmic, Nce);