mirror of
https://git.citron-emu.org/Citron/Citron.git
synced 2025-02-24 09:38:48 +01:00
video_core: Enforce safe memory reads for compute dispatch
- Modify DmaPusher to use safe memory reads when handling compute operations at High GPU accuracy - Prevent potential memory corruption issues that could lead to invalid dispatch parameters - Previously, unsafe reads could result in corrupted launch_description data in KeplerCompute::ProcessLaunch, causing invalid vkCmdDispatch calls - By enforcing safe reads specifically for compute operations, we maintain performance for other GPU tasks while ensuring compute dispatch stability This change requires >= High GPU accuracy level to take effect.
This commit is contained in:
parent
749d083197
commit
1cbcd142fa
1 changed files with 9 additions and 6 deletions
|
@ -98,19 +98,22 @@ bool DmaPusher::Step() {
|
||||||
&command_headers);
|
&command_headers);
|
||||||
ProcessCommands(headers);
|
ProcessCommands(headers);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Only use unsafe reads for non-compute macro operations
|
||||||
if (Settings::IsGPULevelHigh()) {
|
if (Settings::IsGPULevelHigh()) {
|
||||||
if (dma_state.method >= MacroRegistersStart) {
|
const bool is_compute = (subchannel_type[dma_state.subchannel] ==
|
||||||
unsafe_process();
|
Engines::EngineTypes::KeplerCompute);
|
||||||
return true;
|
|
||||||
}
|
if (dma_state.method >= MacroRegistersStart && !is_compute) {
|
||||||
if (subchannel_type[dma_state.subchannel] == Engines::EngineTypes::KeplerCompute &&
|
|
||||||
dma_state.method == ComputeInline) {
|
|
||||||
unsafe_process();
|
unsafe_process();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Always use safe reads for compute operations
|
||||||
safe_process();
|
safe_process();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe_process();
|
unsafe_process();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue