bkaradzic / bgfx

Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
https://bkaradzic.github.io/bgfx/overview.html
BSD 2-Clause "Simplified" License
15.05k stars 1.94k forks source link

Fix adapter object leak when there are more than 4 graphics cards #3306

Closed sleepinging closed 5 months ago

sleepinging commented 5 months ago

when my computer have more than 4 gpus, it's break on close when call DX_RELEASE(m_factory, 0) at function Dxgi::shutdown() because there is an AdapterI object leak if gpu count more than BX_COUNTOF(_caps.gpu), it's should compare first then call EnumAdapters

fix #3305

bkaradzic commented 5 months ago

:+1: