You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here’s the situation:
The data size I need to upload each frame is about 32 MB (1000 × 1000 × 2 × sizeof(float4x4)). When I run the code, the MapHelper() call fails. I'm using Diligent Engine 2.5.6, and my code is based on the samples (inherited from SampleBase).
The issue only appears when rendering 1000×1000 objects. With 100×100 objects, everything works fine, so the frame seems ok.
With Vulkan backend: the program crashes.
2 With OpenGL backend: it rendered a mess (but does not crash immediately).
I also tried increasing DynamicHeapSize to 64 MB in ModifyEngineInitInfo via EngineVkCI.DynamicHeapSize = 64 << 20. After that, it no longer crashes, but rendered a mess.
I’m wondering: Is there a size limitation for dynamic buffers (or the upload buffer) in Diligent? What is the best practice for uploading a large buffer (around 32 MB) to the GPU on a per‑frame basis?
Dynamic buffers are intended to upload small amounts of data. They are implemented differently in all backends, but in Direct3D11 there is a limit of 64 KB (65536 bytes), which should be used as the guiding limit.
So dynamic buffers are absolutely not the right way to update large buffers.
For your use case, you have to use USAGE_DEFAULT buffer. You can update in two ways:
Use UpdateBuffer
Create a USAGE_STAGING buffer, map it, write data and copy to default buffer. Since your buffer is large, this would be the better way as it avoids one copy
Activity
TheMostDiligent commentedon Apr 3, 2026
Dynamic buffers are intended to upload small amounts of data. They are implemented differently in all backends, but in Direct3D11 there is a limit of 64 KB (65536 bytes), which should be used as the guiding limit.
So dynamic buffers are absolutely not the right way to update large buffers.
For your use case, you have to use
USAGE_DEFAULTbuffer. You can update in two ways:UpdateBufferUSAGE_STAGINGbuffer, map it, write data and copy to default buffer. Since your buffer is large, this would be the better way as it avoids one copy