Avokadoen / zig_vulkan

Toying with vulkan and zig
45 stars 2 forks source link

Material index data fragmentation causes performance issues #106

Closed Avokadoen closed 2 years ago

Avokadoen commented 2 years ago

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! :) ) image

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:

Avokadoen commented 2 years ago

Material data is still a bottleneck, just substantially less :^). current profile: image