fix(agc): a replaced device's unit shadows leave the registry

When the windowless device is replaced at the first present, its unit
shadows were published but stayed registered. Lookups take the shadow
whose import starts nearest below an address, so such a stale entry
could hide the live import's shadow. The write-back results it held then
looked absent, and an upload read the import's stale bytes instead.
The replaced device's shadows are now dropped once it is idle.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
MichonandClaude Opus 5.5 committed 2026-10-02 17:57:04 +02:00
1 parent 313de1c5a3
commit 7b03d86bc5
1 file changed
+1
@@ -989,6 +989,7 @@ void VulkanDevice::PrepareForReplacement() {
Graphics::FlushCachedTextures(state->device);
Graphics::PublishAllShadows(state->context, Graphics::PublishReason::Teardown);
WaitIdle();
Graphics::DestroyShadows(state->device);
}
void VulkanDevice::WaitIdle() {