Only run fault processing on command list end

This commit is contained in:
Lander Gallastegi 2025-07-18 21:00:27 +02:00
parent 00fc4ef296
commit ed6a2532a9
3 changed files with 12 additions and 4 deletions

View File

@ -124,6 +124,10 @@ void Liverpool::Process(std::stop_token stoken) {
if (task.done()) { if (task.done()) {
task.destroy(); task.destroy();
if (rasterizer) {
rasterizer->ProcessFaultBuffer();
}
std::scoped_lock lock{queue.m_access}; std::scoped_lock lock{queue.m_access};
queue.submits.pop(); queue.submits.pop();
@ -136,7 +140,7 @@ void Liverpool::Process(std::stop_token stoken) {
if (submit_done) { if (submit_done) {
VideoCore::EndCapture(); VideoCore::EndCapture();
if (rasterizer) { if (rasterizer) {
rasterizer->EndCommandList(); rasterizer->ProcessDownloadImages();
rasterizer->Flush(); rasterizer->Flush();
} }
submit_done = false; submit_done = false;

View File

@ -449,11 +449,14 @@ void Rasterizer::Finish() {
scheduler.Finish(); scheduler.Finish();
} }
void Rasterizer::EndCommandList() { void Rasterizer::ProcessFaultBuffer() {
if (fault_process_pending) { if (fault_process_pending) {
fault_process_pending = false; fault_process_pending = false;
buffer_cache.ProcessFaultBuffer(); buffer_cache.ProcessFaultBuffer();
} }
}
void Rasterizer::ProcessDownloadImages() {
texture_cache.ProcessDownloadImages(); texture_cache.ProcessDownloadImages();
} }
@ -482,7 +485,7 @@ bool Rasterizer::BindResources(const Pipeline* pipeline) {
uses_dma |= stage->uses_dma; uses_dma |= stage->uses_dma;
} }
if (uses_dma) { if (uses_dma && !fault_process_pending) {
// We only use fault buffer for DMA right now. // We only use fault buffer for DMA right now.
{ {
Common::RecursiveSharedLock lock{mapped_ranges_mutex}; Common::RecursiveSharedLock lock{mapped_ranges_mutex};

View File

@ -72,7 +72,8 @@ public:
void CpSync(); void CpSync();
u64 Flush(); u64 Flush();
void Finish(); void Finish();
void EndCommandList(); void ProcessFaultBuffer();
void ProcessDownloadImages();
PipelineCache& GetPipelineCache() { PipelineCache& GetPipelineCache() {
return pipeline_cache; return pipeline_cache;