directx 12 – Concurrent Write Operations

learn.microsoft.com/en-us/windows-hardware/drivers/display/enhanced-barriers

The one-writer-at-a-time policy still applies since two seemingly nonoverlapping write regions might still have overlapping cache lines.

Since there must be no pending commands or cache flush operations between ExecuteCommandLists boundaries, buffers might be initially accessed in an ExecuteCommandLists scope without a barrier.

I’m copying realtime data from an upload buffer into a (default) ring buffer, on the same thread, using the same queue, framebuffering the ID3D12CommandLists and ID3D12CommandAllocators.

Is there a possibly that writes (from different ExecuteCommandLists calls) could interfere with each other due to overlapping cache lines?

Edit

microsoft.github.io/DirectX-Specs/d3d/D3D12EnhancedBarriers.html

Unfortunately, due to how many GPUs manage resource caches, concurrent write operations to seemingly non-overlapping regions of the same subresource may still result in data corruption without a barrier. Therefore, buffers and simultaneous-access textures may be accessed by any number of read operations and up to one write operation concurrently as long as the read regions do not intersect the write regions.

What counts as a concurrent write operations? Does calling ExecuteCommandList before the previous calls finish (on the same queue, as done when framebuffering) count as concurrent write operations?

Read more here: Source link