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);
if (uses_dma) {
if (uses_dma && !fault_process_pending) {
fault_process_pending = true;
// 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.MemoryBarrier();
// buffer_cache.MemoryBarrier();
}
fault_process_pending |= uses_dma;

View File

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