git: openjdk/jfx-sandbox: direct3d12: 8344288: Investigate D3D12 memory leaks during rendering

duke duke at openjdk.org
Tue Nov 26 15:20:39 UTC 2024


Changeset: e18aa597
Branch: direct3d12
Author:    Lukasz Kostyra <lukasz.kostyra at oracle.com>
Date:      2024-11-26 12:19:29 +0000
URL:       https://git.openjdk.org/jfx-sandbox/commit/e18aa597efb26c315091420824cef1d789a9c2ac

8344288: Investigate D3D12 memory leaks during rendering

Memory leaks came from not calling CommandAllocator::Reset() to reclaim
memory used by Command Lists.

To resolve, added a collection of Command Allocators to CommandListPool
and logic to cycle through them when a frame finishes rendering. This
keeps the memory usage consistent throughout test execution and raises
FPS on some more command-heavy scenarios like Button rendering.

! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeDevice.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeDevice.hpp
! modules/javafx.graphics/src/main/native-prism-d3d12/D3D12NativeSwapChain.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12CommandListPool.cpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12CommandListPool.hpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12PSOManager.hpp
! modules/javafx.graphics/src/main/native-prism-d3d12/Internal/D3D12RenderingParameter.hpp



More information about the openjfx-changes mailing list