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

View File

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

View File

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