fix comp + make code slightly easier to read
All checks were successful
eden-license / license-header (pull_request) Successful in 31s

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2025-08-22 22:19:52 -04:00
parent d1ec074367
commit 201ad66e8f
Signed by: crueter
GPG key ID: 425ACD2D4830EBC6
2 changed files with 17 additions and 18 deletions

View file

@ -427,17 +427,19 @@ struct Values {
Specialization::Default,
true,
true};
GpuAccuracy current_gpu_accuracy{GpuAccuracy::High};
SwitchableSetting<DmaAccuracy, true> dma_accuracy{linkage,
DmaAccuracy::Default,
DmaAccuracy::Normal,
DmaAccuracy::High,
DmaAccuracy::Default,
DmaAccuracy::Extreme,
"dma_accuracy",
Category::RendererAdvanced,
Specialization::Default,
true,
true};
SwitchableSetting<AnisotropyMode, true> max_anisotropy{linkage,
#ifdef ANDROID
AnisotropyMode::Default,

View file

@ -102,20 +102,18 @@ bool DmaPusher::Step() {
ProcessCommands(headers);
};
if (Settings::values.current_gpu_accuracy == DmaAccuracy::Extreme) {
const Settings::DmaAccuracy accuracy = Settings::values.dma_accuracy.GetValue();
const bool use_gpu_accuracy = accuracy == Settings::DmaAccuracy::Default;
// 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) {
safe_process();
} else if (Settings::values.current_gpu_accuracy == DmaAccuracy::High) {
if (dma_state.method >= MacroRegistersStart) {
unsafe_process();
} else {
safe_process();
}
} 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()) {
} else if (unsafe_compute) {
if (dma_state.method >= MacroRegistersStart) {
unsafe_process();
} else {
@ -124,7 +122,6 @@ bool DmaPusher::Step() {
} else {
unsafe_process();
}
}
if (dma_pushbuffer_subindex >= command_list.command_lists.size()) {
// We've gone through the current list, remove it from the queue