Files
fs2open.github.com/code
dustinspace217andDustinspace217 32db880e94 Vulkan: retire BLASes and the TLASes built from them safely (#7937)
A BLAS was destroyed immediately when its model was unloaded or when the
vertex heap grew and the BLAS had to be rebuilt, while the TLAS of a
frame still on the GPU could reference it by device address. Queue the
acceleration structure and its buffer on the deletion queue instead, the
same way ensureTlasCapacity already retires the TLAS. The deletion queue
is flushed after ray tracing shuts down, so shutdown defers too.

A built TLAS also kept pointing at retired BLASes for later frames: the
live shadow TLAS binding is only refreshed when a mission frame rebuilds
it, and buildTlas keeps the previous TLAS when it has no instances. With
ray-traced shadows on, flying a mission and then leaving and re-entering
the tech room (which frees every model on exit) bound such a TLAS on
every tech room frame. So when BLASes are retired, the built frame TLASes
are retired with them and the binding goes back to the empty fallback
TLAS until the next rebuild. onModelUnloaded reports whether it retired
anything, so the binding refresh only runs then.

Co-authored-by: Dustinspace217 <[email protected]>
2026-11-04 18:19:40 +01:00
..
2026-04-30 00:35:19 -04:00
2026-07-20 23:04:56 -04:00
2026-11-02 22:40:54 -05:00
2026-07-23 15:52:27 +02:00
2018-07-15 19:37:24 +02:00
2026-07-23 15:52:27 +02:00
2026-07-23 15:52:27 +02:00
2025-08-18 11:59:22 -04:00
2026-09-12 03:57:27 +00:00
2026-05-12 11:31:20 -04:00
2026-05-28 14:43:48 +09:00
2026-04-30 00:35:19 -04:00
2026-11-02 22:40:54 -05:00
2026-09-08 10:48:13 -04:00
2026-07-20 23:04:56 -04:00
2026-11-04 01:16:41 -05:00
2026-07-23 15:52:27 +02:00
2026-07-23 15:52:27 +02:00
2026-11-04 01:16:41 -05:00
2026-11-04 01:16:41 -05:00
2026-07-23 15:52:27 +02:00
2016-07-22 12:07:19 +02:00