NcStudios / NcEngine

NcEngine: 3D game engine written in modern C++ and Vulkan
https://ncstudios.itch.io/
MIT License
40 stars 2 forks source link

Fixed OutOfPoolMemory Error #434

Closed jaremieromer closed 8 months ago

jaremieromer commented 8 months ago

Goal

Fix bug #426 (OutOfPoolMemoryError).

Background

Certain devices were crashing on launch with an OutOfPoolMemoryError. This was caused both by the descriptor pools and sets not being created with the UpdateAfterBind flag (which allows for creation of memory resources beyond the hardware limitations) and because we are using a UniformBuffer but did not allocate one in our pool.

The error was device specific because some graphics drivers are more permissive than others on Vulkan setup. Example: I removed all descriptor types from the pool except for one we weren't using, and my graphics driver allowed it.

Changes

  1. Added an entry in pool creation for UniformBuffer
  2. Updated the descriptor pools and sets to include the UpdateAfterBind flag.

closes #426

jaremieromer commented 8 months ago

Well nice, easier fix. Curious, were the beefed up validation rulesets (or whatever) able to catch this?

Yes, they were!