[bug] :windows 10 : vulkan: release build: dynamic heap exhausted
😂 I'm so sorry, found another bug.
Steps to re-produce
- In code: Make use of
SHADER_RESOURCE_VARIABLE_TYPE_DYNAMIC - Run the program in Release build on Windows with Vulkan backend.
- Click the taskbar app icon, to minimize the rendering window.
Problem
Diligent Engine: Warning: Space in dynamic heap is almost exhausted. Allocation forced wait time of 2.0 ms. Increase the size of the heap by setting EngineVkCreateInfo::DynamicHeapSize to a greater value or optimize dynamic resource usage
I can also re-produce this issue with builtin sample: `GLTFViewer` and `Tutorial27_PostProcessing`.
My guess is vulkan swapchain's present somehow not happen with minimized window. Assosiated dynamic heap recycle code, not running.
What is you Windows version? GPU? Driver version?
Win10 Professional x64 - 22H2 19045.4651 GPU: GTX1070 v556.12 Vulkan: v1.3.224.1
When play with and tracking down this bug with sample Tutorial27_PostProcessing,
I may found another small bug in that sample.
around Tutorial27_PostProcessing.cpp, line 303:
CurrCamAttribs.f4ViewportSize = float4{Resolution.x, Resolution.y, 1.f / Resolution.x, 1.f / Resolution.y};
After window resize, it is using previous window size. Should update viewport size first:
Resolution.x = m_PostFXFrameDesc.Width;
Resolution.y = m_PostFXFrameDesc.Height;
CurrCamAttribs.f4ViewportSize = float4{Resolution.x, Resolution.y, 1.f / Resolution.x, 1.f / Resolution.y};
When play with and tracking down this bug with sample
Tutorial27_PostProcessing, I may found another small bug in that sample.around Tutorial27_PostProcessing.cpp, line 303:
CurrCamAttribs.f4ViewportSize = float4{Resolution.x, Resolution.y, 1.f / Resolution.x, 1.f / Resolution.y};After window resize, it is using previous window size. Should update viewport size first:
Resolution.x = m_PostFXFrameDesc.Width; Resolution.y = m_PostFXFrameDesc.Height; CurrCamAttribs.f4ViewportSize = float4{Resolution.x, Resolution.y, 1.f / Resolution.x, 1.f / Resolution.y};
Everything is correct here; we have Source Size and Output Size. The first value determines the size of the render targets, and the second one determines the window size. They should differ because we are using FSR in this tutorial
Got it, I understand what you mean. We just need to move SetupUpsamplingSettings before setting the resolution.
https://github.com/DiligentGraphics/DiligentSamples/pull/188
Does this reproduce in Debug build?
Only reproduce in Release build. And must click the taskbar icon to minimize.
I found that click window's top right minimize button, no warning, strange.