[video_core] Add option to control the DMA precision level at runtime #304

Merged
Shinmegumi merged 6 commits from dma-feature into master 2025-08-23 19:42:11 +02:00
Member

This adds an option to control the DMA precision level at runtime.

This adds an option to control the DMA precision level at runtime.
MaranBr added 1 commit 2025-08-23 03:20:18 +02:00
Add option to control the DMA precision level at runtime
All checks were successful
eden-license / license-header (pull_request) Successful in 22s
fc5a57189b
MaranBr added 1 commit 2025-08-23 03:23:01 +02:00
Move instruction to correct place
All checks were successful
eden-license / license-header (pull_request) Successful in 27s
d1ec074367
crueter requested changes 2025-08-23 03:30:55 +02:00
Dismissed
@ -431,0 +431,4 @@
SwitchableSetting<DmaAccuracy, true> dma_accuracy{linkage,
DmaAccuracy::Default,
DmaAccuracy::Normal,
DmaAccuracy::High,
Owner

remove the high since for ranged settings you only need upper and lower bound

DmaAccuracy::Default, // default
DmaAccuracy::Default, // min
DmaAccuracy::Extreme, // max
remove the high since for ranged settings you only need upper and lower bound ```cpp DmaAccuracy::Default, // default DmaAccuracy::Default, // min DmaAccuracy::Extreme, // max ```
MaranBr marked this conversation as resolved
@ -114,2 +114,3 @@
unsafe_process();
}
} else if (Settings::values.current_gpu_accuracy == DmaAccuracy::Default) {
if (Settings::IsGPULevelExtreme()) {
Owner

you need .GetValue() after the settings name and I believe you need Settings:: before dmaaccuracy since it's an enum class iirc

also would rather have all of this calculated beforehand to reduce duplicate code eg

const Settings::DmaAccuracy accuracy = Settings::values.current_gpu_accuracy.GetValue();
const bool override = accuracy == Settings::DmaAccuracy::Default;
const bool force_safe = override ? Settings::IsGPULevelExtreme() : accuracy == Settings::DmaAccuracy::Extreme;
const bool unsafe_compute = override ? Settings::IsGPULevelHigh() : accuracy == Settings::DmaAccuracy::High;

if (force_safe) {
    safe_process();
} else if (unsafe_compute) {
    if (dma_state.method >= MacroRegistersStart) {
        unsafe_process();
    } else {
        safe_process();
    }
} else {
    unsafe_process();
}
you need `.GetValue()` after the settings name and I believe you need `Settings::` before dmaaccuracy since it's an `enum class` iirc also would rather have all of this calculated beforehand to reduce duplicate code eg ```cpp const Settings::DmaAccuracy accuracy = Settings::values.current_gpu_accuracy.GetValue(); const bool override = accuracy == Settings::DmaAccuracy::Default; const bool force_safe = override ? Settings::IsGPULevelExtreme() : accuracy == Settings::DmaAccuracy::Extreme; const bool unsafe_compute = override ? Settings::IsGPULevelHigh() : accuracy == Settings::DmaAccuracy::High; if (force_safe) { safe_process(); } else if (unsafe_compute) { if (dma_state.method >= MacroRegistersStart) { unsafe_process(); } else { safe_process(); } } else { unsafe_process(); } ```
MaranBr marked this conversation as resolved
crueter force-pushed dma-feature from da37aef435 to 201ad66e8f 2025-08-23 04:20:03 +02:00 Compare
crueter approved these changes 2025-08-23 04:24:40 +02:00
Dismissed
crueter left a comment
Owner

approved, pending tests

approved, pending tests
MaranBr added 1 commit 2025-08-23 05:27:51 +02:00
Update descriptions
All checks were successful
eden-license / license-header (pull_request) Successful in 25s
7a8927e209
MaranBr dismissed crueter's review 2025-08-23 05:27:51 +02:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

PavelBARABANOV added 1 commit 2025-08-23 12:41:52 +02:00
Android toggle
All checks were successful
eden-license / license-header (pull_request) Successful in 22s
bfb0b13ec0
PavelBARABANOV added 1 commit 2025-08-23 16:39:57 +02:00
translations
All checks were successful
eden-license / license-header (pull_request) Successful in 20s
51981efb06
crueter approved these changes 2025-08-23 16:46:13 +02:00
Shinmegumi merged commit 5b864d406d into master 2025-08-23 19:42:11 +02:00
Shinmegumi deleted branch dma-feature 2025-08-23 19:42:11 +02:00
Sign in to join this conversation.
No description provided.