Skip to content

Mitigate undesired unsynchronized effect of changing SwapchainImage Count#495

Merged
JeanPhilippeKernel merged 2 commits intoJeanPhilippeKernel:user/kernel/fix-updateafter-from
MathewBensonCode:afterbind
Jan 28, 2026
Merged

Mitigate undesired unsynchronized effect of changing SwapchainImage Count#495
JeanPhilippeKernel merged 2 commits intoJeanPhilippeKernel:user/kernel/fix-updateafter-from
MathewBensonCode:afterbind

Conversation

@MathewBensonCode
Copy link
Contributor

When creating the Swapchain we check with the device for the supported value. If this value is higher than the pre-configured values, structures created with the initial values are now out of sync, leading to crashes.

This approach attemps to create those structures after getting the supported Swapchain image count

@MathewBensonCode MathewBensonCode changed the title Mitigate effect of changing SwapchainImage Count Mitigate undesired unsynchronized effect of changing SwapchainImage Count Jan 28, 2026
@JeanPhilippeKernel JeanPhilippeKernel changed the base branch from develop to user/kernel/fix-updateafter- January 28, 2026 08:44
@JeanPhilippeKernel
Copy link
Owner

I believe, addressing the conflict should reduce the file change and keep your changes on CommandBufferManager

- The code that relies on the SwapchainImageCount such as the command
  buffer are re-arranged to ensure that they run after we establish the
  correct number of Swapchain Images
@MathewBensonCode
Copy link
Contributor Author

I would like to confirm that as at the last commit, the application is running successfully on linux. Its actually the first time I have seen the UI running since I started looking at this project a few years ago.

i'll take a look at the changes requested a little later.

- Removed Redundant parameter to the CommandBufferManager.Initialize
  method
- Moved the EnquedCommandBuffers.init method to be called right after
  the m_buffer_manager.Initialize function call
@JeanPhilippeKernel JeanPhilippeKernel merged commit 9957616 into JeanPhilippeKernel:user/kernel/fix-updateafter- Jan 28, 2026
@github-project-automation github-project-automation bot moved this from In Progress to Done in ZEngine Board Jan 28, 2026
jnyfah pushed a commit that referenced this pull request Feb 2, 2026
* updated vulkan device

* added update-after-bind detection

* fixed binding name cmp ops

* updated bindless logic

* fixed missing props

* simplified expr

* reduced descriptorset usage

* fixed descriptor set count logic

* Mitigate undesired unsynchronized effect of changing SwapchainImage Count (#495)

* Re-Arrange Code flow after swapchainimage count change

- The code that relies on the SwapchainImageCount such as the command
  buffer are re-arranged to ensure that they run after we establish the
  correct number of Swapchain Images

* Pull Request #495 Requested Changes
- Removed Redundant parameter to the CommandBufferManager.Initialize
  method
- Moved the EnquedCommandBuffers.init method to be called right after
  the m_buffer_manager.Initialize function call

---------

Co-authored-by: Mathew Benson <mathew@benson.co.ke>

* improved buffer manager

* prevent swapchain image count change in after first creation

* fixed string deref

* filled dummy set for imgui

* fixed usage of Shader LocalArena

* fixed rendering on wrong framebuffer

---------

Co-authored-by: Mathew Benson <benson.orina@live.com>
Co-authored-by: Mathew Benson <mathew@benson.co.ke>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-linux Work on Linux system area-macOS Work on macOS system area-rendering area-window Work on Window system bug Something isn't working vulkan-api

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Shader Creation Failure - Running out of VRAM when Creating DescriptorPool

3 participants