Less waiting and barriers

This commit is contained in:
Lander Gallastegi 2025-05-04 15:27:14 +02:00
parent 9d2d39e70c
commit 9d45536ab4
2 changed files with 4 additions and 7 deletions

View File

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

View File

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