mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2026-03-25 20:51:36 +00:00
fix: layer: clean up layer info
emplacing a value into an unordered map does not override, so if the swapchain handles were identical (which they are commonly), then it would try to continue with the swapchain images from the old swapchain. ironically, the swapchain images are also mostly identical. in fact, when using validation layers they are intentionally-unintentionally identical.. so I never caught this bug. either way, this fixes a bunch of weird behavior: - swapchain creation failing - the application hanging on a present - the infamous "assertion failed!" wine warning - segmentation faults in the NVIDIA driver
This commit is contained in:
parent
6d2ed649c9
commit
b2928e4ce6
1 changed files with 8 additions and 0 deletions
|
|
@ -285,6 +285,10 @@ namespace {
|
|||
try {
|
||||
// retire old swapchain
|
||||
if (info->oldSwapchain) {
|
||||
const auto& info_mapping = instance_info->swapchainInfos.find(info->oldSwapchain);
|
||||
if (info_mapping != instance_info->swapchainInfos.end())
|
||||
instance_info->swapchainInfos.erase(info_mapping);
|
||||
|
||||
const auto& mapping = instance_info->swapchains.find(info->oldSwapchain);
|
||||
if (mapping != instance_info->swapchains.end())
|
||||
instance_info->swapchains.erase(mapping);
|
||||
|
|
@ -425,6 +429,10 @@ namespace {
|
|||
if (it == instance_info->devices.end())
|
||||
return;
|
||||
|
||||
const auto& info_mapping = instance_info->swapchainInfos.find(swapchain);
|
||||
if (info_mapping != instance_info->swapchainInfos.end())
|
||||
instance_info->swapchainInfos.erase(info_mapping);
|
||||
|
||||
const auto& mapping = instance_info->swapchains.find(swapchain);
|
||||
if (mapping != instance_info->swapchains.end())
|
||||
instance_info->swapchains.erase(mapping);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue