doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
13.4k stars 866 forks source link

Further optimize certain copies #4409

Closed doitsujin closed 4 weeks ago

doitsujin commented 4 weeks ago

Now that we only have one single DxvkContext, we can be a bit more aggressive about pulling copies into the init command buffer in order to reduce barrier and/or render pass counts in some cases, ideally without discarding the destination resource.

Previously, we would only do this on full buffer uploads, this new code covers image uploads and actual GPU->GPU buffer copies as well.

An alternative implementation would work based on barrier tracking and be more granular, but since that's much more expensive I don't think it's warranted, especially since the issue we're trying to solve isn't all that common to begin with.

There's probably more we can do here (moving image ClearUAV perhaps, or at least related barriers), need to investigate.