[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
Signed by: crueter
GPG key ID: 425ACD2D4830EBC6
31 changed files with 122 additions and 153 deletions

View file

@ -102,23 +102,10 @@ bool DmaPusher::Step() {
ProcessCommands(headers);
};
const Settings::DmaAccuracy accuracy = Settings::values.dma_accuracy.GetValue();
const bool use_gpu_accuracy = accuracy == Settings::DmaAccuracy::Default;
const bool use_safe = Settings::IsDMALevelDefault() ? Settings::IsGPULevelHigh() : Settings::IsDMALevelSafe();
// reduces eye bleeding but also macros are dumb so idk
#define CHECK_LEVEL(level) use_gpu_accuracy ? Settings::IsGPULevel##level() : accuracy == Settings::DmaAccuracy::level;
const bool force_safe = CHECK_LEVEL(Extreme)
const bool unsafe_compute = CHECK_LEVEL(High)
#undef CHECK_LEVEL
if (force_safe) {
if (use_safe) {
safe_process();
} else if (unsafe_compute) {
if (dma_state.method >= MacroRegistersStart) {
unsafe_process();
} else {
safe_process();
}
} else {
unsafe_process();
}