Skip to content

Conversation

asuessenbach
Copy link
Contributor

I don't see, how swapChainImageViews could be not empty in createImageViews(). Do I miss something?

In any case, I would replace the defensive clear() with an assert, to make clear it's a prerequisite for this function.

@SaschaWillems
Copy link
Collaborator

Does make sense in this chapter. For msvc this needs to include assert though.

Looking at other chapters, the createImageViews function needs some fix ups in other chapters too. In some of the chapters (e.g. 23) it just emplaces back with no clear, so every resize will just add new image views.

@asuessenbach
Copy link
Contributor Author

asuessenbach commented Sep 1, 2025

Asserting on empty swapChainImageViews in createImageViews() in all chapters.

Chapters supporting resizing already clear the swapChainImageViews in cleanupSwapChain()

Besides that, all chapters staring with 17_swap_chain_recreation are crashing on resize.

@SaschaWillems
Copy link
Collaborator

Thanks 👍🏻

Crash on resize will be fixed in #85

We should merge that as soon as possible

@marty-johnson59 marty-johnson59 merged commit 805e16a into KhronosGroup:main Sep 8, 2025
5 checks passed
@asuessenbach asuessenbach deleted the 07_image_views branch September 17, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants