mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-12 20:37:46 +00:00
[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:
parent
80dfc3d76f
commit
19036c59b5
31 changed files with 122 additions and 153 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue