Quick answer: Vulkan buffer device addresses corrupting after a cached shader load? BDA captures the address at compile; cached shaders carry stale addresses - invalidate cache when buffer recreated.
Load shader cache from disk. BDA-based shader reads garbage; buffer pointer is stale across sessions.
Pass BDA as push constant
Don't bake BDA into shader binary. Push as a constant per dispatch; cache survives.
Or invalidate cache per session
Save the BDA alongside the cache. On load, compare; mismatch = rebuild.
Use descriptor indexing instead
For most cases, descriptor indexing replaces BDA without the staleness issue. Migrate where possible.
“Buffer device addresses are session-scoped. Caching them is the bug.”
If you use BDA, plan the lifetime carefully. Wrong assumptions cause silent memory corruption that's painful to track.