Closed HiImSmiley closed 1 month ago
In the DX12 example there is a function WaitForLastSubmittedFrame()
that is called before shutting down or resizing. In DX12 you need to synchronize resource access yourself, so waiting for resources to no longer be in use before manipulating or destroying them is required. If you call WaitForLastSubmittedFrame()
before ImGui_ImplDX12_InvalidateDeviceObjects()
you should be good.
That works! Thank you very much!
Version/Branch of Dear ImGui:
Master - Version 1.91.0 to 1.60 - using plain dx12 example
Back-ends:
imgui_impl_win32.cpp + imgui_impl_dx12.cpp
Compiler, OS:
Windows 11 - MSVC 2022 - v143
Full config/build information:
Details:
It seems like that theres a crash happening when reuploading textures to the GPU when calling ImGui_ImplDX12_InvalidateDeviceObjects().
What I want to do:
Im really unsure if I am the issue here since the crash is happening since 1.60 ( where the example got added ).
If the intended way is different for directx12, then I am very sorry but this is how I have been doing that for my dx9 and dx11 projects ( ImGui_ImplDXXX_InvalidateDeviceObjects() + ImGui_ImplDXXX_CreateDeviceObjects() ) to reupload the texture ( also like the freetype test suggests )
How to reproduce this issue(?):
Screenshots/Video:
Minimal, Complete and Verifiable Example code: