Currently material index data is allocated using buckets. These buckets have some fragmentation issues. These issues will cause performance degradation in the ray tracing shader as it causes cache misses.
The current obvious issue is introduced in 72b7348 made apparent by tracy (yay! :) )
We see that delta has laaaaaarge gaps between indices forcing the delta recording to think that a large section of memory is changed.
Two paths can be taken here:
Material changes could be handled by specialized delta logic, but this might cause insert and other grid manipulation to become a lot slower.
Buckets can get a refactor pass to hopefully reduce fragmentation. This might be the hardest path to implement, but will have the benefit of improving compute shader cache coherence.
Currently material index data is allocated using buckets. These buckets have some fragmentation issues. These issues will cause performance degradation in the ray tracing shader as it causes cache misses.
The current obvious issue is introduced in 72b7348 made apparent by tracy (yay! :) )
We see that delta has laaaaaarge gaps between indices forcing the delta recording to think that a large section of memory is changed.
Two paths can be taken here: