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
14.59k stars 1.92k forks source link

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

Closed sleepinging closed 3 weeks ago

sleepinging commented 3 weeks 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 3 weeks ago

:+1: