Skip to content

asahi: Implement valid buffer range tracking

Asahi Lina requested to merge asahilina/mesa:agx/perf-improvements into main

A common pattern is to allocate a vertex/etc buffer and write to it in subsets. Some games interleave this with draw calls using the buffer. This causes very expensive flushing for every draw call.

Fix this by tracking which range of a buffer has been written to, and elide syncs when the range was previously uninitialized.

Fixes Source engine game performance and probably helps a bunch of others.

Signed-off-by: Asahi Lina lina@asahilina.net

Merge request reports