Bring back applying pending operations in wait

This commit is contained in:
Lander Gallastegi 2025-05-04 17:56:32 +02:00
parent 95af4451ec
commit c6757763e4
2 changed files with 5 additions and 4 deletions

View File

@ -475,7 +475,6 @@ bool Rasterizer::BindResources(const Pipeline* pipeline) {
pipeline->BindResources(set_writes, buffer_barriers, push_data);
if (uses_dma && !fault_process_pending) {
fault_process_pending = true;
// We only use fault buffer for DMA right now.
{
std::shared_lock lock{dma_sync_mapped_ranges_mutex};
@ -483,7 +482,6 @@ bool Rasterizer::BindResources(const Pipeline* pipeline) {
buffer_cache.SynchronizeRange(range.lower(), range.upper() - range.lower());
}
}
// buffer_cache.MemoryBarrier();
}
fault_process_pending |= uses_dma;

View File

@ -91,8 +91,11 @@ void Scheduler::Wait(u64 tick) {
}
master_semaphore.Wait(tick);
// We should apply pending operations until the tick we are waiting for.
// but that may introduce unpredictable timing issues.
// Apply pending operations until the wait tick
while (!pending_ops.empty() && pending_ops.front().gpu_tick <= tick) {
pending_ops.front().callback();
pending_ops.pop();
}
}
void Scheduler::AllocateWorkerCommandBuffers() {