On Tue, Nov 12, 2019 at 2:40 AM Philip Rebohle < philip.rebohle@tu-dortmund.de> wrote:
Moving this out of d3d12_desc also helps make copying and traversing descriptor arrays more CPU cache-friendly.
Making descriptors smaller would help, but the most likely cause of a cache miss is accessing two objects located far apart in memory. Reading data from a descriptor and then other data via a view pointer creates this situation. I made a new version of the cache coherence patch which eliminates use of vkd3d_view for CBV, SRV and UAV descriptors and only stores a refcount on the heap, but haven't sent it because it conflicts with a pending patch. It only gains 0.5% fps, so if new implementations need an expanded view struct instead then that takes precedence. CPU caching is worth taking into account though.
Conor