Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] :windows 10 : vulkan: release build: dynamic heap exhausted #600

Open
WangHoi opened this issue Aug 7, 2024 · 9 comments
Open

[bug] :windows 10 : vulkan: release build: dynamic heap exhausted #600

WangHoi opened this issue Aug 7, 2024 · 9 comments

Comments

@WangHoi
Copy link
Contributor

WangHoi commented Aug 7, 2024

😂 I'm so sorry, found another bug.

Steps to re-produce

  1. In code: Make use of SHADER_RESOURCE_VARIABLE_TYPE_DYNAMIC
  2. Run the program in Release build on Windows with Vulkan backend.
  3. 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`.
@WangHoi
Copy link
Contributor Author

WangHoi commented Aug 7, 2024

My guess is vulkan swapchain's present somehow not happen with minimized window.
Assosiated dynamic heap recycle code, not running.

@TheMostDiligent
Copy link
Contributor

What is you Windows version? GPU? Driver version?

@WangHoi
Copy link
Contributor Author

WangHoi commented Aug 7, 2024

Win10 Professional x64 - 22H2 19045.4651
GPU: GTX1070 v556.12
Vulkan: v1.3.224.1

@WangHoi
Copy link
Contributor Author

WangHoi commented Aug 8, 2024

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};

@MikhailGorobets
Copy link
Contributor

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

@MikhailGorobets
Copy link
Contributor

Got it, I understand what you mean. We just need to move SetupUpsamplingSettings before setting the resolution.

@MikhailGorobets
Copy link
Contributor

@TheMostDiligent
Copy link
Contributor

Does this reproduce in Debug build?

@WangHoi
Copy link
Contributor Author

WangHoi commented Aug 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants